Discovering Quantum Circuits with Large Language Models

This presentation explores how large language models can discover state-of-the-art reversible quantum circuits through evaluator-guided evolution. Rather than optimizing gate sequences, the approach searches over algorithmic designs—finding circuits that use 4 to 39 times fewer resources by redesigning computation patterns, exploiting reachable-state invariants, and adapting to input distributions. We examine breakthrough results in quantum decoding, modular arithmetic, and chemistry that demonstrate how AI-driven search can uncover circuit architectures human experts had not previously constructed.
Script
A reversible quantum circuit for decoding Reed Solomon codes once required 5 million Toffoli gates. A large language model just designed one that uses 440,000. This paper shows how artificial intelligence can discover quantum circuits by evolving algorithmic programs rather than rewriting gates, turning circuit design into a search problem guided by an independent correctness evaluator.
The authors represent circuits as Python programs with loops, subroutines, and named registers, rather than flat gate lists. A programmatic evaluator tracks computational-basis trajectories to verify not just output bits but also phase correctness and ancilla cleanliness. This representation lets one conceptual change propagate coherently across the entire circuit.
The framework evolves circuits in a 2 dimensional resource space where T counts Toffoli gates and Q measures peak qubit usage. MAP Elites preserves designs at different points on this frontier, so a high Toffoli but low qubit solution survives alongside its inverse. Independent algorithm families exchange strong candidates periodically, preventing premature convergence.
Three design principles recur across the discovered circuits. Conditional swaps route data into shared arithmetic kernels, replacing expensive controlled operations. Reachable state invariants let the circuit reconstruct branch history from current registers during uncomputation, eliminating explicit storage. Failure budgets confine worst case resources to rare inputs, which are then truncated under a bounded error probability.
For decoded quantum interferometry, the search replaced a synchronized Euclidean algorithm with Berlekamp Massey, then eliminated history storage by rescaling updates so both branches share one arithmetic path. It contracted the decoded error word directly into a phase parity and truncated coefficient ranges based on input distribution. The Reed Solomon decoder dropped from 5.1 million Toffolis and 1,938 qubits to 440,000 Toffolis and 1,837 qubits, a 12 fold reduction in cost.
The strongest result targets elliptic curve point addition, where the system discovered a reversible divstep architecture that reconstructs branch decisions from arithmetic state rather than storing them. The resulting 256 bit modular inversion uses only 935 qubits, opening a new region of the resource frontier that classical algorithm designers had considered inaccessible. You can explore the full technical details and create your own research videos at EmergentMind.com.