Claude cut a quantum circuit’s gate count 17x in 53 hours

Claude Mythos 5, working in an automated design loop, found quantum circuits that need fewer qubits and fewer Toffoli gates than the previous state of the art in seven of eight tasks. Anthropic described the results in an October 16 Anthropic research post. The eighth task, elliptic-curve point addition, produced something else: a new way to do modular inversion that offers qubit and gate trade-offs no earlier design reached.
Andi Gu led the work as part of Anthropic’s STEM Fellows Program. Alek Kemeny, a quantum physicist at Anthropic, mentored it, and Susanne Yelin of Harvard and Mikhail Lukin of Harvard and QuEra Computing collaborated. The tasks cover chemistry, optimization, physics simulation, number theory and numerical computing. Compare that with the usual pace of this work. Estimates for simulating FeMoco, the iron-sulfur cluster bacteria use to fix nitrogen, fell from about 50 trillion Toffoli gates in 2017 to about 340 million, a roughly 150,000-fold drop that came mostly from circuit redesign. That drop took many research groups eight years, and each step typically took months. Claude’s elliptic-curve design came out of one 53-hour run.
How the loop works
Claude writes each circuit as a Python program. An evaluator checks whether the circuit is correct, which is cheap here because each input to these circuits has one definite output that an ordinary computer can verify. It then scores the design by qubits multiplied by gates, a rough proxy for runtime, and sends the result back. No human steps in between rounds. The paper says the search runs on OpenEvolve, with Claude Mythos 5 proposing architectures and program rewrites.
Two constraints make this harder than ordinary optimization. A quantum circuit runs on a superposition of inputs, so it can’t take just one branch of an if-then: it has to include the operations for both. It also can’t throw scratch work away. Every step must be reversible, so intermediate results either stay in memory, which costs qubits, or get “uncomputed” by running their steps backward, which costs gates.
Anthropic says the gains came from structural insights, not from fine-tuning existing designs. In one iron-sulfide circuit, Claude saw that the molecule’s symmetries let some results be computed once and reused. In other tasks, it removed expensive components that existed only to handle extremely rare inputs. Quantum Computing Report lists three principles that kept coming up in the search. The first is routing data through one shared arithmetic block with cheap controlled swaps. The second is decoding branch choices from the evolving state instead of keeping history stacks. The third is sizing circuits for typical inputs and accepting a failure rate of about 10<sup></sup>-4 to save hundreds of helper qubits. The same report puts the paper’s cost reductions at 4.1x to over 9,100x relative to hand-crafted baselines.
The model needed steering. “Claude was conservative by nature,” the post says: it double- and triple-checked results that were already well supported, and it preferred well-known approaches. So the setup made it develop several qualitatively different approaches in parallel, and the researchers occasionally prompted it to search more broadly. For point addition, those prompts and a one-paragraph brief were the only human input.
Inversion without the full history
Point addition is the core step in quantum algorithms for the elliptic-curve discrete logarithm. Most of its cost sits in modular inversion: given a, find x such that ax ≡ 1 (mod p). Classical code does this efficiently with divsteps, which takes a pair of numbers and, over many rounds, conditionally swaps, adds, subtracts or halves them. A reversible version has to remember which operation it chose in each round. Storing that branch record for every round takes an enormous number of qubits, and that is why divsteps had not produced a practical quantum circuit.
Claude’s idea was to recover each branch choice from the pair of numbers itself. Its first simple decoding rules worked on small cases and failed on 256-bit numbers. It then worked through the mathematics of the iteration and proved several new algebraic identities. From those it derived an exact decoding formula, which it checked first with large numerical simulations and then in Lean.
Decoding saves qubits but costs gates, so Claude also varied the point at which the circuit switches from decoding to storing branches. The result is a family of designs. The scored circuit stores the first five branches, which cuts its history stack from 198 to 60 qubits. Against the smallest previous design, by Luo et al., it uses 12% more qubits and 17x fewer Toffolis.
A 12x cheaper decoder for DQI
The second highlighted result targets decoded quantum interferometry (DQI), an optimization algorithm the post calls one of the strongest candidates for a superpolynomial speedup. DQI’s most expensive step is an error-correcting decoder. On the benchmark problem, optimal polynomial intersection, that decoder is a Reed–Solomon decoder. The post cites estimates by Google Quantum AI that imply one such problem would take about three months on the Frontier supercomputer and roughly an hour on a future quantum computer running DQI, with most of that hour spent decoding.
The previous circuit used the extended Euclidean algorithm, whose number and order of steps depend on the input. A quantum version therefore has to pad every run to the worst case. Claude switched to Berlekamp–Massey decoding, which runs the same kind of step for a fixed number of rounds. A naive reversible version would still store a 12-qubit record every round, 840 qubits in total. Claude reconstructs most of those values from the current state instead.
A few exceptional values can’t be reconstructed. Reserving space for the worst case, with exceptions in 35 rounds, would take 665 qubits. Claude wrote its own simulator and ran 403 million sample decodings. Almost every run needed to save one value at most, so the circuit reserves 19 qubits for a single value. About one run in 10,000 fails, which is within the error rate the task allows.
Compared with Google’s earlier construction, the Toffoli count drops 12x and the qubit count 5.2%. Quantum Computing Report gives the figures as 5.1 × 10<sup></sup>6 Toffolis on 1,938 qubits before and 4.4 × 10<sup></sup>5 on 1,837 after.
Our analysis
What we checked
On October 18 we read the paper and its supplementary material, including the notes on the Lean proof. We also ran the released evaluator on two small tasks and recomputed the point-addition ratios.
Anthropic’s post says Claude beat the best published designs on all eight tasks, but the paper claims seven. One of those seven baselines, Hermitian DQI, is marked in the paper as a “naïve reversible implementation; no prior reversible compilation exists in the literature.” Point addition gives a new trade-off rather than a strict win. Against Schrottenloher’s design, Claude’s circuit uses 35% fewer qubits but 2.11x as many Toffolis, and its qubit-times-Toffoli score is 1.37x worse. The 17x figure is measured against Luo et al.
| Point addition | Toffolis | Qubits | Toffolis × qubits |
|---|---|---|---|
| Schrottenloher (2026) | 1.9·10^6 | 1,446 | 2.7·10^9 |
| Claude’s divstep circuit | 4.0·10^6 | 935 | 3.7·10^9 |
| Luo et al. (2026) | 7.0·10^7 | 838 | 5.8·10^10 |
- The paper calls this the first reversible divstep circuit “over a prime field.” Reversible divsteps already existed for binary fields and polynomial rings.
- The Lean proof covers termination within 590 iterations and branch recovery. It does not formalize the full circuit or its resource count. The circuit schedules 533 steps and charges the rare longer runs to its failure budget.
- The 53-hour figure appears in the post, not in the paper.
- The evaluator reproduced the paper’s numbers. On hhl-angle it returned 1,348 Toffolis on 115 qubits, against a baseline of 16,468 on 300, with no wrong results in 8,741 shots. On coulomb-potential it returned 1,140 on 142, against 6,355 on 252. Each run took 4-7 seconds on one CPU. We didn’t simulate point addition, which takes tens of hours, but its logged result of 4,006,673 Toffolis on 935 qubits matches the paper.
Up next
Claude traced NIST curve seeds to 1990s Unix timestamps
“It’s just timestamps.” Claude traced the NSA-supplied seed of the NIST P-256 curve to a 1990s C random generator started from a 1997 Unix clock, in under half an hour. Would you trust a curve more for a provable seed or for a long track record?
Related stories
- Claude designed 211 protein binders, 17 passed the lab
- METR estimates Anthropic now progresses about 2x faster
- Anthropic’s FlashProve proves Llama 4 Maverick at 110 tok/s
- Claude gave up its sandbox binary and process memory
- Claude model’s Linux exploit gets root over multipath TCP
- Claude grades its own chats for misuse at under 2% compute
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

