Reed–Solomon DQI decoder
A Reed–Solomon decoder for DQI, rebuilt around the Berlekamp–Massey recurrence and run backward with almost no stored history.
Hermitian DQI decoder
A decoder for a code on the Hermitian curve that finds the error locator as a null vector of a matrix it never stores.
HHL rotation angle
The HHL rotation angle, evaluated on 345 power-of-two pieces that the input bits select directly.
Coulomb potential
The inverse distance between two particles, built from 128 table lines whose words are erased by measurement.
Fixed-point Gaussian
A fixed-point Gaussian that never forms x² and skips the table wherever the function is below the error budget.
Fe₂S₂ alias–Select
One step of an iron–sulfur chemistry simulation, with the terms and alias table ordered so the lookup can skip repeated words.
Nonabelian lattice-gauge simulation
A lattice gauge theory update in which neighboring loops share one running product of group elements.
Prime-field modular inversion
Modular inversion inside elliptic-curve point addition, using fixed-shape divsteps whose choices the circuit reads back from its registers.
Method
Each circuit is the output of a Python program that builds it gate by gate. Functions, loops, and named registers keep the structure of the computation visible, so a change to one arithmetic routine changes every place it is used. An LLM writes and rewrites these programs. It starts from a blank program and a fixed task specification, and it sees nothing of the evaluator beyond the feedback on each submission.
Each iteration starts a fresh agent session with a parent program, its feedback, and a few alternatives from the archive with their costs. The agent can run drafts on test inputs and query a classical oracle before it submits a revised program. Each architecture proposed at the start founds its own family, and leading programs are shared between families from time to time. Within a family, the archive keeps the circuit with the lowest TQ-cost in each cell of the (Toffolis, qubits) plane, so a circuit with fewer qubits but more Toffolis stays available for later rewrites.
The circuits use classical reversible gates, diagonal sign gates, and destructive X-basis measurements. On a basis-state input the state stays one bit string with a sign, so the evaluator simulates each shot exactly, at full size. A shot passes when the output matches the target, every ancilla is back at |0⟩, and the sign is correct. A circuit is valid when no more shots fail than the task's failure budget allows, and its cost is its Toffoli count times its peak qubit count.
GF(16) inversion
GF(16) is a number system with sixteen elements, each written as four bits. Adding two elements is bitwise XOR. Multiplying them is polynomial multiplication reduced modulo x4 + x + 1. Every nonzero element has an inverse, and your circuit must XOR the inverse of x into a second register h while leaving x unchanged: |x⟩|h⟩ ↦ |x⟩|h ⊕ x−1⟩, with 0 mapped to 0.