Models & Research

Quantum circuits with Claude: eight primitives, every one better than the best published design

3 min read AI-generated

Claude spent 53 hours on a single task and ended up proving new algebraic identities in Lean.

Featured image for "Quantum circuits with Claude: eight primitives, every one better than the best published design"

Today’s quantum computers have a few hundred to a few thousand qubits. That is far too few for the algorithms people want to run on them. Most of the progress in recent years has come from better circuits rather than better hardware: for the standard example FeMoco, the iron-sulfur cluster in nitrogenase, the estimated Toffoli gate count fell from roughly 50 trillion in 2017 to about 340 million. On October 16 Anthropic showed that Claude can do that work.

Eight tasks, an evaluator, nobody in between

The setup is plain. Claude gets a task described in ordinary language, writes a circuit as Python code and hands it to an evaluator program. The evaluator checks whether the circuit computes the right thing and scores it: qubits multiplied by gates. Claude takes the score and tries again. No human sits between the rounds.

Eight primitives from chemistry, optimization, physics simulation, number theory and numerics went through this loop, using Claude Mythos 5. In all eight, the designs that came out need fewer qubits and fewer gates than the best previously published work. The gains did not come from polishing. Each time, Claude found a mathematical property of the problem that nobody had exploited.

53 hours on modular inversion

The first and hardest task was elliptic-curve point addition, the field’s standard benchmark. Its cost driver is modular inversion. Classical computers handle it with divsteps, a method that simplifies a pair of numbers over many rounds while recording which operation it picked each round.

That record is the problem in a quantum circuit. Nothing may be thrown away, because every step has to be reversible. A naive quantum version of divsteps therefore drags the whole history along and pays for it in qubits.

Claude’s idea was to not store the record at all and instead recompute it from the number pair after each round. Its first guessed decoding rules worked on small cases and failed at the full 256-bit size. So Claude went the theoretical route: it proved several new algebraic identities about the iteration, derived an exact decoding formula from them, and formalized the claim in Lean. After 53 hours it had the first reversible divsteps implementation with no stored branch history.

Trading storage against recomputation then produced a whole family of designs. One of them uses 12% more qubits than the smallest previous circuit and 17x fewer gates. In the second worked example, the decoder inside Decoded Quantum Interferometry, the algorithm’s most expensive step got roughly twelve times cheaper.

The bottleneck sits in the design, not only in the hardware

What convinces me here is the loop itself. Quantum circuits can be written as code, checked mechanically for correctness, and scored with a single number that should go down. Under those conditions Claude needs no human grading each round. Plenty of problems do not look like that, and the result should not be stretched past its edges.

The practical reading still holds. Faster circuit design brings useful quantum applications closer without adding a single qubit. The work was led by Andi Gu in Anthropic’s STEM Fellows Program with Alek Kemeny, alongside Susanne Yelin and Mikhail Lukin of Harvard, and the paper is on arXiv.

Claude is having a run with elliptic curves this week. The other half of it is the origin of the NIST curve seeds, published the same day.

Sources

AnthropicClaudeResearchQuantum ComputingMythos