Papers
Topics
Authors
Recent
Search
2000 character limit reached

Discovering state-of-the-art quantum circuits with large language models

Published 15 Oct 2026 in quant-ph and cs.AI | (2610.22367v1)

Abstract: Significant efforts are currently being directed toward the implementation of large-scale quantum information processors, but realizing useful quantum advantage also requires the development of efficient quantum algorithms. While for many practical problems the dominant resource costs are associated with a small set of computational primitives, optimizing them in the quantum setting presents unique challenges, including a reversibility constraint absent from ordinary classical computation. Here we introduce an evolutionary framework in which LLMs propose circuit designs and an independent evaluator verifies and scores them. We apply this framework to tasks spanning numerical computation, chemistry, optimization, quantum simulation, and number theory. In seven of the eight tasks, the discovered circuits significantly reduce both Toffoli and qubit counts relative to the state of the art. In the eighth, the search discovers a new reversible architecture for prime-field modular inversion. By handling reversibility differently, the architecture makes divsteps -- a classical algorithm previously impractical for reversible integer arithmetic -- viable and substantially improves the Toffoli-qubit trade-off for modular inversion. These results open the door for evaluator-guided LLM co-design of new algorithmic structures for quantum computation.

Summary

  • The paper presents an evaluator-guided evolutionary framework for discovering reversible quantum circuits.
  • This framework uses a Large Language Model (LLM) to generate algorithmic designs for the circuits and evaluates their correctness and resource costs programmatically.
  • The methodology results in improved Toffoli Count QuM Quotient ($TQ$)-cost for several tasks, with the most significant reduction of 39x for fixed point Gaussian function evaluation.

Problem formulation and methodological contribution

The paper presents an evaluator-guided evolutionary framework for discovering reversible quantum circuits in which a LLM generates algorithmic designs and an independent programmatic evaluator verifies correctness and computes resource costs (2610.22367). The central premise is that quantum compilation cannot be reduced to local gate rewriting. A useful circuit may require simultaneous changes to the classical algorithm, data representation, reversible control flow, workspace allocation, approximation strategy, and uncomputation schedule.

The target class consists primarily of reversible embeddings of classical functions,

∣x⟩∣y⟩↦∣x⟩∣y⊕f(x)⟩,\ket{x}\ket{y}\mapsto\ket{x}\ket{y\oplus f(x)},

possibly augmented by phase operations and measurement-based uncomputation. Candidate circuits are represented as Python programs using named registers, loops, reusable subroutines, allocation and deallocation operations, Toffoli gates, Clifford operations, and corrected XX-basis measurements. This representation preserves algorithmic structure and allows a single conceptual modification to affect many circuit locations coherently.

Correctness is evaluated on computational-basis trajectories. Because the permitted operations preserve computational-basis states up to phase before measurement, the evaluator can track bit strings and phase bits rather than exponentially large amplitude vectors. It checks the output permutation, phase, preservation of input registers, ancilla cleanliness, and consistency across measurement records. The resulting guarantee is stronger than checking only classical outputs: a dirty ancilla or an incorrect phase can entangle with the logical state or corrupt later interference while leaving measured output bits apparently correct.

The resource objective is

TQ=T×Q,TQ = T\times Q,

where TT is the Toffoli/CCZ count and QQ is peak logical-qubit usage. The authors explicitly treat this as a tunable objective rather than a universal hardware metric. To avoid convergence to a single local architecture, the search begins with LLM-generated ideation across distinct algorithm families. These families are evolved independently and periodically exchange strong candidates. MAP-Elites preserves candidates occupying different regions of the Toffoli–qubit resource plane, allowing a higher-TT but lower-QQ design to remain available for later recombination.

The framework therefore searches over algorithmic programs rather than flattened gate sequences. Its principal limitation is also methodological: the evaluator, task interface, objective, input distribution, and permitted representation determine the space of discoverable solutions. The reported results demonstrate the capability of the framework within those boundaries, not unrestricted quantum algorithm discovery.

Reversible co-design principles

Three design principles recur across the discovered circuits.

Conditional routing replaces controlled arithmetic. If different branches require equivalent expensive arithmetic on differently organized data, controlled swaps can route the relevant operands into a common arithmetic kernel. For a conditional multiply-add, two controlled multiply-adds can be replaced by a controlled swap, one uncontrolled multiply-add, and the inverse swap. Under the stated schoolbook model, this changes the Toffoli count from 3n2+17n−23n^2+17n-2 to approximately half that value.

Reachable-state invariants replace explicit history. Reversible computation often appears to require storing every branch decision. The paper instead identifies invariants that encode branch history in arithmetic registers. During uncomputation, a decision can be reconstructed from the current state and then erased. This is not a local property of an update rule: it depends on the initialization, the complete forward algorithm, and the set of reachable states.

Failure budgets localize worst-case resources. A circuit must normally support every branch in a coherent superposition, so rare inputs can determine its worst-case schedule and workspace. The discovered designs reorganize computation so that atypical behavior is confined to extra iterations, history entries, carry propagation, or arithmetic ranges. Those resources can then be truncated while assigning the resulting failure probability to an explicit budget. This is a substantive assumption in several results: the strongest resource reductions are distribution-dependent and are not worst-case exact circuits.

Reed–Solomon decoding for DQI

Decoded quantum interferometry requires a reversible Reed–Solomon decoder to remove an error word while retaining its syndrome. The baseline uses a synchronized reversible extended Euclidean algorithm (EEA). For the primary instance, 70 syndromes over F212\mathbb F_{2^{12}} specify an error pattern of weight at most 35. The reconstructed baseline requires approximately $5.1$ million Toffolis and 1,938 qubits.

The search replaces the EEA locator solve with Berlekamp–Massey (BM), whose forward arithmetic is much cheaper but whose ordinary reversible implementation would retain a history of overwritten locator templates. The discovered circuit exploits the fact that the locator polynomial is needed only up to a nonzero scalar, since rescaling does not change its roots. It rescales the replace branch so that both retain and replace cases share one arithmetic update. It also derives the overwritten discrepancy from the constant coefficient of the updated locator, eliminating the need to store it on most branches.

The circuit further avoids materializing the full decoded error word. DQI requires only a phase parity, so the implementation contracts Forney’s formula directly into a trace-like phase computation. A precomputed reciprocal polynomial replaces a field inversion at every scan position. The evaluator also uses input-distribution-dependent coefficient cutoffs and allocates one discrepancy-stack entry rather than the worst-case 35 entries. The latter reduces the stack from 665 qubits to 19, while inputs requiring more history are allowed to fail.

Figure 1

Figure 1: The reversible Reed–Solomon decoder combines a lower-cost Berlekamp–Massey recurrence, shared updates, adaptive coefficient ranges, and phase-only error recovery.

The resulting decoder uses approximately 440,000 Toffolis and 1,837 qubits. Relative to the baseline, this is a XX0 reduction in both XX1-cost and Toffoli count, with a XX2 reduction in qubits. Across 100,000 complete-circuit tests, seven produced the wrong sign; the paper reports a combined sampled failure probability of approximately XX3 for the relevant decoder limitations. The implication is that reversible algorithm selection can restore the arithmetic advantage of BM only when its overwrite pattern and reverse computation are redesigned jointly.

The same strategy is applied to the Hermitian-code DQI decoder. A naive reversible Feng–Rao construction uses approximately XX4 Toffolis and XX5 qubits. The discovered design casts locator recovery as a null-space problem, applies a Lanczos/block-Lanczos walk without storing the full syndrome matrix, and computes phase contributions in stripes rather than materializing the evaluator globally. It uses approximately 930,000 Toffolis and 2,395 qubits. This corresponds to reductions of roughly XX6 in Toffolis, XX7 in qubits, and XX8 in XX9-cost relative to the naive reversible baseline. The comparison must be interpreted cautiously: the baseline is explicitly identified as a naive reversible implementation, and the paper states that no prior reversible compilation exists for this case.

Modular inversion and divstep reversibility

The modular-inversion case is the paper’s strongest architectural result. The benchmark is affine point addition on a 256-bit elliptic curve, where the dominant operation is inversion of TQ=T×Q,TQ = T\times Q,0 modulo the secp256k1 prime. Existing constructions use binary gcd or packed Euclidean walks. The LLM search instead discovers a reversible architecture based on integer divsteps, a classical algorithm previously considered unsuitable for this reversible setting because its branch history is not naturally stored in space freed by shrinking operands.

The divstep state contains two remainders, two scaled coefficients, and a signed counter. Each step selects among swap, odd non-swap, and even cases. The key result is that branch decisions can be reconstructed from the post-step arithmetic state. Swaps are identified by the 2-adic valuation of one coefficient. Many parity decisions follow from the updated counter or from termination. The remaining ambiguous decisions occur in excursions after swaps.

The paper proves that the ambiguous bit at excursion depth TQ=T×Q,TQ = T\times Q,1 is encoded in a low-order window of the coefficient registers. If TQ=T×Q,TQ = T\times Q,2 with TQ=T×Q,TQ = T\times Q,3 odd, the decision is obtained from a bit of TQ=T×Q,TQ = T\times Q,4. This is an exact reachable-state invariant, not a probabilistic heuristic. The circuit compiles shallow decoders directly as Boolean functions and stores only decisions beyond a tunable depth cutoff.

Figure 2

Figure 2: Evolutionary search in the resource plane preserves distinct circuit lineages and discovers designs that move through nonmonotonic Toffoli–qubit trade-offs.

With cutoff TQ=T×Q,TQ = T\times Q,5, only TQ=T×Q,TQ = T\times Q,6 of ambiguous decisions are stored. A 60-bit history allocation replaces a worst-case requirement of 263 bits for the sampled schedule, saving 203 qubits. The circuit supports 533 divsteps, rather than the worst-case bound of 590, and begins termination testing only from step 499. The associated failure contributions include finite stopping-time, history, carry, comparison, and integer-width limits. The union-bound estimate for point addition is approximately TQ=T×Q,TQ = T\times Q,7, consistent with the stated TQ=T×Q,TQ = T\times Q,8 target. Four of 100,000 complete point-addition tests failed.

Figure 3

Figure 3: The Euclidean alternative specializes operand-width windows, removes counter tests on typical positions, merges scans, and reduces the complete point-addition construction from roughly 70 million to 21 million Toffolis.

The complete divstep point adder uses 4.0 million Toffolis and 935 qubits. It is not superior to every prior design in Toffoli count: a binary-gcd construction cited in the paper uses approximately 1.9 million Toffolis and 1,446 qubits. Its advantage is a different point on the resource frontier, with substantially lower qubit usage. The claim is therefore not that divsteps dominate universally, but that reversible divstep architecture substantially improves the achievable Toffoli–qubit trade-off and makes a previously impractical classical method viable.

A second search result specializes a packed EEA schedule to the same prime. It reduces a reconstructed 69.5-million-Toffoli baseline to 20.5 million Toffolis using 843 qubits, a TQ=T×Q,TQ = T\times Q,9 Toffoli reduction for only five additional qubits. This design is less algorithmically novel but illustrates the value of distribution-specific schedule specialization: fitted operand windows, test-free positions, merged scans, measured carries, and sparse-prime reduction together account for most of the reduction.

Numerical function evaluation

Three fixed-point numerical circuits—HHL rotation angles, Coulomb potentials, and Gaussian functions—are derived from piecewise-polynomial approximation but are reorganized for reversible execution. The baseline is the Håner–Roetteler–Svore construction, which uses arbitrary interval boundaries, general Horner evaluation, wide multipliers, and explicit temporary registers.

Figure 4

Figure 4: The HHL circuit uses dyadic interval selection, a shared local coordinate, and direct quadratic accumulation to replace repeated wide polynomial multiplications.

For HHL, the baseline uses cubic fits on 35 arbitrary intervals, 44-bit arithmetic, 16,000 Toffolis, and 300 qubits. The discovered circuit uses 345 dyadic intervals, a shared 15-bit local coordinate obtained by cyclic bit shifts, and quadratic approximations. It accumulates the polynomial directly into the output and fits coefficients to the exact truncated integer computation. The worst-case angular error is TT0 radians. The circuit uses 1,348 Toffolis and 115 qubits, yielding a TT1 reduction in TT2-cost.

For the Coulomb potential, the circuit directly accumulates the three coordinate squares, replaces 16 quadratic intervals with 128 linear intervals, and uses measurement-based uncomputation for the larger lookup. Its worst-case error is TT3. It uses 1,140 Toffolis and 142 qubits, compared with 6,355 Toffolis and 252 qubits for the baseline, reducing TT4-cost by TT5.

For the Gaussian, the circuit folds the input onto the nonnegative axis without an explicit add-one operation, prunes constant and zero regions of the lookup, avoids forming TT6, and accumulates a quadratic directly into the output. The worst-case error is TT7. It uses 1,583 Toffolis and 139 qubits, compared with 24,000 Toffolis and 362 qubits, reducing TT8-cost by TT9.

The common implication is that approximation degree is not the only relevant optimization variable. A finer partition can reduce total cost when it eliminates wide reversible arithmetic, and a mathematically equivalent approximation can have very different cost depending on whether its intermediate values must be stored and uncomputed.

Chemistry and lattice-gauge circuits

For the QQ0 alias-select circuit, the search exploits two independent freedoms: permutation of Hamiltonian terms and nonuniqueness of alias-table constructions. Pauli terms related by Clifford frames are grouped into blocks, while alias rows are reordered to create repeated QROM subtrees. The resulting circuit reduces the baseline from 55,000 Toffolis and 139 qubits to 15,000 Toffolis and 126 qubits, a QQ1 reduction in QQ2-cost.

Figure 5

Figure 5: Frame-based grouping compresses Select by representing many Pauli terms through shared Clifford transformations and block representatives.

The result depends strongly on structure in the particular Hamiltonian. Two frames arise from exact spin symmetries, while other frames exploit approximate spatial regularities in the molecular data. The optimization is exact for the supplied table, but its compression benefit is not a generic property of arbitrary QROM instances. The paper explicitly notes that spin–orbit or Zeeman terms could remove some of the symmetry-based opportunities.

For the nonabelian lattice-gauge circuit, the task is to accumulate plaquette and rectangle traces over a QQ3 periodic lattice with 192 links and 576 loops. The baseline computes each loop independently using general group multiplication, inversion, and QROM trace lookup. The discovered circuit changes the representation of the running product, chooses factor orders adapted to repeated updates, reuses partial loop products, and reads the seven-valued trace directly from group coordinates.

Figure 6

Figure 6: Cyclicity and inversion invariance of the real trace allow loop representatives to be reordered so that neighboring products share long path segments.

These changes reduce each running-product update from 146 to 35 Toffolis and reduce the complete circuit from 1.3 million to 170,000 Toffolis. Peak qubits decrease from 1,927 to 1,859, and QQ4-cost decreases by QQ5. The result illustrates a broader point: in nonabelian circuits, representation and traversal order can matter more than local optimization of a fixed multiplication routine.

Cross-task results

The principal quantitative results are summarized below.

Task Baseline QQ6 Discovered QQ7 Reported QQ8 gain
Reed–Solomon DQI decoder QQ9 TT0 TT1
Hermitian DQI decoder TT2 TT3 —
HHL rotation angle TT4 TT5 TT6
Coulomb potential TT7 TT8 TT9
Fixed-point Gaussian QQ0 QQ1 QQ2
QQ3 alias–Select QQ4 QQ5 QQ6
Nonabelian lattice gauge QQ7 QQ8 QQ9
Prime-field point addition no single baseline 3n2+17n−23n^2+17n-20 —

In seven of eight tasks, the discovered circuit reduces both Toffoli count and qubit count relative to the selected baseline. The eighth task—prime-field modular inversion—produces a new reversible architecture rather than a direct improvement against one baseline. The Hermitian-code comparison is numerically the most extreme, but it also has the weakest baseline status because the reference is a naive reversible compilation rather than an established prior circuit.

Limitations and open questions

The 3n2+17n−23n^2+17n-21 objective weights Toffolis and qubits equally, although the relevant bottleneck may instead be Toffoli depth, magic-state throughput, active volume, routing, measurement latency, or fault-tolerant architecture. Several reported circuits use bounded failure probabilities and input distributions; their resource advantages therefore do not automatically transfer to worst-case exact computation or to a different application distribution.

The task interface fixes the computational-basis encoding and excludes transformations whose benefit comes from changing the representation itself, such as coset encodings for modular arithmetic. The evaluator’s statistical correctness guarantees also depend on candidates being fixed before test samples are drawn and on the specified distribution over inputs and measurement records. More generally, the paper leaves open how search quality changes when the evaluator includes depth, connectivity, logical error rates, code-deformation costs, or architecture-specific magic-state supply.

A further open question is whether the LLM can reliably discover and verify invariants of the kind used in the divstep and BM constructions outside domains with compact classical trajectory evaluators. The reported results establish that such discoveries can occur under the present interface; they do not establish that the search will scale to arbitrary reversible algorithms or that its output will remain interpretable without substantial mathematical reconstruction.

Conclusion

The paper demonstrates that evaluator-guided LLM evolution can discover reversible quantum circuits whose improvements arise from algorithmic redesign rather than gate-level simplification. Across decoding, modular arithmetic, numerical approximation, quantum chemistry, and lattice-gauge simulation, the strongest results combine conditional routing, reachable-state history recovery, distribution-aware resource truncation, and application-specific representations.

The quantitative evidence is substantial: 3n2+17n−23n^2+17n-22–3n2+17n−23n^2+17n-23 reductions in 3n2+17n−23n^2+17n-24-cost for seven benchmarked tasks, a 3n2+17n−23n^2+17n-25 reduction for the Hermitian-code comparison against a naive reversible baseline, and a new divstep architecture using 935 qubits for a complete 256-bit point adder. The main contribution is consequently methodological and architectural: reversible quantum compilation can be treated as a constrained search over algorithms, representations, and uncomputation strategies, provided that correctness and resource usage are exposed through an independent evaluator.

Whiteboard

Explain it Like I'm 14

1. What is this paper about?

This paper explores whether LLMs—the technology behind chatbots—can help invent better quantum computer circuits.

Quantum computers use special circuits made from quantum gates. These circuits must do calculations in a way that can be undone, or reversed. This makes quantum programming much harder than ordinary programming.

The researchers created a system in which:

  1. An LLM suggests a possible quantum circuit.
  2. A separate computer program checks whether the circuit is correct.
  3. The program measures how many gates and qubits the circuit uses.
  4. The LLM receives this feedback and tries to improve its design.

The goal was to discover quantum circuits that are smaller, cheaper, and more practical than existing designs.

2. What questions did the researchers ask?

The main research questions were:

  • Can an LLM invent new quantum algorithms instead of merely making small changes to known circuits?
  • Can the LLM find ways to reduce both:
    • the number of expensive operations, and
    • the number of qubits needed?
  • Can this method solve different kinds of problems, such as:
    • error correction,
    • chemistry,
    • optimization,
    • physics simulations, and
    • number theory?
  • Can the LLM discover completely new ways to make ordinary algorithms reversible?

A particularly important challenge was reversibility. In a normal computer, temporary information can simply be erased. In a quantum computer, information cannot be thrown away carelessly. Temporary results must be cleaned up without disturbing the rest of the calculation.

3. How did the researchers conduct the study?

The LLM-and-evaluator system

The researchers gave the LLM a description of a task, but not instructions for how to solve it. The LLM then proposed a circuit written using a high-level Python-like programming interface.

An independent evaluator tested each proposal. It checked:

  • whether the circuit gave the correct answer,
  • whether temporary qubits were properly cleared,
  • how many important gates it used, and
  • how many qubits were needed at the same time.

This is similar to asking a student to invent a solution, then using a strict teacher and stopwatch to check both correctness and efficiency.

The researchers used an evolutionary search. This means they created many different ideas, improved promising ones, and allowed useful ideas from one group of solutions to be shared with another group.

How circuit cost was measured

Two main resources were counted:

  • Toffoli gates: Important quantum gates that are expensive to perform. Fewer Toffoli gates usually means less work and a faster or simpler computation.
  • Qubits: The quantum version of computer bits. Fewer qubits means the computer needs less physical space and hardware.

The researchers combined these numbers into a score called the TQTQ-cost:

TQ-cost=Toffoli count×number of qubits.TQ\text{-cost} = \text{Toffoli count} \times \text{number of qubits}.

This score rewards circuits that use fewer gates and fewer qubits.

The eight test problems

The system was tested on eight different tasks, including:

  • Reed–Solomon error decoding,
  • quantum chemistry calculations,
  • quantum simulations,
  • numerical functions, and
  • modular inversion, which means finding a number that behaves like a division result under a certain mathematical rule.

Because directly simulating large quantum systems can be extremely difficult, the evaluator tested the circuits on ordinary input patterns and tracked how the circuit changed them. This worked because the circuits studied were designed to transform basic bit patterns without creating complicated mixtures of possibilities during testing.

4. What were the main findings?

The circuits were usually much more efficient

In seven out of eight tasks, the discovered circuits used fewer Toffoli gates and fewer qubits than the previous designs.

Some improvements were especially large:

Task Approximate improvement in combined TQTQ-cost
Reed–Solomon decoding 12 times better
HHL rotation-angle calculation 32 times better
Fixed-point Gaussian calculation 39 times better
Coulomb potential calculation 9.9 times better
Molecular simulation task 4.1 times better
Lattice-gauge simulation 7.7 times better

These results suggest that the LLM was doing more than rearranging gates. It was finding better overall strategies for carrying out the calculations.

Finding 1: Route data instead of controlling many calculations

Suppose a program must choose between two calculations. A simple quantum version might build two separate controlled calculations—one for each choice.

The discovered circuits often used a smarter method:

  1. Move the needed data into the correct position.
  2. Perform one shared calculation.
  3. Move the data back.

This is like using one expensive machine and sending different materials through it, instead of buying two machines and switching between them.

This approach can greatly reduce the number of expensive gates.

Finding 2: Recover information instead of storing everything

Quantum calculations must often be undone. A straightforward method is to save every decision made during the calculation, like keeping a complete diary.

However, that diary can require many extra qubits.

The discovered circuits found ways to reconstruct past decisions from the current data. For example, certain bits or patterns in the current registers revealed which path the calculation had taken.

This is similar to figuring out which route someone took by looking at footprints, rather than having them write down every step.

This idea was especially useful for modular inversion, where the researchers used a version of the Euclidean algorithm called divsteps. The new design could recover many earlier choices from the current state instead of storing them all.

Finding 3: Ignore extremely rare difficult cases

Quantum algorithms often allow a very small chance of failure. The researchers used this small “failure budget” to avoid designing the circuit for unusually difficult inputs that almost never occur.

For example:

  • A Reed–Solomon decoder might normally need space for up to 35 stored decisions.
  • But under the expected input distribution, needing more than one stored decision was extremely rare.
  • The researchers therefore designed the circuit for the common cases and accepted a tiny failure probability for rare cases.

In the modular inversion circuit, the design allowed failure for only about:

  • 2.4×10−62.4 \times 10^{-6} of inputs because of history-stack overflow, and
  • about 10−510^{-5} of inputs because of unusual stopping times.

This saved many qubits while keeping the failure chance very small.

A new approach to modular inversion

One of the most important results was a new reversible design for prime-field modular inversion.

The researchers made the classical divsteps algorithm practical for a quantum computer. Their complete benchmark circuit used approximately:

  • 4.0 million Toffoli gates, and
  • 935 qubits.

The important achievement was not only improving an existing circuit. The LLM helped discover a new architecture for making the algorithm reversible.

5. Why are these results important?

Quantum computers are still difficult to build. Every extra gate can increase the chance of errors, and every additional qubit requires more hardware and error correction.

Therefore, reducing the number of gates and qubits can make quantum algorithms:

  • more reliable,
  • faster,
  • less expensive to run, and
  • easier to implement on real quantum hardware.

The paper also shows that improving a quantum algorithm is not always about simplifying individual gates. Sometimes the best improvement comes from changing:

  • how information is stored,
  • how different cases are handled,
  • how temporary information is erased, and
  • which rare situations the circuit needs to support.

In other words, the best quantum circuit may require redesigning the whole algorithm, not just polishing its parts.

6. What could this research lead to?

This research suggests that LLMs could become useful partners for discovering new quantum algorithms. They may be able to explore many possible designs faster than human researchers working alone.

In the future, similar systems might help design:

  • quantum error-correction methods,
  • better quantum computer hardware,
  • more efficient chemistry and materials simulations,
  • improved methods for optimization, and
  • complete quantum computing systems that are designed together from the algorithm level down to the hardware level.

However, the method has limits. Its success depends on having:

  • a clear description of the task,
  • a reliable way to test correctness,
  • a useful way to measure cost, and
  • assumptions about which inputs and errors matter.

The researchers also used the product of gate count and qubit count as their main score. A real quantum computer might care more about other factors, such as circuit depth, communication between qubits, or the difficulty of correcting errors.

Overall, the paper shows that LLMs guided by strict computer testing can discover genuinely new and more efficient quantum circuit designs. This could help turn future quantum computers from experimental machines into useful tools.

Practical Applications

Immediate Applications

  • Quantum software compilation and optimization (software, quantum computing): Integrate the evaluator-guided LLM workflow into quantum-compilation pipelines to generate and compare reversible implementations of arithmetic, decoding, simulation, and optimization subroutines. The reported reductions—up to roughly 39×39\times in TQTQ cost for some benchmarks—could reduce logical-gate workloads and qubit footprints for near-term fault-tolerant designs. Dependencies: The task must have a precise reversible specification, candidates must be cheaply simulable or verifiable, and the objective should reflect the target hardware rather than relying exclusively on TQTQ.
  • Resource estimation for fault-tolerant quantum algorithms (quantum hardware and architecture): Use the discovered circuits as lower-cost resource-estimation components for algorithms involving Reed–Solomon decoding, HHL-style rotations, Coulomb potentials, Gaussian functions, chemistry, lattice-gauge simulation, and modular inversion. More realistic estimates of Toffoli counts and logical qubits can improve decisions about processor size, execution time, magic-state factories, and error-correction overhead. Dependencies: Toffoli count and peak qubits are proxies; actual performance also depends on circuit depth, connectivity, routing, measurement latency, error-correction code, and non-Clifford-state production.
  • Reversible Reed–Solomon decoding for quantum optimization (optimization, coding, quantum algorithms): Deploy the Berlekamp–Massey-based reversible decoder in decoded quantum interferometry (DQI) and related quantum optimization workflows. The design reduces the reported Reed–Solomon decoder cost from approximately (5.1×106,1,938)(5.1\times10^6,1{,}938) to (4.4×105,1,837)(4.4\times10^5,1{,}837) in Toffolis and qubits, respectively. Dependencies: The improvement is tied to the specified syndrome structure, field representation, input distribution, and the permitted failure probability. Applications requiring worst-case correctness may need the full history stack and therefore incur higher qubit costs.
  • Lower-cost coherent modular inversion (cryptography, number theory, quantum algorithms): Use the reversible divstep construction as a modular-inversion primitive in quantum algorithms involving finite-field arithmetic, quantum walks, hidden-structure problems, Gauss-sum calculations, and cryptographic analysis. The benchmark circuit uses approximately 4 million Toffolis and 935 qubits while avoiding a large explicit branch-history stack. Dependencies: The circuit assumes prime-field inversion, bounded failure probability, and a particular stopping-time window and history-stack capacity. It must be revalidated for different modulus sizes, input distributions, and worst-case requirements.
  • Hardware-aware quantum circuit search (quantum-computing industry): Replace the paper’s TQTQ objective with hardware-specific scoring functions that include logical depth, two-qubit error rates, connectivity, routing overhead, measurement cost, parallelism, and magic-state consumption. This would allow quantum-computing companies to use the LLM/evaluator loop as an automated co-design tool for processor-specific arithmetic libraries. Dependencies: The evaluator must accurately model the target architecture; optimizing an abstract gate metric may produce circuits that perform poorly after hardware mapping.
  • Automated verification of reversible subroutines (formal methods, quantum software): Use the paper’s basis-state evaluator to test candidate circuits for correct input/output behavior, ancilla cleanup, phase correctness, and measurement-record independence. This can support regression testing for quantum libraries and provide a practical screening layer before expensive formal verification or hardware execution. Dependencies: Basis-state testing is especially effective for the paper’s restricted circuit model, where operations preserve computational-basis states up to phase. General quantum circuits that create broad superpositions may require different verification methods.
  • Design-pattern library for reversible algorithms (academia and industry): Convert the three recurring principles into reusable engineering patterns:
    • replace multiple controlled arithmetic blocks with conditional routing around one shared kernel;
    • recover branch history from state invariants during uncomputation;
    • localize expensive rare cases and use a declared failure budget.

These patterns can guide manual design of arithmetic, decoders, quantum-read-only memory routines, and simulation kernels. Dependencies: Conditional routing is useful only when branch outputs can be represented through a common canonical form; history decoding requires provable invariants; bounded-error methods require an application-level error budget.

  • Teaching and research infrastructure for quantum algorithm design (academia): Adopt the framework as a laboratory platform in courses and research groups studying reversible computation, quantum compilation, formal verification, or LLM-assisted scientific discovery. Students and researchers could specify a function, implement an evaluator, generate algorithm families, and analyze the resulting trade-offs. Dependencies: Reproducibility requires access to the model, prompts, evaluator, circuit interface, random seeds, and complete benchmark specifications. LLM-generated mathematical reasoning still requires independent proof and testing.
  • Bounded-error resource allocation in quantum workflows (quantum applications): Apply the paper’s statistical approach to allocate ancillas and iteration budgets according to an input distribution rather than the absolute worst case. For example, the modular-inversion circuit reserves resources for typical divstep paths and accepts failure probabilities on rare stopping times or stack overflows. Dependencies: The input distribution must be known or defensible, failures must be detectable or safely incorporated into the larger algorithm, and accumulated failure across repeated subroutine calls must remain below the algorithm’s total error budget.

Long-Term Applications

  • End-to-end fault-tolerant quantum co-design (quantum architecture): Extend the evaluator-guided search across the algorithm, reversible circuit, quantum error-correcting code, logical-gate set, magic-state supply, and physical execution architecture. Instead of optimizing a circuit in isolation, the system could search for designs that minimize total runtime, physical-qubit count, logical error, or energy consumption. Dependencies: This requires scalable simulators and evaluators capable of propagating logical errors, scheduling constraints, decoding costs, and hardware resource demands across abstraction layers.
  • New quantum algorithms rather than circuit-level optimizations (quantum algorithms and theory): Use LLM search to discover alternative classical algorithms, data representations, and reversible architectures jointly. The paper suggests that efficient classical algorithms can become impractical when naively made reversible; future searches could identify algorithms whose structure is inherently favorable for coherent execution. Dependencies: Candidate correctness may be difficult to evaluate for algorithms involving superpositions, interference, amplitude estimation, or non-basis-preserving operations. The framework will need stronger symbolic, numerical, and formal validation.
  • Quantum chemistry and materials simulation (chemistry, materials science): Apply the discovered co-design principles to arithmetic for molecular Hamiltonians, Coulomb potentials, Gaussian basis functions, alias sampling, and lattice-gauge models. Lower-cost function evaluation could reduce the logical resources required for electronic-structure and materials calculations. Dependencies: Practical benefit depends on the cost of the complete simulation algorithm, not only an individual primitive. State-preparation, amplitude amplification, Hamiltonian encoding, fault tolerance, and precision requirements may dominate.
  • Quantum-assisted optimization and decoding at scale (optimization, communications, coding): Generalize the reversible Reed–Solomon decoder to other error-correcting codes, constraint decoders, and algebraic optimization routines. This could support quantum versions of polynomial fitting, combinatorial search, signal reconstruction, and structured inference. Dependencies: The quantum speedup of the surrounding algorithm must be established, and the decoder’s failure probability must compose acceptably with interference-based computation. Code parameters and field sizes may substantially change the resource advantage.
  • Automated discovery of quantum memory and data-movement architectures (quantum memory, systems engineering): The conditional-routing principle could lead to new QROM, QRAM-like, and data-movement architectures in which data are routed through shared arithmetic or lookup kernels rather than duplicating controlled computation. Dependencies: Routing savings may be offset by swap networks, connectivity constraints, coherence time, and the physical difficulty of implementing quantum memory. The paper does not demonstrate a scalable hardware implementation of this idea.
  • Adaptive, distribution-aware quantum circuits (quantum control and applications): Develop circuits that dynamically balance computation, storage, and tolerated failure based on empirically characterized input distributions. The divstep cutoff illustrates a broader design space in which more Toffolis can reduce qubits, while a larger failure budget can reduce both. Dependencies: Adaptive behavior must preserve coherence and avoid leaking branch information. Distribution estimates must remain valid during deployment, and failure events may need detection, mitigation, or restart mechanisms.
  • LLM-generated formal proofs and certified circuit synthesis (formal verification): Combine LLM proposals with proof assistants, symbolic invariant discovery, exhaustive small-instance checks, and certificate-producing synthesis. The divstep example indicates that LLMs can help identify invariants, but certified workflows could turn these insights into machine-checkable correctness guarantees. Dependencies: A trusted proof kernel and complete specification are essential. Empirical testing alone cannot establish correctness for all input sizes, phase behavior, ancilla states, or measurement records.
  • General-purpose scientific algorithm discovery beyond quantum computing (academia and research software): The evaluator-guided pattern can be transferred to domains where candidates are easy to score: numerical kernels, combinatorial algorithms, compiler transformations, coding theory, and hardware scheduling. The central requirement is an automated evaluator that measures both correctness and practical cost. Dependencies: Search quality depends heavily on the expressiveness of the programming interface, diversity of initial algorithm families, evaluator reliability, and the ability to avoid reward hacking or overfitting to benchmark instances.
  • Fault-tolerant cryptographic and algebraic primitives (cryptography): Further develop the modular-inversion architecture for larger prime fields and integrate it with reversible multiplication, modular reduction, elliptic-curve arithmetic, and quantum cryptanalysis workflows. Similar invariant-based history recovery may reduce the overhead of other algebraic primitives. Dependencies: Security-sensitive applications require worst-case correctness, rigorous side-channel and fault analyses, and parameter-specific proofs. The paper’s bounded-error assumptions may not be acceptable for cryptographic computation without additional safeguards.
  • Quantum processors optimized for algorithmically discovered circuits (quantum hardware): Future processors could be designed around recurring structures found by automated search, such as efficient controlled swaps, measurement-based uncomputation, specialized arithmetic blocks, and low-cost routing. This would create a feedback loop between algorithm discovery and hardware architecture. Dependencies: Such specialization risks reducing hardware flexibility. It is worthwhile only if discovered circuit patterns remain stable across workloads and provide benefits after physical noise, calibration, routing, and manufacturing constraints are included.

Glossary

  • Ancilla: An auxiliary qubit used temporarily during a quantum computation. “A circuit may use aa ancilla qubits, but must return them to zero”
  • Berlekamp–Massey algorithm: An algorithm that finds the shortest linear recurrence generating a sequence, used here for decoding error-correcting codes. “Our search framework discovered a circuit that replaces their synchronized Euclidean solve with the Berlekamp--Massey (BM) recurrence.”
  • Basis-state trajectory: The evolution of a particular computational-basis input under a fixed sequence of measurement outcomes. “For a fixed computational-basis input and a particular sequence of measurement outcomes mm, we call the resulting evolution a computational-basis trajectory.”
  • Bounded error: A computational model in which failure is permitted for a limited fraction or probability of inputs. “At the same time, when bounded error is permitted, machinery needed only for rare or atypical inputs can sometimes be omitted”
  • Bucket-brigade QRAM: A quantum random-access memory architecture that routes data through a tree of controlled switches. “The idea resembles bucket-brigade quantum random-access memory (QRAM)”
  • Canonicalization: Transforming different representations into a common standard form so that the same computation can process them. “More generally, conditional routing requires canonicalizing branch-dependent states into a representation on which the same expensive computation applies.”
  • Computational-basis state: A quantum state corresponding to a definite classical bit string rather than a superposition. “By linearity, this coherent action is correct if the circuit performs the required map on every computational-basis input”
  • Conditional routing: Replacing multiple controlled computations with data movement that directs values through one shared computation. “One recurring principle in the circuits discovered by the search is to replace conditional arithmetic with conditional routing.”
  • Convolution: An operation combining two sequences by summing products of corresponding shifted elements. “BM solves for the lowest-degree nonzero polynomial whose convolution (see \cref{fig:rs-shared-update}(d)) with the syndrome sequence vanishes”
  • Decoded quantum interferometry (DQI): A quantum algorithm that uses error-correcting-code decoding and quantum interference to address optimization problems. “Decoded quantum interferometry (DQI) is a quantum algorithm that turns certain optimization problems into decoding problems for classical error-correcting codes”
  • Destructive XX-basis measurement: A measurement in the XX basis that consumes or releases the measured qubit. “MBU, introduced by \citet{gidney2018halving}, replaces the second Toffoli with a destructive XX-basis measurement and a cheap phase correction.”
  • Divstep: A division-free step in an extended Euclidean algorithm using conditional additions, subtractions, and halving. “Divsteps is a variant of the Euclidean algorithm that replaces division with conditional additions, subtractions, and halving”
  • Extended Euclidean algorithm: An algorithm that computes greatest common divisors while also finding coefficients expressing the divisor as a combination of the inputs. “A standard way to compute the inverse is through the extended Euclidean algorithm.”
  • Failure budget: The permitted probability or fraction of inputs on which a circuit may fail. “We separately allow some circuits to fail on a bounded fraction of inputs drawn from a stated distribution; this fraction is the failure budget.”
  • Fault-tolerant computation: Quantum computation designed to operate reliably despite physical errors through error correction and error-resistant logical operations. “These observations suggest that evaluator-guided LLM search can go beyond refining a fixed circuit to uncover new reversible algorithms and representations.”
  • Finite field: A set with finitely many elements supporting addition, subtraction, multiplication, and division by nonzero elements. “A central application is optimal polynomial intersection (OPI), a form of polynomial fitting over finite fields”
  • Global invariant: A property that remains true throughout an algorithm and can link current state information to earlier computation. “This recovery relies on a global invariant ensuring that earlier branch history cannot contaminate the deciding bit.”
  • History stack: Storage that records intermediate values or branch decisions so that a reversible computation can later be undone. “A na\"ive reversible implementation stores these displaced values so that the update can later be undone.”
  • Kickback: The transfer of a phase effect onto retained quantum data when an auxiliary qubit is measured or manipulated. “The operations apply phase kickback while mixing basis states, giving \kickmix{} its name.”
  • Locator polynomial: A polynomial whose roots identify the positions of errors in a Reed–Solomon codeword. “The LL error positions are encoded in a locator polynomial σ(z)=∑k=0Lσkzk\sigma(z)=\sum_{k=0}^{L}\sigma_kz^k, whose roots identify those positions.”
  • Measurement-based uncomputation (MBU): A method that clears temporary quantum data through measurement and phase correction instead of applying an inverse computation. “This allows candidate circuits to be tested for their action on coherent quantum superpositions, providing the reliable correctness signal needed for evolutionary search.”
  • Modular inversion: Finding the multiplicative inverse of a number within modular arithmetic. “Modular inversion is the task of finding xx such that wx≡1(modp)wx\equiv1\pmod p, given a nonzero input ww and a prime pp.”
  • Non-Clifford resource: A quantum-computing resource associated with gates outside the efficiently classically simulable Clifford group. “Toffoli gates require expensive non-Clifford resources”
  • Prime field: A finite field whose number of elements is prime. “In the eighth, the search discovers a new reversible architecture for prime-field modular inversion.”
  • Quantum random-access memory (QRAM): A memory system that allows quantum-controlled access to classically specified data. “quantum read-only memory (QROM), which coherently loads classically specified data into quantum registers”
  • Quantum read-only memory (QROM): A quantum circuit or memory structure that loads classical data coherently into quantum registers. “quantum read-only memory (QROM), which coherently loads classically specified data into quantum registers”
  • Reed–Solomon code: An error-correcting code based on evaluations of polynomials over finite fields. “DQI requires this decoding to run coherently on a superposition of inputs, making the reversible decoder a dominant resource cost.”
  • Reversibility: The requirement that a computation preserve enough information to reconstruct its input and therefore be implemented by a reversible transformation. “Second, the computation must be reversible: intermediate information cannot simply be overwritten or discarded.”
  • Syndrome: An algebraic error-detection value derived from a received codeword. “The decoder identifies the positions and values of errors from a collection of algebraic checks called syndromes.”
  • Toffoli count: The number of Toffoli gates used by a quantum circuit, serving as a measure of computational cost. “Resource accounting is also simple: we use the Toffoli count TT and the peak qubit count QQ”
  • Uncomputation: Reversing temporary calculations to restore ancillary qubits and remove intermediate information. “During uncomputation, the circuit can simply read this bit to recover bjb_j.”
  • Superposition: A quantum state that simultaneously represents a linear combination of multiple basis states. “because the input may be in superposition, the circuit cannot inspect an intermediate value and select an ordinary classical control-flow path.”
  • TQTQ-cost: A circuit-cost metric obtained by multiplying Toffoli count by peak qubit count. “Together, these properties let us build an efficient, programmatic evaluator that checks the correctness and resource cost of any candidate circuit design.”
  • Trajectory: The state evolution associated with one input and one sequence of measurement outcomes. “Every measurement record therefore induces the same basis permutation”
  • Truth table: A tabular representation of a Boolean function’s outputs for every possible input combination. “we treat the decoding rule as a truth table mapping $2j$ input bits to a single bit bb”
  • Uncompute: To reverse a temporary calculation and restore its workspace to its initial state. “Temporary values must eventually be uncomputed, returning their qubits to their initial state”
  • Unitary: A reversible quantum operation that preserves inner products and total probability. “Every ancilla must return to ∣0⟩\ket{0} because quantum operations must be unitary, and thus reversible.”

Open Problems

We found no open problems mentioned in this paper.

Tweets

Sign up for free to view the 19 tweets with 6604 likes about this paper.