Anthropic researchers, in collaboration with physicists from Harvard University and QuEra Computing, have demonstrated that large language models operating in automated feedback loops can optimize quantum computing circuits beyond human-designed baselines.
Led by STEM Fellow Andi Gu and mentor Alek Kemeny at Anthropic, alongside Susanne Yelin and Mikhail Lukin at Harvard and QuEra, the team tasked Claude Mythos 5 with designing quantum circuits across eight computational primitives spanning chemistry simulation, discrete optimization, physics modeling, and number theory.
Operating in a closed loop with an automated programmatic evaluator, the model proposed implementations in Python, received correctness and cost feedback based on qubit and gate counts, and iteratively revised its designs. Over a single 53-hour autonomous run, the model discovered novel reversible arithmetic routines and redesigned circuit architectures, yielding reductions in quantum gate requirements by up to 17x.

The Reversibility Constraint in Quantum Circuit Design
Quantum algorithms face fundamental constraints absent in classical computing. Because quantum operations must preserve quantum state superpositions, computations must be strictly reversible: no intermediate data can be overwritten or discarded without corrupting the quantum state. To free up qubits, intermediate values must be systematically "uncomputed" by running the generating operations in reverse.
This requirement introduces a sharp trade-off between spatial resources (qubits) and temporal resources (quantum gate operations). A circuit can retain intermediate values in memory to avoid repeating computations, requiring substantial qubit overhead, or uncompute them immediately, multiplying the total gate count and circuit runtime.
Standard benchmarks like elliptic-curve point addition, which forms the core of Shor's discrete logarithm algorithm, rely heavily on modular inversion (finding an integer x such that ax = 1 mod p). While classical systems use the iterative divsteps algorithm efficiently, direct quantum translations previously required storing complete historical records of branch choices at each iteration to enable backward execution, demanding prohibitive qubit allocations.
Deriving Zero-History Reversible Divsteps
Rather than allocating qubits to record branch history, Claude identified that the operational branch data could be reconstructed directly from the numerical pairs at each step. After testing initial heuristics on small inputs, the model developed a theoretical foundation, proving several algebraic identities about the divsteps process to derive an exact decoding rule.
The model formally verified its mathematical claims using the Lean proof assistant and implemented the first reversible divsteps circuit requiring no stored branch history.
By adjusting the trade-off threshold between active decoding and temporary storage, the research team mapped a new Pareto frontier for elliptic-curve point addition:
- Gate count reduction: One configuration achieved a 17x reduction in gate count compared to previous minimal-qubit baselines, requiring only a 12% increase in qubits.
- Qubit efficiency: The zero-history implementation eliminated historical scratch registers entirely, expanding the available design space for fault-tolerant hardware.

12x Gate Reductions in Decoded Quantum Interferometry
The researchers also applied the closed-loop optimization setup to Decoded Quantum Interferometry (DQI), an algorithm designed to achieve superpolynomial quantum speedups on combinatorial optimization problems like Optimal Polynomial Intersection (OPI).
The primary computational bottleneck in DQI is syndrome decoding using Reed-Solomon decoders. Prior state-of-the-art designs by Google Quantum AI utilized the extended Euclidean algorithm, which requires variable iteration paths that must be padded with unneeded operations to execute across quantum superpositions.
Claude restructured the decoder through three architectural modifications:
- Algorithmic replacement: Replaced the variable-step extended Euclidean algorithm with Berlekamp-Massey decoding, which executes a fixed number of identical steps suited to quantum execution.
- State-based reconstruction: Reconstructed temporary values on demand rather than allocating static storage registers.
- Statistical resource provisioning: Ran a fast simulator over 403 million sample decodings to measure empirical worst-case memory requirements. The model determined that dedicating 19 qubits to store a single exceptional value maintained an error rate within acceptable task tolerances (approximately 1 failure in 10,000 runs), replacing a 665-qubit worst-case buffer.
Together, these adjustments reduced total gate requirements in the Reed-Solomon locator step by a factor of 12 relative to the Google Quantum AI baseline.
Automated Evaluation and Co-Design Implications
The research setup required no manual human intervention between optimization iterations beyond the initial specification and periodic prompts to explore broader candidate architectures. Programmatic evaluators scored proposed Python circuit definitions directly against formal correctness criteria and a composite metric multiplying qubit count by total Toffoli and elementary gate counts.
The authors note that while early iterations exhibited conservative tendencies (favoring minor adjustments to known designs), enforcing parallel exploration paths prompted structural algorithmic discoveries.
The findings suggest that automated LLM evaluation loops can extend beyond software compilation into full-stack quantum co-design, potentially optimizing error-correcting decoders, control pulses, and circuit layouts concurrently before fault-tolerant hardware reaches scale.









