The cost of running quantum algorithms just dropped significantly, thanks to an AI that rediscovered efficiency tricks from 1980. On October 15, 2026, a team from Harvard and Anthropic published a preprint demonstrating that an LLM, working in a closed loop with an automated evaluator, redesigned eight quantum circuits. For elliptic-curve point additionβa critical component for quantum attacks on cryptographyβthe new design uses 17 times fewer Toffoli gates than the best previous published designs. This isn't just a theoretical win; itβs a practical optimization of the reversible logic that underpins fault-tolerant quantum computing.
The Return of the Toffoli Gate
To understand the impact, you have to look back at the primitives. In 1980, Tommaso Toffoli published a memo at MIT titled "Reversible Computing," introducing a three-bit switch now known as the Toffoli gate. It flips a target bit only if two control bits are both 1, and crucially, it can be run backward without losing information. Today, serious cost estimates for quantum algorithms are written in terms of Toffoli gates and qubits. The new paper, "Discovering state-of-the-art quantum circuits with large language models," shows that Claude Mythos 5 can navigate this space better than human researchers have in years, finding designs that minimize the product of Toffoli count and peak qubit count (TQ-cost).
How the AI Loop Worked
The methodology was rigorous. Each task started with a plain-language specification and a blank program. Claude proposed distinct "algorithm families" in parallel, which were then evaluated by an independent checker that verified outputs, input preservation, and scratch qubit cleanliness. The search ran on OpenEvolve, an open-source evolutionary coding agent. For the elliptic-curve task, the AI spent 53 hours iterating. It didn't just guess; it proved new algebraic identities and formalized claims in Lean, a proof assistant. The AI consistently chose to "decode" branch decisions from live registers rather than storing them, saving valuable qubits.
Real Numbers, Real Savings
The results are stark. For the Reed-Solomon decoder, the AI cut the core step from roughly 1.9 million Toffolis to 140,000 by switching algorithms from Euclidean to Berlekamp-Massey. In the fixed-point Gaussian task, it achieved a 39x gain in TQ-cost. For elliptic-curve point addition, the new "divstep" circuit uses 4.0 million Toffolis compared to 70 million in the previous best design (Luo et al., 2026), albeit with 12% more qubits. This tradeoff highlights the importance of the TQ metric: sometimes spending a few more qubits is worth the massive reduction in expensive gate operations.
Caveats for the Builder
Before you start selling shares in quantum startups, keep these risks in view. These are resource estimates from classical simulators; no quantum processor has run these specific optimized circuits yet. The paper is a preprint, and independent reproduction is pending. Furthermore, the TQ-cost metric weights time and space equally, which may not match all future hardware architectures. Anthropic notes that Claude was "conservative by nature," requiring prompts to think more broadly. The crypto implications are real but distant: cheaper point addition lowers the bar for future quantum attacks on ECDSA, but NIST post-quantum standards like ML-KEM remain the immediate priority for migration.
Key Takeaways
- AI-driven search in reversible logic is yielding massive efficiency gains, up to 17x on gate counts.
- The technique relies on closed-loop evaluation with strict correctness checkers for scratch bits and inputs.
- Toffoli gate count remains the primary cost driver for fault-tolerant quantum algorithms.
- Independent verification of these circuit designs and proofs is still required before hardware deployment.
The Bottom Line
This is a clear signal that AI is becoming a critical tool for quantum infrastructure optimization. If you're building quantum software, stop hand-tuning circuits and start letting LLMs search the design space against a rigorous evaluator.