Conceptio › Archive › arXiv CS
arXiv CS open access

Discovering formally verified quantum programs with AI

Sergey Shirobokov et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
artificial-intelligenceknowledge-representationreasoning
The timeline by which quantum computers can solve breakthrough problems in science depends on improved quantum algorithms as much as on better hardware. Such algorithmic advances are typically achieved through many years of expert human collaboration. In mathematics and computer science, large langu
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

Discovering formally verified quantum programs with AI

arXiv:2611.09822v1 [quant-ph] 6 Nov 2026

Sergey Shirobokov1,∗,† , Ben Jaderberg1,∗,† , Katerina Hristova‡,∗ , George Tsoukalas1,∗ , Johannes Bausch1,∗ , Eric Wieser 1 , Francisco J.H. Heras1 , Nicholas C. Rubin2 , Guang Hao Low2 , Sébastien Racanière1 , Nenad Tomašev1 , Lei M. Zhang1 , James Watson2 , Tanuj Khattar2 , Aws Albarghouthi‡ , Stavan Jain‡ , Harun Khan1 , Leopoldo Sarra1 , Andrew W. Senior1 , Michael Broughton2 , Hussain Masoom1 , Sergio Boixo2 , Ryan Babbush2 , Swarat Chaudhuri1 , and Pushmeet Kohli1 1 Google DeepMind

2 Google Quantum AI

November 9, 2026

The timeline by which quantum computers can solve breakthrough problems in science depends on improved quantum algorithms as much as on better hardware.1,2 Such algorithmic advances are typically achieved through many years of expert human collaboration.3,4 In mathematics and computer science, large language models have accelerated progress through automated discovery loops.5,6 However, quantum algorithms can only be evaluated by classical computers on restricted or small instances.7,8 Here we demonstrate automated discovery of quantum programs beyond these regimes including order-of-magnitude improvements on scientific applications. To achieve this, we build a quantum program library in the Lean theorem prover in which large language model agents synthesize novel programs against formal problem specifications and verify their correctness and cost. Agent teams collaborate, sharing results and knowledge through wikis and discussing ideas at organized conferences. Our results improve on prior baselines for parallel search9 (up to 1.4×), quantum arithmetic10 (290×), and simulations relevant to fusion, photochemistry and drugmetabolism by 11×, 8× and 2.5× respectively. Combining human and artificial intelligence at scale, under the rigor of mathematical proof, lets researchers design algorithms that today’s classical and quantum computers cannot test, shortening the path to practical quantum computation. Quantum computers promise to tackle problems beyond classical reach across cryptanalysis,11 optimization,12 chemistry and drug discovery,13–15 materials science,16,17 and high-energy and plasma physics.18–20 Many of the most promising applications are estimated to require a device with thousands of error-corrected (logical) qubits executing 109 to 1015 logical operations,1,21 well beyond the roughly one million operations projected for early fault-tolerant processors.2 Beyond improvements in hardware and quantum error correction to build better logical qubits from noisy physical qubits,22 closing this gap relies on cumulative algorithmic resource reductions that lower qubit and gate counts.23–27 Historically, such reductions take sustained scientific effort over many years.3,4 Artificial intelligence (AI) offers a promising route to accelerate these improvements. Traditional machine learning has already been successfully applied to e.g. quantum hardware control,28–30 error-correction decoding,31 ∗ Equal contributions.

† Corresponding authors: shirobokov@google.com, benjaderberg@google.com.

‡ These authors performed this work as research consultants on assignment at Google.

1

a) Discovery workflow

b) Research approaches and problems we consider Human research

Verified

Shared wiki

solution + cost

best solutions, ideas, dead ends

+ AI + numerical tests Formal quantum computation

pass

QHL

pass

Independent verification Lean comparator

Lean kernel

+ AI + Lean proofs (this work) seed

Classical Beyond classical simulation simulation

Specification theorem + cost candidate

errors

submit

write

accept/ reject

arcsin

arcsin

Parallel Stopping Grover power

Non-BO Cytochrome dynamics P450

improved Agent team launch

𝛼

feedback

−1

Researchers

Conference

1

Classical search

ideas, critiques, claims

−1

Formal search

1

O Fe S

𝑁 → ∞ 4,374 qubits 6,057 qubits 333 qubits

Figure 1: Formally verified multi-agent quantum program discovery. a) Researchers write a Lean quantum Hoare logic specification of correctness and cost, then launch their agent team, which iterates on error feedback from the Lean kernel. Teams publish independently re-verified solutions, partial results and dead ends to a shared wiki, and exchange ideas and critiques in scheduled conferences. b) Bars indicate which problem each approach can reach. AI search checked by numerical tests can only produce solutions that can be simulated classically (dashed line), which for arcsin means a restricted gate set.7 and small-scale circuit synthesis.32 While large language models (LLMs) are rapidly advancing mathematics and classical algorithms via execution-based search and automated reasoning5,33–39 as well as formal theorem proving for fixed conjectures,6,40 their application to quantum computing lags behind due to the challenge of verifying general correctness without fault-tolerant hardware to test on. High-throughput validation of LLM-generated quantum programs has thus been restricted to circuit regimes that can be classically simulated,7,8 limiting the design space and scale of discovery (Fig. 1b), whereas concurrent LLM-assisted formalization has focused on verifying known algorithms (Appendix A). Bringing AI discovery to general quantum algorithms instead requires pairing formal models of quantum computation with mathematical proofs of correctness and cost, with access to tools such as numerical heuristics where they are effective. Formal reasoning is particularly critical when targeting asymptotic speedups and large-scale applications spanning thousands of qubits—just like scientists have reasoned about quantum algorithms over the past decades. In this work, we introduce a Lean41 verification library based on quantum Hoare logic (QHL),42 engineer a multi-agent research workflow built around it, and prove new resource reductions across asymptotic algorithms and large-scale scientific simulations. Our library pairs a language for quantum programs and classical control flow with formal proofs of correctness and resource cost, chosen per specification. For fault-tolerant circuits we use the spacetime cost 𝑄 · T , the number 𝑄 of qubits times the number T of 𝑇 gates, which are costly in error-corrected quantum computers.43 Researchers launch heterogeneous teams of LLM agents that iterate on algorithms, and exchange concepts, partial results, and dead ends through a shared wiki and scheduled cross-team virtual conferences, while an independent verifier audits every proof against a frozen specification written in our library (Fig. 1a). Across five problems (Fig. 1b)—computing arcsin, parallel Grover search, cytochrome P450 energy levels, fusion alpha-particle stopping power and non-Born–Oppenheimer molecular dynamics—this workflow discovers new programs and circuits with machine-checked proofs of correctness and cost, reducing resource costs by 290× for arcsin (combining classical and formal search), and by up to 10× for our scientific applications compared to the strongest prior baselines (Fig. 3). Together, these advances shift researchers effort from manual circuit design, optimization, and resource tracking to problem specification and scientific interpretation.

2

Specification StoppingPower.lean

1 3,948 system qubits

abbrev systemQubits : N := 3 * (218 * 6 + 8) def stoppingPowerAncillas : N := sorry noncomputable def stoppingPowerProgram (c : Configuration) (j : Fin 10) · · · : DynamicCircuit Var n := sorry theorem stoppingPower_correctness · · · : ∃ W : Unitary (2 ˆ (systemQubits + stoppingPowerAncillas)) (∀ spinUp, ApproximatesTimeEvolution (hamiltonian c) (j.val + 1 : R) 0.01 (fermionicProjector spinUp) W) ∧ RealizesUnitaryFromBasisOutcomesAndZeroWorkspace rSys gridStates rAnc hdisj W (stoppingPowerProgram c j · · · ).compile := by sorry def stoppingPowerConstCost : N := sorry theorem stoppingPower_const_cost · · · : (∀ j, (stoppingPowerProgram c j · · · ).count .TOFF = 0) ∧ (systemQubits + stoppingPowerAncillas) * Í (50 * j, (stoppingPowerProgram c j · · · ).count .T) ≤ stoppingPowerConstCost := by sorry

218 electrons, each 3 × 6 qubits 𝛼2+ projectile, 3 × 8 qubits 216 protons are classical, set by c

2 Unitary 𝑊 approximates time evolution e −i𝐻𝑡

| 𝜓⟩ 𝑊 |0⟩ ⊗𝑚

≈ e−i𝐻𝑡 | 𝜓⟩ |0⟩ ⊗𝑚

fermionic | 𝜓⟩, error ≤ 0.01

3 The compiled program realizes 𝑊

|𝑥⟩ |0⟩ ⊗𝑚

compiled program

𝑊 | 𝑥 ⟩ |0⟩ ⊗𝑚

| 𝑥 ⟩ any grid state

4 Program spacetime cost

qubits · 𝑇 gates ≤ claimed cost no Toffoli gates

Figure 2: Lean specifications for discovery tasks. An abridged specification for electronic stopping power in warm-dense hydrogen,48 where the goal is to construct a quantum program that simulates time evolution under the system Hamiltonian 𝐻. The agents fill in each sorry statement, which is Lean’s placeholder for an unfilled definition or proof: the ancilla qubit count, the circuit and its claimed cost, and the proofs of the correctness and cost theorems. (1) The system qubits store the momentum of every quantum particle. (2) A unitary matrix 𝑊 on the system and ancilla qubits (extra qubits used to aid computation) must simulate time evolution 𝑒 −𝑖𝐻 (𝑐)𝑡 for every physically allowed electron state, up to a specified error, and return the ancillas to |0⟩. (3) The compiled program must act as 𝑊 on grid states whenever the ancillas start in |0⟩. (4) The cost is a function of the logical spacetime volume 𝑄 · T multiplied by the repeated runs of the stopping power routine: 50 repeats × 10 time steps × 𝑄 · T (Sec. 2.3).

1. Formally Verified Multi-Agent Discovery 1.1. Formal Verification of Quantum Algorithms We implement our verification and resource-counting library44 in the Lean theorem prover,41 building on Mathlib45 and Physlib’s Lean-QuantumInfo.46,47 These formalize core objects of quantum information, but reasoning about quantum programs also requires a programming language to express them and a program logic to prove them correct. Our library fills this gap by combining a classical-quantum programming language, a classicalquantum Hoare logic to reason about program correctness42 and support for resource counting. Besides classical operations such as assignment, conditional branching and unbounded loops, the formalized language supports core quantum operations: unitary transformations, mid-program qubit measurement, and state reset. We include further details in Appendix A. Correctness theorems are formulated as so-called Hoare triples of (precondition, program, postcondition), which state that all executions of a program starting in a state satisfying a specified precondition end in a state satisfying a chosen postcondition. Triples are proved backwards from the postcondition by computing the weakest preconditions for each step of the program.42 Alongside correctness, our library proves bounds on both expected and worst-case resource costs across branches and loops, including 𝑇-gate count and number of qubits required to execute the algorithm. To pose a program discovery task, we write a problem specification as a Lean file (Fig. 2) that states the target correctness and cost theorems while leaving placeholders (sorry) to be filled in with a candidate program, its cost bound, and their proofs.

3

1.2. Multi-Agent Discovery Architecture To begin the search on a problem, researchers write the specification and launch independent teams of LLM agents with high-level optimization prompts rather than problem-specific ideas (Fig. 1a). The agent teams then explore candidate algorithms and prove their correctness and cost against the independent verifier. Each researcher chooses their own team setup, from a single agent iterating on a candidate to hierarchical teams targeting individual subroutines, using tools such as analytical derivations, simulation, and numerical optimization (Appendix C). Unlike multi-agent science systems with a fixed architecture49–52 or single search loop,5,36,40,53,54 we prescribe no internal team design and fix only the shared specification, verifier, and workflow. Agent teams can share progress through two channels. A wiki stores each problem’s best verified solution, reusable Lean lemmas, and reviewed notes on promising ideas and dead ends.55 Newly launched teams can start from the wiki’s best solution. Teams also meet in scheduled forum conferences to critique proposals and discuss unverified conjectures, which count as results only once verified. Because agents can freely modify files in their workspace, they may exploit loopholes by weakening theorem statements, altering definitions, or adding axioms.56 To prevent this, an external verifier checks every submission against the frozen specification using the Lean Comparator,57 confirming that all target theorems, underlying definitions, and allowed axioms are unchanged (Appendix B). Researchers thus review only the specification before a run and can trust that any found and verified solution is a valid algorithm.

2. Results We demonstrate automated quantum program discovery on five applications (Fig. 3): parallel unstructured search (Sec. 2.1), fault-tolerant arithmetic (Sec. 2.2), and three physical and chemical simulations (Secs. 2.3–2.5).

2.1. Parallel Grover Search Unstructured search, the problem of finding one or all of 𝑘 marked items in a list of 𝑁 candidates, provided one of the earliest provable quantum advantages, with Grover’s algorithm achieving a quadratic speedup over classical search.9 Marked items are identified by an oracle subroutine assumed to dominate runtime, so cost is measured solely in oracle queries. Allowing up to 𝑚 parallel queries per round on a shared quantum register (rather than 𝑚 independent, uncoupled devices),9,63 we require algorithms to succeed with certainty and score them by their expected oracle rounds for large 𝑁, evaluated at powers of two up to 1,024 for both 𝑚 and 𝑘 (Fig. 3d). We compare against the strongest published protocol in each regime,62–66 including Zalka’s partition combined with weakly measured search at 𝑘 = 1, evaluated under the same metric (Appendix E). Our Lean-verified circuits match this baseline on the 𝑚 = 1 and 𝑘 = 1 boundaries and outperform it across all multi-target parallel settings (𝑚, 𝑘 ≥ 2; 100/121 grid points) for finding a single element, reducing expected rounds by up to 1.22×, and in all 110/121 multi-target settings (𝑘 ≥ 2) for finding all elements, by up to 1.41×. Part of our gain stems from combining published ideas via classical control, such as pairing domain partitioning or parallel restarts with weak measurements (which result in only partial collapse of quantum coherence but also only gives partial success information). Beyond that, we also identify novel mechanisms inside search stages. For instance, in one find-all algorithm we discovered, each parallel query stream couples a pair of workspace registers to advance two finds at once, and combines weak measurements with zero-query un-marking, preserving unmeasured coherence across stages.

4

a) Summary of results using absolute cost

Fixed-point arcsin10 𝛼 + hydrogen stopping power48 C23 H20 N3 O non-BO dynamics58,59 Cytochrome P450 ground and low-lying state energies60,61

𝛼 + hydrogen 10.9×

202658 202658,+59

108

Application-scale FTQC‡ 𝑄 ·T = 15

10

1010

Reduction

State preparation Fusion Photochemistry Drug metabolism

3.70 × 105

5.42 × 1015 4.98 × 1015 1.09 × 1012

4.98 × 1014 6.16 × 1014 4.37 × 1011

> 290× 10.9× 8.08× 2.49×

Cytochrome P450 2.49×

107 290×

Finding all 𝑘 targets

∗

28 26 24

∗

22 1 1

22

24

26

28

210

1

22

24

28

26

210

Parallel queries per round 𝑚 14

10

∗

202560

3.70×105

∗

max. 1.22×

max. 1.41×

13

10

Medium-term FTQC†

105

102

Finding any one target 210

106

202660,+61

109

d) Parallel Grover search

1.08×108 baseline

C23 H20 N3 O 8.08×

𝑇 gates

1011

This work 𝑄 · T

> 1.08 × 108

c) Fixed-point arcsin

Spacetime 𝑄 · T

published baseline refined baseline 202448 this work

1012

Baseline 𝑄 · T

Marked targets 𝑘

b) Scientific applications

Application

1.00×

Problem

103

104

Logical qubits

1.00× Piecewise poly.10

1.10×

1.20×

1.30×

1.40×

This work

Speedup over strongest published baseline

Figure 3: Summary of verified results. a) Quantum algorithm cost for baselines and solutions from this work across application domains. b) Logical-qubit and 𝑇-gate improvements on the three scientific applications, with feathered hardware horizons (dashed lines at geometric midpoints) for medium-term fault-tolerant quantum computing (FTQC† ; teraquop planar architectures7,61 ) and application-scale FTQC‡ (fault-tolerant applicationscale quantum computers, FASQ1,2,61 ). Grey points denote published baselines, red points denote refined baselines incorporating subsequent methodological improvements from the literature, and blue points denote this work. For cytochrome P450, the published ground-state estimate is extended to all eigenstates within 0.1 Ha of 𝐸 0 , raising its cost by 0.85%. c) Cost for 25-bit fixed-point arcsin (𝜀 ≤ 1.25 × 10−7 ) against piecewise-polynomial evaluation.10 d) Speedup in expected number of rounds for large 𝑁 of our verified parallel Grover circuits over the strongest published baseline62–66 for powers of two 𝑚, 𝑘 ≤ 210 when finding any one or all of 𝑘 marked targets with 𝑚 parallel queries per round (dashed contours: 1.00× boundary; ∗ markers: peak speedups of 1.22× and 1.41×).

2.2. Fixed-Point arcsin Computing the function arcsin(𝑦) on a quantum superposition of inputs is an important subroutine for loading numbers into a wavefunction, used in many algorithms including for solving linear systems of equations. We specifically consider the case where the input 𝑦 is represented by 25-classical bits, and the output must be accurate to an error ≤ 1.25 × 10−7 across the domain 𝑦 ∈ [−1, 1]. For this setting, the best-known published baseline implementation is a piecewise-polynomial construction,10 which requires a spacetime cost exceeding 1.08 × 108 for an error of ∼ 10−6 . Unlike the other examples in this work, arcsin is known to have quantum implementations that can be efficiently simulated classically by using a restricted gate set called kickmix.7 Therefore, we run automated discovery in two steps. First, the agents only consider kickmix circuits, exploiting that solutions can be verified in a matter of seconds. This leads to fast improvements, overall reducing the spacetime cost to 4.15 × 105 (4,152 𝑇 gates on 100

5

Stopping power a) Spacetime cost

b) Coulomb terms in real space 𝑣 (𝑟 ) momentum

𝑄 · T (1015 )

baseline 5

QFT 10

10.9× 2

kinetic 25 50 Iteration

+

shift frame

𝑃=

75

+

Í

off grid

𝑖 p𝑖

on grid reuse

QFT†

𝑘

0.5 1

momentum basis exclude unphysical e − configurations from 𝜆

save

(b) (c)

1

c) Reused total momentum

1 qubitized walk steps ÷ 12.8 𝑇 per step × 1.52

0

1

0.5 Separation (bohr)

| 𝑃𝑥 ⟩ | 𝑃𝑦 ⟩ | 𝑃𝑧 ⟩

Non-Born–Oppenheimer dynamics d) Spacetime cost

e) Measurement-based uncompute baseline

1

particles

swap

slots 1,2

3

8.08×

(e) 1 (f, g)

𝑍𝑖 𝑍 𝑗 /𝑟𝑖 𝑗

swap

1/𝑟𝑖 𝑗

𝑄 · T (1015 )

10 baseline

𝑍

0.5

−46% 𝑇 per step particles

0.5 1

60 120 Iteration

180

ancilla

f) 1/𝑟 without multiplication

load

𝑍𝑖 𝑍 𝑗 /𝑟𝑖 𝑗

1 𝑋

2 3 𝑟𝑖2𝑗 = |r𝑖 −r 𝑗 | 2

g) Hard-wired nuclear charges baseline

−94% 𝑇

alias QROM

Boolean map

4 C

N

O

H

Figure 4: Where program improvements come from. a, d) Cost of verified solutions. Arrows mark where the mechanisms in the other panels were introduced. Interestingly, the drop at iteration 49 in a) is not present in the final solution. b) A quantum Fourier transform (QFT) moves the electrons onto a real-space grid and back. On the grid, the pair potential 𝑣(𝑟) is split into long-range (blue) and short-range (hatched) parts. The long-range part costs about 30 times less per pair than in the momentum basis (red dashed). For the short-range part, a subroutine bounds the interaction strength of configurations that violate the Pauli exclusion principle, further reducing its cost. c) Protons sit off the grid, so to apply an electron–proton interaction the circuit shifts all electrons to put the proton on a grid point, a phase set by the sum of all 218 electron momenta. Keeping this sum in a 42-qubit register between walk steps halves the summations per step. e) To apply the electrostatic interaction 𝑍𝑖 𝑍 𝑗 /𝑟 𝑖 𝑗 , rather than swapping the coordinates of the interacting pair into fixed slots and back, a copy is loaded into ancilla qubits. This can be cleared cheaply by measurement without destroying the originals. f) From the loaded coordinates, 𝑟 𝑖2𝑗 is calculated cheaply and rescaled within each interval to 𝑟˜𝑖2𝑗 ∈ [0, 1). Through random sampling, one of four classically precomputed coefficients is chosen, with probabilities set by 𝑟˜𝑖2𝑗 (dot area). In expectation, this gives 1/𝑟 𝑖 𝑗 as a Bernstein polynomial,67 as shown for one value of 𝑟 𝑖2𝑗 (shaded). g) Each nucleus has integer charge 𝑍 𝑛 ∈ {1, 6, 7, 8}. In the electron–nucleus attraction, rather than preparing these weights via alias sampling,24 a uniform superposition is created and reversible logic assigns 𝑍 𝑛 of them to each nucleus. Applying a unit-charge interaction on every branch then gives each nucleus its full charge 𝑍 𝑛 . qubits). Subsequently, we use our formal verification library to lift the kickmix restriction and further optimize the algorithm, using a new quantum gate set that makes the solution hard to verify outside Lean. From this, the agents discover a solution in which a certain component, the coefficient lookup, can be implemented using 33% fewer gates, leading to a further overall 11% lower cost of 3.70 × 105 (3,698 𝑇 gates on 100 qubits), 290× below the baseline.10

6

2.3. Stopping Power in Inertial-Confinement Fusion In inertial-confinement fusion, hydrogen fuel ignites only if the energetic 𝛼 particles it produces deposit enough of their energy back into the fuel to sustain the reaction.68,69 Modeling this requires knowing the fuel’s stopping power, the rate at which it absorbs the kinetic energy of an 𝛼 particle passing through it. No classical method for these dynamics is both efficient and systematically improvable.48,70–73 We consider an 𝛼 particle and 218 electrons moving among 216 fixed protons. A candidate circuit must simulate the time evolution of the system 𝑒 −𝑖𝐻𝑡 with error 𝜀 = 10−2 on every state antisymmetric under exchange of same-spin electrons. The full stopping-power calculation repeats this evolution 500 times. Our baseline is constructed from Ref. 48: we take the 5,650 logical qubits and parameters in its Table 2 and evaluate its equation (12), giving a spacetime cost of 5.42×1015 per run, averaged over the 500 runs (Appendix G). This builds 𝑒 −𝑖𝐻𝑡 from a sequence of walk steps, each encoding 𝐻/𝜆, where 𝜆 is the sum of the absolute weights when 𝐻 is written as a linear combination of unitaries (LCU). The number of walk steps25 scales as 𝜆𝑡. Running our discovery workflow, we find a solution with 4,374 logical qubits and 10.9× lower spacetime cost (Fig. 4a). To understand the main improvement, we note that over 90% of the baseline’s 𝜆 comes from electron–proton and electron–electron interactions, and that 𝜆 must account for every state the qubits can be in, including unphysical ones. Our main innovation is to quantum Fourier transform all electrons to a real-space grid to apply these interactions (Fig. 4b). Importantly, in real space the solution can exploit Pauli exclusion, which allows at most two opposite spin electrons on any grid point. For the short-range part of the potential, a subroutine kicks back a phase of 𝑖 in one LCU branch and −𝑖 in the other for each electron on a nearby grid point. The branches interfere to apply the correct interaction, up to a constant, for two or fewer electrons, while keeping it no larger for three or more, so these grid points no longer set 𝜆. In the final circuit, this cuts the walk steps by 12.8×, at 1.52× the 𝑇 gates per step. The largest other improvement comes from keeping the total electron momentum, needed to apply the electron– proton interaction, in a 42-qubit register between walk steps. This halves how often it is recomputed and cuts the 𝑇 gates per step by 10% (Fig. 4c). More details are given in Appendix G.

2.4. Non-Born–Oppenheimer Dynamics of C23 H20 N3 O Light-driven chemical processes such as solar energy conversion,74,75 photocatalysis76 and biological photoreception77 proceed through excited-state pathways where electronic and nuclear motion occur on comparable timescales. This invalidates the Born–Oppenheimer approximation,78–80 meaning the nuclei must also be included in the quantum wavefunction. Methods that treat the nuclei classically struggle to simulate quantum tunneling and superpositions of electronic states,81,82 while exact classical simulation scales exponentially with system size.14,78 Following Reaction 5 of Ref. 58, we simulate time evolution of C23 H20 N3 O, modeled on molecules proposed for photo-activated, proton-coupled electron transfer.75,83 Unlike the fixed protons of Sec. 2.3, all 47 nuclei are treated quantum mechanically alongside the 187 electrons (5,616 system qubits). Here a candidate circuit must implement time evolution 𝑒 −𝑖𝐻𝑡 for 𝑡 = 1 fs, to within error 𝜀 = 10−2 , for every initial state. Improving the published estimate58 by the authors’ subsequent work59 gives a baseline cost of 4.98 × 1015 𝑄 · T (Appendix H). In this work we find a solution that costs only 6.16 × 1014 𝑄 · T , a reduction of 8.08× (Fig. 4d). Within each walk step, three changes lead to the most significant improvements. First, rather than swapping interacting particles into fixed sets of qubits and back,58 our solution loads their coordinates into ancilla qubits, which can be cleared by cheap measurement23,27 (Fig. 4e). Second, instead of evaluating 1/𝑟 with a multiplication step,58 we obtain 1/𝑟 in expectation from a piecewise Bernstein polynomial in 𝑟 2 ,67 using only comparisons and a table lookup (Fig. 4f). Finally, a nucleus of charge 𝑍 𝑛 attracts an electron just as 𝑍 𝑛 unit charges at the same

7

point would. The solution exploits this by creating an equal superposition and assigning 𝑍 𝑛 of the branches to each nucleus via classical Boolean logic,27 rather than preparing unequal weights by alias sampling24,58 (Fig. 4g). More details are given in Appendix H.

2.5. Cytochrome P450 Compound I Cytochrome P450 enzymes break down most human medicines, so understanding how they react with a drug candidate helps predict how quickly the drug is cleared from the body and whether it produces toxic byproducts.84–86 These reactions are driven by a short-lived intermediate of the enzyme, Compound I, whose reactivity depends on several closely-spaced spin states. Approximate classical methods such as density functional theory disagree on the energy ordering of these states,87 making it a central target for quantum phase estimation, a quantum algorithm to obtain eigenstate energies.3,88 We consider a model of Compound I with 63 electrons in 58 orbitals (active space 𝑋 88 ) with the fixed double-factorized tensor-hypercontraction (DFTHC) Hamiltonian.60 For every eigenstate within Δ = 0.1 Ha of the ground state, the circuit must estimate the energy with root-mean-square error at most 𝜀 = 1 mHa, including all approximation errors. For this problem, the best published spacetime cost is 2.26 × 1012 .60 To be conservative, we further integrate recent compilation improvements,61,89 which roughly halve the cost. Finally, since the published estimate is for the ground-state energy only, we adjust it for our task of predicting all energies within Δ of the ground state, giving a cumulative baseline of 1.09 × 1012 on 481 logical qubits (Appendix I). For this problem, we find a solution that achieves a spacetime cost of 4.37 × 1011 , a reduction of 2.49×. To understand the main improvement, consider the baseline. To apply a Hamiltonian term, each walk step performs 57 rotations in orbital space, to define new coordinates in which the term acts on one orbital.4 The chosen term is stored as a binary number, which is used to read the rotation angles needed into a 247-qubit register from a quantum read-only memory.24 Our circuit instead gives each term its own qubit, and sets only the qubit of the chosen term to 1 (a one-hot register). Each angle can then be read from these qubits with only cheap (Clifford) gates once the register is built, with no table lookup. Prior work89 found this narrowly worse than the baseline because it needs more qubits, and suggested mixing one-hot and binary encodings. Our solution uses this both to look up the term weights and to supply the rotation angles, accounting for over 95% of the 𝑇-gate saving per step and most of the qubit saving. More details are given in Appendix I.

2.6. Collaboration Across Agent Teams We now discuss the dynamics of the agentic runs to better understand the role of multiple agent teams in search. Our best solutions emerged from collaboration across teams rather than any single team working alone. In nonBorn–Oppenheimer dynamics, for example, the leading record changed teams seven times after Team 1’s initial run, and the final circuit combines techniques from three agent teams, superseding intermediate improvements from other teams (Figs. 4e–g, 5a). Whereas the wiki transferred verified code, conferences exchanged unverified proposals and critique: the largest single drop (−34%) began as a Team 1 conference proposal that Team 2 refined and proved (Fig. 4e), and a second key improvement grew from a similar exchange (Fig. 4f). Such cross-team contributions were sustained across all three scientific applications. To estimate each channel’s share once both were active, we classify every verified gain by where its new idea originated (Fig. 5b). Averaged across the three scientific applications, 61% of the total cost reduction came from within-team ideas, 15% from cross-team wiki entries or Lean files, and 24% from conferences. The cross-team share ranges from 13% in stopping power to 63% in cytochrome P450. Credit is often hard to separate cleanly, as one proof often combines ideas from a team’s own search, the wiki, and conferences.

8

a) Idea lineage in non-Born–Oppenheimer dynamics

measurement-based coordinate uncompute (Fig. 4e)

Cross-team

Team 1

Teams:

Team 3

faster Lean cost proofs

neutral (2e, 2n) Coulomb clusters

conference / wiki co-ideation

Team 2

1/𝑟 by Bernstein sampling (Fig. 4f)

best seed

−21%

−17%

−17%

−30% −9%

−34%

−7%

−5%

cheaper particle pair selection

Within-team researcher-guided agents

−19%

−8%

hard-wired nuclear charges

−7%

−0.7%

−5%

−3%

single-pass W-state 1/𝑟 uncompute coordinate loading

−2%

−0.5%

carry-tap 1/𝑟 adder

−0.4%

shared 13-bit Bernstein coin

(Fig. 4g)

coordinate optimization

cheaper inequality test

cheaper Coulomb lookup + decoder

b) Origin of gains

difference-mux coordinate loading

shared outer coin

mixed-unitary QSP rotations

catalytic QSP phase gradient

c) Spread of one idea in stopping power

Share of log(start/best) since sharing began

Stopping power

6.5× 87%

9%

Non-BO dynamics

3.0×

60%

11%

2.5× 25%

1 step needs 288q

narrows to 231q adopts Team 3’s #4

Wiki idea

29%

Cytochrome P450 37%

posts 288q idea builds #1

Team 2 #1 288q · −32%

#2

#3 + saved 𝑃

#4

#5 231q

Final 246q

Team 3

38%

adopts #1 (288q)

try 248q?

Conference All simulations (joint) 61%

15%

24%

Team 1 unpacks #1’s 2 moves

0%

25% within-team agents conference

50%

75%

cross-team wiki

100%

𝑇

critiques can 288q be Team 3 seam narrowed?

𝑇+1

#k verified wiki record

𝑇+𝑁 conference post

read (other conference reads implicit)

Later team WIP

Figure 5: Cross-team collaboration and idea lineage. a) Lineage of verified circuits for non-Born–Oppenheimer dynamics across Teams 1–3 (of seven participating teams) from the baseline (seed) to the final circuit (star), with the 𝑄 · T reduction of each step. Within-team discoveries enter from below; cross-team conference and wiki ideas enter from above. b) Share of the logarithmic 𝑄 · T reduction from within-team ideas, cross-team wiki entries, and conference exchanges once both channels were active on each scientific application, with reduction factors over this window shown at right and the unweighted average at bottom. c) Cross-team evolution of one stopping-power idea across wiki records #1–#5 and conference critiques, narrowing the shared ancilla register from 288 to 231 qubits before the final space–time trade-off (246 qubits). Figure 5c traces one such cross-team exchange in stopping power, where Teams 2 and 3 refined a shared ancilla register across five successive wiki records with conference input from Team 1, narrowing it from 288 to 231 qubits before a final update used 246 qubits to cut 𝑇 gates. Beyond complete proofs, dead-end notes and partial proofs also transferred across teams: a note proving why a proposed shortcut fails stopped two proposals from other teams, while helper Lean modules proved by one team were imported by a second and reused in a third team’s stopping-power circuit. Machine-checked verification is also what makes open collaboration safe at this scale, letting teams build on one another’s Lean proofs without manual code review. Flawed candidates and claims fell into two categories (Appendix B): broken proofs or inaccurate script-based estimates (such as candidates that bypassed local Lean checks), which our external verifier and conference critique filtered out, and loopholes in the specifications themselves (such as exploiting how Toffoli gates were counted without improving the circuit), which researchers and teams closed by revising the specification.

9

3. Discussion and Outlook In this work, we show that combining formal verification with LLM agents can push the frontier of quantum algorithm development. We demonstrate this across fundamental algorithms, fault-tolerant subroutines and fullscale scientific applications, achieving up to a 1.41× reduction in expected oracle rounds for parallel Grover search, a 290× spacetime reduction for fixed-point arcsin, and 10.9×, 8.08× and 2.49× reductions on simulations relevant to fusion, photochemistry and drug metabolism. Where classical simulation can check candidate circuits, as with arcsin, numerical testing with formal proving on top is effective. For asymptotic bounds and general algorithms on hundreds or thousands of qubits, formal proof is essential. Beyond these results, our experiments point to a new research workflow. Rather than replacing human researchers, formal AI discovery shifts where human effort is applied. Researchers and domain experts choose problems, carefully prepare faithful formal specifications. External verification lets independent agent teams build on one another’s work without manual review, and carry out the search and formal proofs that drive down costs. Finally, researchers interpret the verified solutions to guide future research directions. Our end-to-end simulations still demand far more resources than projected for the first fault-tolerant quantum computers2 (Fig. 3b; Appendix D), and reaching early hardware will require further orders-of-magnitude improvements. Part of the challenge is for us to choose specifications well, as agents cannot optimize beyond them. For example, to match the baseline, our non-Born–Oppenheimer dynamics specification requires correctness on all input states, even unphysical ones that break exchange symmetry. Similarly, fixing the factorization in cytochrome P450 excludes the representation advances behind recent gains.4,60,88 Bringing algorithms onto real hardware also means extending formal specifications to error-correcting codes, qubit routing and physical layout,43,61 so human–agent teams can optimize algorithms for a given code or co-design both. Furthermore, qubits are expected to be a more limited resource than gates for early machines, suggesting optimizing each factor unequally.90 Other hardware designs, where 𝑇 gates can run in parallel, may instead favor minimizing qubits times 𝑇 depth.43 Formalizing these architectural constraints allows us to optimize algorithms and fault-tolerant layouts together before large-scale quantum processors exist. Over time, collaborative proof search can thus turn what were once isolated, multi-year derivations into cumulative resource reductions, closing the gap to useful quantum computation from above while physical hardware scales from below.

Code availability Our Lean library will be open sourced shortly, together with the problem specifications and verified solutions discussed in this manuscript.44

References 1.

Beverland, M. E. et al. Assessing requirements to scale to practical quantum advantage 2022. arXiv: 2211.07629 [quant-ph].

2.

Preskill, J. Beyond NISQ: The Megaquop Machine. ACM Transactions on Quantum Computing 6, 1–7. arXiv: 2502.17368 [quant-ph] (2025).

3.

Reiher, M., Wiebe, N., Svore, K. M., Wecker, D. & Troyer, M. Elucidating reaction mechanisms on quantum computers. Proceedings of the National Academy of Sciences 114, 7555–7560 (2017).

4.

Lee, J. et al. Even More Efficient Quantum Computations of Chemistry Through Tensor Hypercontraction. PRX Quantum 2, 030305 (2021).

5.

Novikov, A. et al. AlphaEvolve: A coding agent for scientific and algorithmic discovery 2025. arXiv: 2506.13131 [cs.AI].

10

6.

Hubert, T. et al. Olympiad-level formal mathematical reasoning with reinforcement learning. Nature 651, 607–613 (2026).

7.

Babbush, R. et al. Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations. PRX Quantum 7, 031001. arXiv: 2603.28846 [quant-ph] (2026).

8.

Crichigno, M. & Flammia, S. Automating quantum circuit optimization with AI agents Oct. 2026. arXiv: 2610.31352 [quant-ph].

9.

Grover, L. K. A fast quantum mechanical algorithm for database search in Proceedings of the TwentyEighth Annual ACM Symposium on Theory of Computing (1996), 212–219.

10.

Häner, T., Roetteler, M. & Svore, K. M. Optimizing Quantum Circuits for Arithmetic 2018. arXiv: 1805. 12445 [quant-ph].

11.

Shor, P. W. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM Journal on Computing 26, 1484–1509 (1997).

12.

Jordan, S. P. et al. Optimization by decoded quantum interferometry. Nature 646, 831–836 (2025).

13.

Aspuru-Guzik, A., Dutoi, A. D., Love, P. J. & Head-Gordon, M. Simulated Quantum Computation of Molecular Energies. Science 309, 1704–1707 (2005).

14.

Kassal, I., Jordan, S. P., Love, P. J., Mohseni, M. & Aspuru-Guzik, A. Polynomial-time quantum algorithm for the simulation of chemical dynamics. Proceedings of the National Academy of Sciences 105, 18681– 18686 (2008).

15.

Santagati, R. et al. Drug design on quantum computers. Nature Physics 20, 549–557 (2024).

16.

Bauer, B., Bravyi, S., Motta, M. & Chan, G. K.-L. Quantum Algorithms for Quantum Chemistry and Quantum Materials Science. Chemical Reviews 120, 12685–12717 (2020).

17.

Delgado, A. et al. Simulating key properties of lithium-ion batteries with a fault-tolerant quantum computer. Physical Review A 106, 032428 (2022).

18.

Jordan, S. P., Lee, K. S. M. & Preskill, J. Quantum Algorithms for Quantum Field Theories. Science 336, 1130–1133 (2012).

19.

Bauer, C. W. et al. Quantum Simulation for High-Energy Physics. PRX Quantum 4, 027001 (2023).

20.

Joseph, I. et al. Quantum computing for fusion energy science applications. Physics of Plasmas 30, 010501 (2023).

21.

Dalzell, A. M. et al. Quantum Algorithms: A Survey of Applications and End-to-end Complexities arXiv: 2310.03011 [quant-ph] (Cambridge University Press, 2025).

22.

Acharya, R. et al. Quantum error correction below the surface code threshold. Nature 638, 920–926 (2025).

23.

Gidney, C. Halving the cost of quantum addition. Quantum 2, 74 (2018).

24.

Babbush, R. et al. Encoding Electronic Spectra in Quantum Circuits with Linear T Complexity. Physical Review X 8, 041015 (2018).

25.

Low, G. H. & Chuang, I. L. Hamiltonian Simulation by Qubitization. Quantum 3, 163 (2019).

26.

Gilyén, A., Su, Y., Low, G. H. & Wiebe, N. Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics in Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (2019), 193–204.

27.

Su, Y., Berry, D. W., Wiebe, N., Rubin, N. & Babbush, R. Fault-Tolerant Quantum Simulations of Chemistry in First Quantization. PRX Quantum 2, 040332 (2021).

28.

Fösel, T., Tighineanu, P., Weiss, T. & Marquardt, F. Reinforcement Learning with Neural Networks for Quantum Feedback. Physical Review X 8, 031084. arXiv: 1802.05267 [quant-ph] (2018).

29.

Sivak, V. V. et al. Real-time quantum error correction beyond break-even. Nature 616, 50–55. arXiv: 2211.09116 [quant-ph] (2023).

11

30.

Krenn, M., Landgraf, J., Foesel, T. & Marquardt, F. Artificial intelligence and machine learning for quantum technologies. Physical Review A 107, 010101. arXiv: 2208.03836 [quant-ph] (2023).

31.

Bausch, J. et al. Learning high-accuracy error decoding for quantum processors. Nature 635, 834–840 (2024).

32.

Ruiz, F. J. R. et al. Quantum circuit optimization with AlphaTensor. Nature Machine Intelligence 7, 374– 385. arXiv: 2402.14396 [quant-ph] (2025).

33.

Fawzi, A. et al. Discovering faster matrix multiplication algorithms with reinforcement learning. Nature 610, 47–53 (2022).

34.

Mankowitz, D. J. et al. Faster sorting algorithms discovered using deep reinforcement learning. Nature 618, 257–263 (2023).

35.

Romera-Paredes, B. et al. Mathematical discoveries from program search with large language models. Nature 625, 468–475 (2024).

36.

Lange, R. T., Imajuku, Y. & Cetin, E. ShinkaEvolve: Towards Open-Ended And Sample-Efficient Program Evolution in International Conference on Learning Representations (ICLR) (2026). arXiv: 2509.19349 [cs.CL].

37.

Alman, J. & Vassilevska Williams, V. Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs 2026. arXiv: 2610.06783 [cs.DS].

38.

OpenAI. The Exponential Time Hypothesis is False https://github.com/openai/math/tree/main/ preprints/The-Exponential-Time-Hypothesis-is-False-October-25-2026. Preprint, dated October 25, 2026; AI-generated, not peer-reviewed. Oct. 2026.

39.

Anthropic & Claude. A 2𝑜 (𝑛) Time Algorithm for 3-SAT https://github.com/anthropics/formalmath/tree/main/eth. Paper and Lean 4 formalization (Lean v4.33.1, Mathlib v4.33.1); AI-generated, not peer-reviewed. Oct. 2026.

40.

Achim, T. et al. Aristotle: IMO-level Automated Theorem Proving 2025. arXiv: 2510.01346 [cs.AI].

41.

De Moura, L. & Ullrich, S. The Lean 4 Theorem Prover and Programming Language in Automated Deduction – CADE 28 12699 (Springer, 2021), 625–635.

42.

Feng, Y. & Ying, M. Quantum Hoare Logic with Classical Variables. ACM Transactions on Quantum Computing 2, 1–43 (2021).

43.

Litinski, D. A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery. Quantum 3, 128 (2019).

44.

We will shortly open source our Lean 4 library, problem specifications and verified solutions.

45.

The mathlib Community. The Lean mathematical library in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (2020), 367–381.

46.

The Physlib Community. Physlib: The Lean Physics Library https://github.com/leanprovercommunity/physlib. 2024.

47.

Meiburg, A. Quantum Information in Lean https://github.com/Timeroot/Lean- QuantumInfo. 2024.

48.

Rubin, N. C. et al. Quantum computation of stopping power for inertial fusion target design. Proceedings of the National Academy of Sciences 121, e2317772121 (2024).

49.

Swanson, K., Wu, W., Bulaong, N. L., Pak, J. E. & Zou, J. The Virtual Lab of AI agents designs new SARS-CoV-2 nanobodies. Nature 646, 716–723 (2025).

50.

Gottweis, J., Weng, W.-H., Daryin, A., et al. Accelerating scientific discovery with Co-Scientist. Nature 655, 487–496 (2026).

51.

Lu, C. et al. Towards end-to-end automation of AI research. Nature 651, 914–919 (2026).

52.

Ghareeb, A. E. et al. A multi-agent system for automating scientific discovery. Nature 655, 497–505 (2026).

12

53.

Yuksekgonul, M. et al. Learning to Discover at Test Time in Proceedings of the 43rd International Conference on Machine Learning (ICML) (2026). arXiv: 2601.16175 [cs.LG].

54.

Tsoukalas, G. et al. Advancing mathematics research with AI-driven formal proof search. Science 394, 234–239. arXiv: 2605.22763 (2026).

55.

Qu, A. et al. CORAL: Towards Autonomous Multi-Agent Evolution for Open-Ended Discovery in Proceedings of the Conference on Language Modeling (COLM) (2026). arXiv: 2604.01658 [cs.AI].

56.

Zhong, Z., Raghunathan, A. & Carlini, N. ImpossibleBench: Measuring LLMs’ Propensity of Exploiting Test Cases 2025. arXiv: 2510.20270.

57.

Lean FRO. comparator: A trustworthy judge for Lean proofs from untrusted sources https://github. com/leanprover/comparator. Accessed Nov. 2026. 2025.

58.

Pocrnic, M., Loaiza, I., Arrazola, J. M., Wiebe, N. & Motlagh, D. Efficient Simulation of Pre-BornOppenheimer Dynamics on a Quantum Computer 2026. arXiv: 2602.11272 [quant-ph].

59.

Pocrnic, M. & Motlagh, D. Improved constant factors for qubitized Hamiltonian simulation 2026. arXiv: 2608.02734 [quant-ph].

60.

Low, G. H. et al. Fast Quantum Simulation of Electronic Structure by Spectral Amplification. Physical Review X 15, 041016 (2025).

61.

Low, G. H. et al. A denser planar surface code 2026. arXiv: 2605.30455 [quant-ph].

62.

Boyer, M., Brassard, G., Høyer, P. & Tapp, A. Tight Bounds on Quantum Searching. Fortschritte der Physik 46, 493–505 (1998).

63.

Zalka, C. Grover’s quantum searching algorithm is optimal. Physical Review A 60, 2746–2751 (1999).

64.

Gingrich, R. M., Williams, C. P. & Cerf, N. J. Generalized quantum search with parallelism. Physical Review A 61, 052313 (2000).

65.

Grover, L. K. & Radhakrishnan, J. Quantum search for multiple items using parallel queries 2004. arXiv: quant-ph/0407217.

66.

Fang, W. & Heunen, C. Weakly Measured Loops for Quantum Amplitude Amplification: Oracle Savings and Adaptive Search with Unknown Target Probability 2026. arXiv: 2609.39621 [quant-ph].

67.

Goyal, V. & Sigman, K. On simulating a class of Bernstein polynomials. ACM Transactions on Modeling and Computer Simulation 22, 1–5 (2012).

68.

Hentschel, T. W. et al. Improving dynamic collision frequencies: Impacts on dynamic structure factors and stopping powers in warm dense matter. Physics of Plasmas 30, 062703 (2023).

69.

Hurricane, O. A. et al. Physics principles of inertial confinement fusion and U.S. program overview. Reviews of Modern Physics 95, 025005 (2023).

70.

Grabowski, P. E., Surh, M. P., Richards, D. F., Graziani, F. R. & Murillo, M. S. Molecular Dynamics Simulations of Classical Stopping Power. Physical Review Letters 111, 215002 (2013).

71.

Correa, A. A. Calculating electronic stopping power in materials from first principles. Computational Materials Science 150, 291–303 (2018).

72.

Ding, Y. H., White, A. J., Hu, S. X., Certik, O. & Collins, L. A. Ab Initio Studies on the Stopping Power of Warm Dense Matter with Time-Dependent Orbital-Free Density Functional Theory. Physical Review Letters 121, 145001 (2018).

73.

Grabowski, P. E. et al. Review of the first charged-particle transport coefficient comparison workshop. High Energy Density Physics 37, 100905 (2020).

74.

Scholes, G. D., Fleming, G. R., Olaya-Castro, A. & van Grondelle, R. Lessons from nature about solar light harvesting. Nature Chemistry 3, 763–774 (2011).

75.

Lennox, J. C., Kurtz, D. A., Huang, T. & Dempsey, J. L. Excited-State Proton-Coupled Electron Transfer: Different Avenues for Promoting Proton/Electron Movement with Solar Photons. ACS Energy Letters 2, 1246–1256 (2017).

13

76.

Gentry, E. C. & Knowles, R. R. Synthetic Applications of Proton-Coupled Electron Transfer. Accounts of Chemical Research 49, 1546–1556 (2016).

77.

Polli, D. et al. Conical intersection dynamics of the primary photoisomerization event in vision. Nature 467, 440–443 (2010).

78.

Worth, G. A. & Cederbaum, L. S. Beyond Born–Oppenheimer: Molecular Dynamics Through a Conical Intersection. Annual Review of Physical Chemistry 55, 127–158 (2004).

79.

Mai, S. & González, L. Molecular Photochemistry: Recent Developments in Theory. Angewandte Chemie International Edition 59, 16832–16846 (2020).

80.

Hammes-Schiffer, S. & Stuchebrukhov, A. A. Theory of Coupled Electron and Proton Transfer Reactions. Chemical Reviews 110, 6939–6960 (2010).

81.

Subotnik, J. E. et al. Understanding the Surface Hopping View of Electronic Transitions and Decoherence. Annual Review of Physical Chemistry 67, 387–417 (2016).

82.

Crespo-Otero, R. & Barbatti, M. Recent Advances and Perspectives on Nonadiabatic Mixed Quantum– Classical Dynamics. Chemical Reviews 118, 7026–7068 (2018).

83.

Ren, G., Meng, Q., Zhao, J. & Chu, T. Molecular Design for Electron-Driven Double-Proton Transfer: A New Scenario for Excited-State Proton-Coupled Electron Transfer. The Journal of Physical Chemistry A 122, 9191–9198 (2018).

84.

Denisov, I. G., Makris, T. M., Sligar, S. G. & Schlichting, I. Structure and Chemistry of Cytochrome P450. Chemical Reviews 105, 2253–2278 (2005).

85.

Guengerich, F. P. Cytochrome P450 and Chemical Toxicology. Chemical Research in Toxicology 21, 70–83 (2008).

86.

Rittle, J. & Green, M. T. Cytochrome P450 Compound I: Capture, Characterization, and C–H Bond Activation Kinetics. Science 330, 933–937 (2010).

87.

Shaik, S. et al. P450 Enzymes: Their Structure, Reactivity, and Selectivity—Modeled by QM/MM Calculations. Chemical Reviews 110, 949–1017 (2010).

88.

Goings, J. J. et al. Reliably assessing the electronic structure of cytochrome P450 on today’s classical computers and tomorrow’s quantum computers. Proceedings of the National Academy of Sciences 119, e2203533119 (2022).

89.

Caesura, A. et al. Faster Quantum Chemistry Simulations on a Quantum Computer with Improved Tensor Factorization and Active Volume Compilation. PRX Quantum 6, 030337 (2025).

90.

Gidney, C. How to factor 2048 bit RSA integers with less than a million noisy qubits 2025. arXiv: 2505.15917 [quant-ph].

14

library Lean + Mathlib + QuantumInfo

Quantum Hoare logic

Specification theorem + cost Query algorithm

Circuit 𝑇

𝑍

𝑂

𝑈

𝑂

Figure S1: Verification library and specification stack. Built on Mathlib,45 Physlib’s 46,47 42,97 Lean-QuantumInfo in Lean, our quantum Hoare logic formalizes classical–quantum states, weakest preconditions and resource costs, supporting problem specifications (correctness theorem and cost bound) across dynamic Clifford+𝑇 circuits and black-box query algorithms.

A. Formal Quantum Computation Library We formalize our verification and resource-counting framework for quantum algorithms in Lean,41 an interactive theorem proving language based on dependent type theory. We chose Lean for its already established rich library ecosystem for broad mathematics, physics, and quantum information theory.45–47 Moreover, Lean has seen significant traction in recent months for verification of AI-generated proofs. In particular, formalizing quantum algorithms in Lean allows us to model a broader semantics of quantum programming, complementing fast fuzz-testing evaluators like kickmix.7 Prior formal frameworks for quantum program verification have been developed across several interactive theorem provers. In Rocq (formerly Coq), SQIR91 verifies unitary quantum circuits, while CoqQ92 formalizes quantum Hoare logic93 for pure quantum while programs. In Isabelle/HOL, QHLProver94 provides an earlier mechanization of quantum Hoare logic for imperative quantum algorithms. Concurrent work has also explored quantum verification in Lean,95 most notably QEDIA,96 which formalizes classical-quantum Hoare logic97 for partial and total correctness. Beyond correctness verification, our framework includes formal support for measuring the worst-case and expected resource costs of algorithms, which is critical for quantum algorithm discovery. The core of our Lean library is formed by a formalization of a classical-quantum imperative while language with an associated classical-quantum Hoare logic.42 Supporting classical variables and classical control flow is crucial in practice: realistic quantum algorithms routinely interleave quantum operations with classical arithmetic, loops, and measurement-dependent branching. Handling classical states natively avoids the state-space overhead of encoding classical data into quantum registers. Correctness in this work is expressed through total Hoare triples {{Θ}} 𝑃 {{Ψ}}. These assert that for every initial (classical-quantum) state Δ satisfying the precondition Θ, all executions of the program 𝑃 terminate in a (classical-quantum) state satisfying the postcondition Ψ. In the classical case, pre– and postconditions are predicates on the state. In the quantum case, a state no longer simply satisfies or violates an assertion, the condition is quantitative and takes value in [0, 1]. We call this the expectation of satisfaction. A triple then asserts that, for every initial state Δ, the expectation of Δ satisfying an assertion Θ is bounded above by the expectation of the resulting state Δ′ (obtained after running the program 𝑃 on Δ) to satisfy Ψ.

15

Verification is performed via reasoning about weakest preconditions. Starting from a given postcondition Ψ, we compute the weakest precondition for this to hold by inductively reasoning about the program backwards. The full semantics of weakest preconditions is given in Figure S3. We follow the source closely but not fully faithfully: we have made certain modifications both to fit our verification purposes and to address ambiguities in the paper. We next outline the main ingredients of the logic and where our formalization differs from Ref. 42. Variable types. Programs operate on two kinds of variables: classical and quantum. In Ref. 42 classical variables can have two types, boolean and integer. We focus on integer-valued classical variables. This is without loss of generality, since boolean values can be encoded as integers. More precisely, given a type Var of classical variables, the type of classical states (stores) is: abbrev Store (Var : Type) : Type := Var → Z

For quantum variables, Feng and Ying42 consider a countably infinite set qVar of quantum variables 𝑞 1 , 𝑞 2 , . . . each associated with a Hilbert space of dimension 𝑑 𝑞1 , 𝑑 𝑞2 , . . . respectively. We restrict our set-up to a single quantum variable 𝑞 with associated Hilbert space H (𝑑) of dimension 𝑑, where 𝑑 is a positive natural number. In practice, H (𝑑) can be identified with C𝑑 . This loses no expressiveness if we limit ourselves to finitely many quantum variables: if these are of dimensions 𝑑1 , . . . , 𝑑 𝑛 can be combined into one register of dimension Î𝑛 𝑑 = 𝑖=1 𝑑𝑖 . Although, this requires lifting operations to the full space explicitly. Supporting multiple named quantum variables is left for future work. Classical-quantum states. Let L (𝑑) be the set of Hermitian operators (matrices) on H (𝑑) and D (𝑑) = {𝜌 ∈ L (𝑑) | 0 ⪯ 𝜌, Tr(𝜌) ≤ 1} the set of partial density operators, ordered by the Löwner order. A classical-quantum Í state Δ is a function Δ : Store Var → D (𝑑) with countable support whose total trace 𝜎 tr(Δ(𝜎)) is at most 1. In particular, any deficit 1 − ∥Δ∥ represents nontermination. In other words, for a classical store 𝜎, tr(Δ(𝜎)) is the probability of being in the classical branch 𝜎 and Δ(𝜎), suitably normalized, is the quantum state in that branch. We represent this as: def CQState (Var : Type) (d : N) : Type := {Δ : Store Var → D d // ∃ c, HasSum (fun 𝜎 ↦→ (Δ 𝜎).1.trace) c ∧ c ≤ 1}

which our formalization shows is equivalent to Definition 3.1 of Ref. 42; countable support need not be separately imposed, since a suitable family of non-negative reals has countable support (covered by HasSum). The formalization and proofs of this can be found in CQState.lean.44 Classical-quantum assertions. We define the set of unit-interval observables42 (quantum predicates) as O (𝑑) = {𝑀 ∈ L (𝑑) | 0 ⪯ 𝑀 ⪯ 𝐼}, where 0 and 𝐼 are the zero and identity matrix respectively. A classical-quantum assertion is a map Θ : Store Var → O (𝑑). This approach is inspired by classical probabilistic program logics, mirroring the use of by real-valued expectations there.98 We formalize this as follows, where Observable 𝑑 is our formalization of O (𝑑): abbrev CQAssertion (Var : Type) (d : N) : Type := Store Var → Observable d

As an example, Figure S2 shows how CQAssertion is used to express the clean-ancilla property for subroutines that initialize workspace qubits in |0⟩ and uncompute them upon completion. Similarly to CQState, CQAssertion has a partial order: we can lift the Löwner order on observables by declaring Θ1 ⪯ Θ2 , if Θ1 (𝜎) ⪯ Θ2 (𝜎) for all classical stores 𝜎. Note that since we work with a single quantum variable, in contrast to Ref. 42, we need not impose further conditions on the quantum variables used when defining the order. CQAssertion is a pointed 𝜔-CPO with respect to the Löwner order: it has a least element,

16

def RealizesCleanSubroutine {Var : Type} [DecidableEq Var] {n k m : N} (rTarget : QRegister k n) (rAnc : QRegister m n) (_hdisj : rTarget.DisjointWires rAnc) (U : Unitary (2 ^ k)) (P : QProg Var (2 ^ n)) : Prop := ∀ (M : Observable (2 ^ n)), let post : CQAssertion Var (2 ^ n) := .restrictToZeroAncilla (fun _ ↦→ M) rAnc {{ post.qAssign (rTarget.embedUnitary U) |>.restrictToZeroAncilla rAnc }} P {{ post }}

Figure S2: A formal definition of the clean-ancilla property. Here, a program P implements the unitary 𝑈 on register rTarget and returns the disjoint ancilla register rAnc to |0 · · · 0⟩: for every predicate 𝑀, from any input with clean ancillas, P must end with clean ancillas and satisfy 𝑀 at least as often as applying 𝑈 would. Since 𝑀 is arbitrary, P acts exactly as 𝑈 on all such inputs. and every increasing chain Θ0 ⪯ Θ1 ⪯ · · · has a supremum. This structure is crucial as it allows us to define the weakest precondition on a while loop as the supremum of the weakest preconditions of its finite unrollings and to prove the soundness of the while loop rule. In most logics, assertions form a complete lattice, a stronger structure in which every set of assertions has a supremum and an infimum. This matters in practice: existing verification generator frameworks such as Lean’s vcgen tactic99 and Loom100,101 require this. The observables on a Hilbert space of dimension at least 2,102 do not even form a lattice under the Löwner order, so these frameworks are not presently applicable. Therefore, we implemented the quantum Hoare logic and weakest precondition calculus from scratch. At first glance, the formalization of CQAssertion above differs from Definition 3.5 of Ref. 42, which includes the two conditions on Θ : Store Var → O (𝑑): 1. The image set Θ(Store Var) is countable; 2. For each 𝑀 ∈ Θ(Store Var), the preimage Θ−1 (𝑀) is definable by a classical assertion. We do not need to impose condition (1) separately: when the set of classical variables Var is finite, Store Var = Var → Z is countable, so the image of Θ : Store Var → O (𝑑) is automatically countable. We prove this in CQAssertion.equivCountable. Condition (2) holds automatically since we represent classical assertions as predicates Store Var → Prop. However, if the classical assertions are first-order logic formulas over Var as is stated in the beginning of Section 3.2 of Ref. 42, cq-assertions are no longer closed under suprema of increasing chains in the Löwner order and therefore, not an 𝜔-CPO. We encounter the same roadblock to the 𝜔-CPO structure if we explicitly impose condition (1) on the cq-assertions while allowing countably infinitely many classical variables, as opposed to obtaining it naturally by restricting to finitely many classical variables. The full formalization can be found in CQAssertion.lean.44 Expectation. To reason about program correctness, we need a quantifiable notion of how much a cq-state satisfies a cq-assertion. In the quantum case, this is no longer a boolean predicate; instead, we consider the expectation of a cq-state Δ satisfying a cq-assertion Θ: △

E[Δ, Θ] =

∑︁

tr(Θ(𝜎) Δ(𝜎)) ∈ [0, 1].

(1)

𝜎

This can be thought of as the expected satisfaction of Θ in state Δ, averaging over all possible classical branches 𝜎. Note that since we have one quantum variable, our formula is a simplified version of Definition 3.7 in Ref. 42.

17

We formalize Equation 1 as follows: def expect (Δ : CQState Var d) (𝜃 : CQAssertion Var d) : R := notation "E[" Δ ", " 𝜃 "]" => expect Δ 𝜃

Í

' 𝜎, ⟨⟨(𝜃 𝜎).val, Δ 𝜎⟩⟩_R

This definition and Equation 1 are equivalent: the inner product of the Hermitian matrices Θ(𝜎) and Δ(𝜎) is the real value of the trace of their product as defined in Equation 1. The prime around the sum stands for Mathlib’s tsum, or topological sum, the limit of finite partial sums of possibly infinite index type. Finally, expect Δ Θ takes values in the unit-interval, even though its return type is the real numbers. This follows from the trace of positive semi-definite matrices being non-negative combined with lemmas we prove in our library establishing the term inside the sum is bounded above by 1 (see theorems expect_mono, expect_top, CQState.trace_le_one in Expectation.lean44 ). Syntax. Programs are expressed in the following variant of the classical-quantum imperative while-language of Feng and Ying42 : 𝑃 ::= skip | abort | 𝑥 := 𝑒 | qset | apply 𝑈 | 𝑥 := measure M | 𝑃1 ; 𝑃2

(2)

| qif 𝑏 then 𝑃1 else 𝑃2 | qwhile 𝑏 loop 𝑃 Our formalization diverges from Ref. 42 in the following ways: we omit random assignment 𝑥 :=$ 𝑔, we work with a single quantum system rather than several quantum variables, and we represent expressions 𝑒 and guards 𝑏 directly as Lean functions on the classical store. We embed this language in Lean as an inductive datatype QProg, with the commands as constructors. A QProg program is parameterized by a finite type Var of integer-valued classical variables 𝑥 and on a single 𝑑-dimensional quantum system (𝑑 an arbitrary positive natural number, with 𝑑 = 2𝑛 for 𝑛 qubits). Classical expressions 𝑒 : Store Var → Z and decidable guards 𝑏 : Store Var → Prop are shallowly embedded as functions of the classical store 𝜎, avoiding the need to encode boolean guards as nonzero integers and aligning branch conditions directly with Lean’s propositional tactics. The command qset resets the quantum system to |0⟩, apply 𝑈 applies a unitary operator 𝑈, and 𝑥 := measure M performs an 𝑖-outcome quantum measurement Í with Kraus operators M = {𝑀𝑜 } 𝑜<𝑖 , 𝑜 𝑀𝑜† 𝑀𝑜 ⪯ 𝐼, storing the outcome 𝑜 in 𝑥. The commands qif and qwhile respectively branch and loop on classical guards. As an example, simple applications of qwhile provide support for repeat-until-success loops. Denotational semantics for QProg are given in Figure S3. Weakest Preconditions. Program verification is performed backwards using the weakest precondition (wp) transformer (Figure S3), which takes a program and a target postcondition and computes the weakest assertion that must hold before execution: wp : QProg Var 𝑑 → CQAssertion Var 𝑑 → CQAssertion Var 𝑑 This formalizes the predicate transformer of Table 3 in Ref. 42. Since we are interested in terminating classicalquantum programs, we focus our attention on total correctness. Therefore, we formalize the weakest precondition calculus from Ref. 42 and omit the weakest liberal preconditions, which are only needed for partial correctness. Particularly, given a classical-quantum program 𝑃 and a postcondition Ψ, wp 𝑃 Ψ computes the “weakest” cq-assertion whose expectation in any initial state Δ equals the expectation of Ψ in the state reached after executing 𝑃. Since cq-assertions form an 𝜔-CPO under the Löwner order, the weakest precondition is the largest element with respect to the Löwner order for which the desired postcondition still holds. The wp rules on basic commands are described in Figure S3. They are all faithfully formalized to the source, apart from the syntax and variable-type choices in QProg, and can be found in WP.lean.44

18

We use the weakest precondition calculus to prove total-correctness Hoare triples {{Θ}} 𝑃 {{Ψ}}, formalized as propositions: def Triple (Θ : CQAssertion Var d) (c : QProg Var d) (Ψ : CQAssertion Var d) : Prop := ∀ Δ : CQState Var d, E[Δ, Θ] ≤ E[(interp c).toStateFun Δ, Ψ]

Here (interp 𝑐).toStateFun Δ formalizes the output state ⟦𝑐⟧(Δ) of Figure S3. The central property connecting the forward denotational semantics and the backward wp transformer is exact expectation duality (Lemma 4.14 in Ref. 42): theorem expect_wp (c : QProg Var d) (Δ : CQState Var d) (Ψ : CQAssertion Var d) : E[Δ, wp c Ψ] = E[(interp c).toStateFun Δ, Ψ]

Exact expectation duality (expect_wp) immediately implies soundness: that wp 𝑐 Ψ is itself a valid precondition, and that it is indeed the weakest such precondition. These are formalized in wp_soundness and wp_weakest in WP.lean. Resource Counting and Cost Models. Alongside correctness, our library supports two ways of calculating the resource cost of a program: syntactic gate counting over structured circuits, and semantic expected-cost accounting over program executions with branching and unbounded loops. At the circuit level, straight-line circuits are represented as the inductive type Circuit parametrized by the number of wires 𝑛. This is built sequentially from nine primitive unitary gates PrimitiveGate (Clifford+𝑇, SWAP and TOFF gates). The count of each gate type is obtained simply by summing its occurrences along the sequence. Because each gate type is tracked separately, the cost assigned to each gate is tunable in a specification (for instance, counting only 𝑇 gates while treating Cliffords as free). Circuits can also include mid-circuit single-qubit measurements and classical branching, packaged in the type DynamicCircuit which appears in the problems described in this work. For these, we set the resource counting to have measurements add 0 to gate counts, while the cost of a classical branch is the maximum of its two branch counts, giving a worst-case bound. Through the typing of the output circuit, we also keep track of the number of qubits used to include in resource counts. All of this can be found in the folder Circuits, with basic definitions in Basic.lean, and the resource counting framework in ResourceCounting.lean. To calculate exact expected resource usage directly on QProg, a user-supplied cost model (CostModel) assigns nonnegative integer weights 𝑤 to each primitive command (assignmentCost, resetCost, measurementCost, and unitaryCost). Unitary and measurement weights may depend on the operator applied. For instance, one can charge 1 for a designated oracle unitary and 0 for all other operations. Í Given 𝑤 and an initial cq-state Δ with total trace ∥Δ∥ = 𝜎 tr(Δ(𝜎)), the branch-weighted expected cost cost𝑤 (𝑃, Δ) (expectedCost) is defined by structural recursion on 𝑃 alongside the denotational semantics ⟦𝑃⟧(Δ): cost𝑤 (skip, Δ) = cost𝑤 (abort, Δ) = 0,

cost𝑤 (𝑐, Δ) = ∥Δ∥ · 𝑤(𝑐),

cost𝑤 (𝑃1 ; 𝑃2 , Δ) = cost𝑤 (𝑃1 , Δ) + cost𝑤 (𝑃2 , ⟦𝑃1 ⟧(Δ)), cost𝑤 (qif 𝑏 then 𝑃1 else 𝑃2 , Δ) = cost𝑤 (𝑃1 , Δ| 𝑏 ) + cost𝑤 (𝑃2 , Δ| ¬𝑏 ), Ä cost𝑤 (qwhile 𝑏 loop 𝑃, Δ) = 𝐶𝑛 (Δ), 𝐶0 (Δ) = 0, 𝐶𝑛+1 (Δ) = cost𝑤 (𝑃, Δ| 𝑏 ) + 𝐶𝑛 (⟦𝑃⟧(Δ| 𝑏 )), 𝑛≥0

(3) for primitive commands 𝑐, taking values in [0, ∞] so that loop suprema always exist. The total trace, which could also be seen as the probability mass of entering the current branch of the program, is formalized as stateMass. Our library provides compositional rules to upper-bound cost𝑤 (𝑃, Δ) across sequences, branches, and loops, bounding a qwhile loop by its per-iteration cost times the expected number of iterations, which can

19

Program 𝑃

Denotational semantics ⟦𝑃⟧(Δ)

Weakest precondition wp(𝑃, Ψ)

skip

Δ

Ψ

abort

0

0

𝑥 := 𝑒

Í 𝜎 ′ ↦→

qset

𝜎 ↦→ Tr(Δ(𝜎)) |0⟩⟨0|

𝜎 ↦→ ⟨0|Ψ(𝜎)|0⟩ 𝐼

apply 𝑈

𝜎 ↦→ 𝑈 Δ(𝜎) 𝑈 †

𝑥 := measure M

𝜎 ′ ↦→

𝜎 ↦→ 𝑈 † Ψ(𝜎) 𝑈 Í 𝜎 ↦→ 𝑜 𝑀𝑜† Ψ(𝜎[𝑥 ↦→ 𝑜]) 𝑀𝑜

𝑃1 ; 𝑃2

⟦𝑃2 ⟧(⟦𝑃1 ⟧(Δ))

wp(𝑃1 , wp(𝑃2 , Ψ))

qif 𝑏 then 𝑃1 else 𝑃2

⟦𝑃1 ⟧(Δ| 𝑏 ) + ⟦𝑃2 ⟧(Δ| ¬𝑏 ) Ã 𝑛≥0 𝑊𝑛 (Δ)

wp(𝑃1 , Ψ)| 𝑏 + wp(𝑃2 , Ψ)| ¬𝑏 Ã 𝑛≥0 Ψ𝑛

qwhile 𝑏 loop 𝑃

Í

𝜎: 𝜎 [ 𝑥↦→𝑒 ( 𝜎) ]=𝜎 ′ Δ(𝜎)

† 𝑜 𝑀𝑜 ⟦𝑥 := 𝑜⟧(Δ) 𝑀𝑜

where 𝑊𝑛+1 (Δ) = Δ| ¬𝑏 + 𝑊𝑛 (⟦𝑃⟧(Δ| 𝑏 ) ) ,

𝜎 ↦→ Ψ(𝜎[𝑥 ↦→ 𝑒(𝜎)])

Ψ𝑛+1 = wp( 𝑃, Ψ𝑛 ) | 𝑏 + Ψ| ¬𝑏 .

Figure S3: Inductive definitions of the denotational semantics ⟦𝑃⟧(Δ) and weakest precondition wp(𝑃, Ψ). For a guard 𝑏, Δ| 𝑏 retains Δ(𝜎) where 𝑏(𝜎) ≠ 0 and sets all other branches to 0 (similarly for Ψ| 𝑏 and ¬𝑏). Loop unrollings start from 𝑊0 (Δ) = 0 and Ψ0 = 0. itself be bounded via wp. These definitions and compositional rules on the costs (formalized as CostBound) are mechanized in QuantumHoareLogic/ResourceCounting. Each problem specification specializes this framework along two axes. First, the counted resource is chosen to match the computational model, such as gate counts & spacetime, or black-box oracle calls (charging weight 1 per oracle application and 0 for all other operations, as in parallel Grover search; Appendix E). Second, costs can be measured either as concrete numerical bounds at a fixed problem size (like the arcsin problem) or as asymptotic bounds. In many cases, these asymptotic bounds are enforced to be of the form 𝑐 · 𝑁 𝑎 as the input size 𝑁 grows, ordered lexicographically on (𝑎, 𝑐), which gives a straightforward ordering on discovered solutions.

B. Verification Pipeline Each problem is defined by a specification file pinned to a frozen repository commit, declaring the target correctness theorem and resource-cost function with typed sorry placeholders for the candidate construction, workspace parameters, and proofs (Sec. 1.1). Because agents may game local checks without discovering or improving the algorithm, for instance by weakening theorem statements, modifying helper definitions, adding axioms, disabling local kernel checks, or misreporting costs,56,103 candidate grading is isolated from the agent environment. Every submission is replayed in a clean sandbox by an external verifier using the Lean Comparator57 against the frozen specification. A submission passes only if: (i) all target theorem statements and every transitive definition they depend on match the specification; (ii) the compiled proof terms depend solely on standard Lean axioms (propext, Quot.sound, and Classical.choice), with no sorry or custom axioms; and (iii) the proved resource theorem reduces to the claimed closed-form cost. The same check runs automatically before any solution is merged into the shared wiki. Numerical estimates and agent-reported figures are used only internally by teams to prioritize search directions, whereas researchers need only audit the physical model and cost conventions of the specification itself, revising the pinned specification if an unintended modeling loophole is found.

20

C. Multi-Agent Orchestration Agent teams. Each researcher configures and operates an independent team of LLM agents, choosing the agent framework, models, prompts, and division of labor. Setups ranged from a single agent iterating on a candidate construction to multi-agent hierarchical organizations that split subroutine design, error analysis, and Lean proof engineering across specialized workers. In this study, researchers put their domain knowledge, discussion, and design into the problem specification itself rather than seeding domain knowledge or steering the research while underway, though the workflow naturally supports active human seeding and steering as well. During exploration, agents may invoke any external tools, including natural-language derivations, classical simulation, numerical optimization, and remote compute clusters. Shared wiki. Teams exchange persistent artifacts through a version-controlled repository with one directory per problem.55,104 Each entry contains: (i) the current best verified solution, which any new run can adopt as its starting point; (ii) reusable partial Lean files verified to compile against the shared library; and (iii) reviewed notes classifying explored idea families as verified, promising, or dead ends, alongside short technical lessons. Whereas solutions and partial Lean files are machine-checked, idea notes are reviewed summaries rather than formal proofs (see Fig. S4). A candidate solution is merged only if it passes automatic re-verification against the frozen specification and clears a minimum relative cost-improvement threshold (5% by default) so that teams do not spend effort adapting to frequent minor updates. Because verified Lean solutions grow large across successive iterations, problems with established solutions also accept updates that substantially shorten the Lean code (by at least 20%) while strictly reducing cost, keeping files within agent context limits and reducing Lean compilation time. Recording negative results with concrete obstructions (such as numerical counterexamples or Lean lemmas) prevents later runs across all teams from repeating known dead ends. problems/stopping-power/ README.md current best solution and leaderboard StoppingPower/ best/Solution/ best verified solution, split into Lean modules machine-checked history.md verified records, each crediting its teams lean/ reusable partial Lean modules machine-checked ideas/ reviewed notes: verified promising dead-end

Figure S4: Layout of one problem directory in the shared wiki (stopping power). The best solution and the reusable partial Lean modules are checked by the external verifier against the frozen specification before merging, while idea notes are reviewed summaries labeled verified, promising, or dead-end. Each verified record in history.md lists the teams credited for it.

Conferences. Because many useful exchanges discuss unverified conjectures, teams convene periodically every four hours on a shared forum open across participating researchers and agent frameworks. During each session, agents pose questions, critique claims, and propose candidate constructions for other teams to test (see Fig. S5). Discussion rules encourage direct replies between teams as opposed to standalone status reports, preventing the one-way broadcasting typical of unstructured agent boards.105,106 To uphold the correctness of intermediate work, statements and cost projections posted in a conference carry no weight until independently verified and published to the wiki.

21

Wiki record #1 · Team 2 · PR #N

verified

𝑄 · T = 6.34 × 1017 . One 288-qubit shared ancilla register is reused by every step of the circuit. read from the wiki 1

Team 3 · re-verifies and proposes Re-checks Team 2’s record, then proposes two changes on top of it: a smaller subroutine and a catalyst prepared without scratch qubits. “Independently verified merged PR #N . . . on our checker.” “compresses [the subroutine] from 1,098 .TOFF down to 109 .TOFF . . . (+0 ancillas, . . . UNVERIFIED, Lean proof in progress)” “est. −25.. −28 Q, UNVERIFIED” 2

Team 1 · endorses and asks (reply to 1) Agrees the catalyst change is sound and asks how Team 3 will prove the 109-Toffoli subroutine correct. “is a clean way to eliminate [the 28 scratch qubits] because the catalyst is prepared only once per shot” lence . . . by factoring the 67-wire circuit . . . or by symbolic . . . normalization?” 3

“are you proving the equiva-

Team 3 · answers (reply to 2) Gives the proof plan: split the circuit into three blocks, each checked by a small case analysis. “the circuit is structured as [three blocks] (47 + 15 + 47 = 109 .TOFFs) . . . each stage closes by tiny finite case analysis” next conference session 4

Team 1 · critiques (reply to 3) Warns where the plan breaks once the subroutine sits inside Team 2’s record, gives the fix, and asks Team 3 to combine both changes. “pitfall: When lifting [the 109-Toffoli circuit] into . . . PR #N . . . proving the conjugation identity at the unitary . . . level before [substituting clean ancillas] avoids repeating the . . . proof across all 47 inverted Toffolis.” “are you pairing [the subroutine] with your [catalyst] ancilla reduction ( −25.. −28 Q)?” 5

Team 3 · confirms (reply to 4) Adopts Team 1’s proof strategy. “Confirmed on the proof-architecture point” verified and published to the wiki

Wiki record #2 · Team 3

verified

−14.5%

𝑄 · T = 5.42 × 1017 . “Builds on the 288-wire . . . baseline (PR #N) by composing 7 orthogonal verified seams”, including: • catalyst prepared with 0 ancillas (𝑄 : 4,431 → 4,406) ← proposed in 1, endorsed in 2 • 109-Toffoli subroutine ← proposed in 1, proof plan in 3–5 Credited authors: Team 3 agents and Team 2.

Figure S5: A cross-team conference exchange between two verified records in the stopping power problem (records #1 and #2 of Fig. 5c). Each numbered post replies directly to the one above it, across two conference sessions. Colored bars mark the team, the italic line is an analysis summary, and quoted text is verbatim from the conference; “. . .” marks omitted text, and words in square brackets, such as [the subroutine], replace Lean code snippets used in the original posts.

22

Table S1: Fault-tolerant capability regimes and hardware horizons. Summary of the capability regimes referenced in Fig. 3b, listing plotted dashed-line midpoints (𝑄, T ), nominal upper-bound ceilings (𝑄max , Tmax ) (rendered in Fig. 3b with 14-step normal-quantile feathering spanning 𝑄 ≈ 5.9 × 102 –1.7 × 103 , T ≈ 3.5 × 108 –2.9 × 109 for teraquop planar and 𝑄 ≈ 5.0 × 103 –2.0 × 104 , T ≈ 3.5 × 1010 –2.9 × 1011 for FASQ), nominal spacetime volume 𝑄 · T, and representative benchmarks and references. Capability regime

Midpoint (𝑄, T )

𝑄 ceiling

T ceiling

𝑄· T

Benchmarks & references

Medium-term FTQC (teraquop)

(103 , 109 )

5×102 –2×103

3×108 –3×109

1012

Application-scale FTQC (FASQ)

(104 , 1011 )

5×103 –2×104

3×1010 –3×1011

1015

Cytochrome P450; compact catalysis & ECC7,60,61,88,89,113,114,118 Stopping power, C23 H20 N3 O dynamics; catalysis, materials & RSA1–3,27,48,58,115,119,120,122

D. Fault-Tolerant Cost Metric and Hardware Horizons D.1. Logical spacetime volume and architectural assumptions Throughout the fault-tolerant benchmarks in this work, candidate circuits and literature baselines are compared at matched system encodings and error budgets by their logical spacetime volume 𝑄 · T , defined as total peak logical qubits 𝑄 (including clean workspace ancillas) multiplied by total 𝑇-gate count T , pricing clean-ancilla Toffoli gates at 4 T via measurement-based temporary-AND uncomputation.23,107,108 This metric models compilation onto two-dimensional planar surface-code architectures using lattice surgery.43,109,110 Because Clifford gates can be tracked in the classical Pauli frame or absorbed into multi-qubit Pauli product measurements, faulttolerant overhead is dominated by preparing non-Clifford magic states through distillation or cultivation.43,111–113 Under Pauli-based or serial-factory execution—where magic states are consumed at a fixed logical cycle rate— execution time tracks T while memory footprint tracks 𝑄, making 𝑄 · T proportional to 𝑄 logical · 𝐷 cycles , the topological spacetime volume.1,2,43,89,114,115 Optimizing 𝑄 ·T also regularizes space–time tradeoffs against degenerate extremes—neither permitting unbounded clean-ancilla QROAM replication to suppress 𝑇-gate count4,24,116 nor forcing deep ancilla-starved recomputation to save a handful of qubits10,117 —and aligns directly with the (𝑄, Toffoli/T ) metrics reported across standard resource-estimation benchmarks.3,27,48,58,60,88,118,119 Physical device cost departs from 𝑄·T in two principal architectural regimes. First, provisioning parallel magicstate factories compresses execution depth from T toward 𝑇-depth at the expense of dedicated factory footprint and routing overhead.1,43,115 Second, architectures incorporating non-local connectivity, high-rate quantum lowdensity parity-check (qLDPC) memory, or Active Volume compilation decouple idle memory storage from active reaction layers, lowering the spatial cost of inactive data qubits relative to active workspace.61,89,90,120,121 Because every verified scientific simulation in Fig. 3b reduces both 𝑄 and T relative to its baseline, our improvements hold under any monotone weighting of logical space and non-Clifford-gate count.

D.2. Fault-tolerant capability regimes and hardware horizons To place end-to-end logical resource counts in hardware context, Fig. 3b overlays two fault-tolerant capability regimes (Table S1) as upper-bound resource envelopes (𝑄 ≤ 𝑄 max , T ≤ Tmax ), with dashed lines at reference midpoints and feathered boundaries reflecting spread across estimates. Medium-term FTQC (teraquop planar). Gidney et al.114 (Sec. 2.1) define the teraquop scale at 1012 reliable logical operations (∼ 103 logical qubits over ∼ 109 steps at per-step error ∼ 10−12 ), and Low et al.61 quantify how denser planar surface-code layouts and magic-state cultivation set the corresponding qubit and 𝑇-gate ceilings across planar code distances. This regime sits at midpoint 𝑄 = 103 , T = 109 , and 𝑄 · T = 1012 , with feathered ceiling 𝑄 ∈ [5 × 102 , 2 × 103 ] and T ∈ [3 × 108 , 3 × 109 ].

23

Fundamental primitives of the adaptive query model 1 qset (+0)

2 step (+0)

3 oracle (+1) 4 measure (+0)

5 qif / qwhile

𝑛+1

𝑂𝑆

slot 1

|0⟩ ⊗𝑄

𝑛+1

∈ U(2𝑄 )

slot 𝑚

qif

𝑈

𝑏′ ( 𝜎)

𝑂𝑆

¬𝑏 ( 𝜎) → out (+0)

𝑤

work 𝑦

𝜎0 ∈ Σ qwhile 𝑏 ( 𝜎) (trace-weighted)

Figure S6: Parallel Grover query model. Workspace allocation (qset, +0 query cost) initializes 𝑚 query registers of 𝑛 + 1 qubits and 𝑤 ancilla qubits in |0⟩ ⊗𝑄 together with a classical state 𝜎 ∈ Σ. Unitary evolution (step, +0) applies any 𝑆-independent unitary 𝑈 ∈ U(2𝑄 ) across all 𝑄 qubits. Parallel oracle querying (oracle, +1) applies 𝑂𝑆⊗𝑚 (Eq. (5)) simultaneously across 𝑚 disjoint (𝑛 + 1)-qubit subregisters. Projective measurement (measure, +0) measures a subregister into classical variable 𝑦 in 𝜎 while leaving unmeasured wires coherent. Classical control (qif/qwhile; Appendix A) branches and loops on predicates of 𝜎, weighting each oracle round by the active-branch Í probability 𝜎: 𝑏 ( 𝜎) Tr(Δ𝑡 ( 𝜎) ) until ¬𝑏 ( 𝜎) outputs the result.

Application-scale FTQC (FASQ / petaquop). Preskill2 defines the fault-tolerant application-scale quantum (FASQ) regime for full-scale scientific and cryptographic workloads, and Beverland et al.1 (Table I) establish the logical-qubit and 𝑇-gate budgets required across materials, chemistry, dynamics, and factoring. This regime sits at midpoint 𝑄 = 104 , T = 1011 , and 𝑄 · T = 1015 , with feathered ceiling 𝑄 ∈ [5 × 103 , 2 × 104 ] and T ∈ [3 × 1010 , 3 × 1011 ].

E. Parallel Grover Search E.1. Problem specification and oracle model Given a search space {0, . . . , 𝑁 − 1} of size 𝑁 = 2𝑛 (𝑛 ≥ 1) and an unknown marked subset 𝑆 ⊆ {0, . . . , 𝑁 − 1} of known size |𝑆| = 𝑘 ≤ 𝑁, we study two exact (zero-error) search problems across (𝑚, 𝑘) ∈ {1, 2, 4, . . . , 1024}2 (121 settings): Find-Any, which must terminate with probability 1 and output an index 𝑥 ∈ 𝑆, and Find-All, which must terminate with probability 1 and output all 𝑘 elements of 𝑆 (so algorithms cannot trade error probability for fewer queries). We allow up to 𝑚 parallel queries per round63,123 (Fig. S6). Access to 𝑆 is given by the (𝑛 + 1)-qubit reversible marking oracle 𝑂 𝑆 |𝑏⟩|𝑥⟩ = |𝑏 ⊕ [𝑥 ∈ 𝑆]⟩|𝑥⟩,

𝑏 ∈ {0, 1}, 𝑥 ∈ {0, . . . , 𝑁 − 1},

(4)

where 𝑏 is a single-qubit target bit and 𝑥 is the 𝑛-qubit index. Starting from |0⟩ ⊗𝑄 on an unconstrained 𝑄-qubit workspace, an algorithm interleaves zero-cost 𝑆-independent unitaries, projective measurements, and classical branching or loops with parallel 𝑚-query rounds 𝑂 𝑆⊗𝑚 =

𝑚 Ì

( 𝑗)

𝑂𝑆

(5)

𝑗=1

on any 𝑚 disjoint (𝑛 + 1)-qubit registers, weighted in expectation by the probability of being in an active loop branch. To query fewer than 𝑚 registers in a round, the remaining target qubits are prepared in |+⟩, on which 𝑂 𝑆 acts as the identity. Our cost metric is the expected number of parallel query rounds (query depth). Depending on how the target qubit 𝑏 is prepared (and optionally measured), a single call to 𝑂 𝑆 implements three Í operations. Preparing |𝑏⟩ = |−⟩ applies the phase flip (𝐼 − 2Π𝑆 ) for Π𝑆 = 𝑥 ∈𝑆 |𝑥⟩⟨𝑥|, while preparing |𝑏⟩ = |0⟩ and measuring 𝑏 tests whether 𝑥 ∈ 𝑆 (and once a subset 𝐹 ⊆ 𝑆 has been found, unmarking 𝐹 via |𝑏⟩|𝑥⟩ ↦→ |𝑏 ⊕ [𝑥 ∈ 𝐹]⟩|𝑥⟩ is independent of 𝑆 and costs zero queries). More generally, preparing | 𝜒𝛾 ⟩ = cos 𝛾 |0⟩ −sin 𝛾 |1⟩ for 𝛾 ∈ (0, 𝜋/4) leaves | 𝜒𝛾 ⟩ unchanged for 𝑥 ∉ 𝑆 while mapping | 𝜒𝛾 ⟩ ↦→ − sin(2𝛾)| 𝜒𝛾 ⟩ + cos(2𝛾)| 𝜒𝛾⊥ ⟩ for 𝑥 ∈ 𝑆, where | 𝜒𝛾⊥ ⟩ = sin 𝛾 |0⟩ + cos 𝛾 |1⟩. Measuring 𝑏 in {| 𝜒𝛾 ⟩, | 𝜒𝛾⊥ ⟩} therefore applies, with 𝜅 = cos2 (2𝛾) ∈ (0, 1), √ √ 𝑀0 = (𝐼 − Π𝑆 ) − 1 − 𝜅 Π𝑆 (outcome | 𝜒𝛾 ⟩): (6) 𝑀1 = 𝜅 Π𝑆 (outcome | 𝜒𝛾⊥ ⟩),

24

a click (| 𝜒𝛾⊥ ⟩) projects onto 𝑆 with no false positives, while a no-click (| 𝜒𝛾 ⟩) only slightly damps the marked amplitude and still flips its sign by −1 for the next Grover diffusion step. To compare algorithms independent of the domain size 𝑁 = 2𝑛 , let E[𝐷 𝑛 (𝑆)] be a program’s expected query  −1 Í depth on marked set 𝑆, and let 𝐷 𝑛,𝑚,𝑘 = 𝑁𝑘 |𝑆 |=𝑘 E[𝐷 𝑛 (𝑆)] be its average over all 𝑘-element subsets (which equals the worst-case expected depth over |𝑆| = 𝑘, since indices can be randomly permuted at zero query cost). We normalize 𝐷 𝑛,𝑚,𝑘 by the fixed reference scales 𝜋 any 𝐷 std (𝑁, 𝑚, 𝑘) = 4

√︂

𝑁 , 𝑚𝑘

𝐷 all std (𝑁, 𝑚, 𝑘) =

𝑘 ∑︁ 𝜋 𝑟=1

4

√︂

𝑁 𝜋 = 𝐻 𝑘(1/2) 𝑚𝑟 4

√︂

𝑁 , 𝑚

𝐻 𝑘(1/2) =

𝑘 ∑︁ 1 √ , 𝑟 𝑟=1

(7)

and certify in Lean a rational constant 𝑅(𝑚, 𝑘) satisfying 𝐷 𝑛,𝑚,𝑘 ≤ 𝑅(𝑚, 𝑘) 𝐷 std (2𝑛 , 𝑚, 𝑘) for all sufficiently large 𝑛. Because 𝐷 std is only a fixed reference scale rather than a lower bound, all speedups are computed as ratios against published baselines in the same metric, so 𝐷 std cancels out.

E.2. Published prior baselines √ Every quantum search protocol obeys Θ( 𝑁) scaling in domain size,62,63,124 with parallel round lower bounds √︁ Ω( 𝑁/(𝑚𝑘)) for Find-Any (Zalka’s bound63 for 𝑘 = 1; the general case follows from the parallel adversary √︁ bound123 ) and Ω( 𝑁 𝑘/(𝑚 min(𝑚, 𝑘))) for Find-All,65 so protocols at fixed (𝑚, 𝑘) compete on their asymptotic leading constant 𝑟 (𝑚, 𝑘) = lim 𝑁 →∞ 𝐷 𝑛,𝑚,𝑘 /𝐷 std (𝑁, 𝑚, 𝑘). Prior work spans exact and fixed-point amplitude amplification9,125–128 ; early-stopped projective restarts with domain partitioning, independent parallel runs, or sequential strike-out62–64,129 ; and damped or weakly measured loops.66,130,131 We compare against the strongest published protocol in each (𝑚, 𝑘) regime, together with the direct combination of Zalka’s partition63 and weakly measured search66 on the 𝑘 = 1 boundary (Fig. S7). Parallel quantum-walk and learning-graph algorithms123 target multi-element certificates and do not tighten these baselines. Boundary regime (𝑚 = 1 or 𝑘 = 1; BBHT, ZK, WG). On a single register (𝑚 = 1) with 𝑘 marked items, √︁ √︁ each Grover iteration rotates the state toward 𝑆 by 2𝜃 = 2 arcsin 𝑘/𝑁 ≈ 2 𝑘/𝑁, so 𝑗 iterations reach angle √︁ 𝜙 = (2 𝑗 + 1)𝜃 ≈ 2 𝑗 𝑘/𝑁 and find a marked item upon measurement with probability sin2 𝜙. Standard Grover runs to 𝜙 = 𝜋/2 (𝑟 = 1), where sin2 𝜙 flattens out and the final queries buy little success probability. Boyer, Brassard, Høyer and Tapp62 (BBHT) instead stop early at 𝜙 < 𝜋/2 and restart from scratch on failure: each run √︁ √︁ costs 𝑗 ≈ 𝜙2 𝑁/𝑘 queries and succeeds after 1/sin2 𝜙 expected runs, minimizing expected queries 2 sin𝜙2 𝜙 𝑁/𝑘 at 2𝜙∗ 𝑟 BBHT = ≈ 0.878567, tan 𝜙∗ = 2𝜙∗ (𝜙∗ ≈ 1.1656, sin2 𝜙∗ ≈ 0.845). (8) 𝜋 sin2 𝜙∗ Across the 𝑚 = 1 and 𝑘 = 1 boundaries of Find-Any and Find-All (which coincide when 𝑘 = 1), 𝑟 BBHT sets the projective-restart baseline. For 𝑘 = 1 and 𝑚 ≥ 2 in both tasks, Zalka63 (ZK) splits {0, . . . , 𝑁 − 1} into 𝑚 disjoint blocks of size 𝑁/𝑚 so the unique block containing the target runs at 𝜙∗ (𝑟 ZK = 𝑟 BBHT ). For 𝑚 = 1 and 𝑘 ≥ 2 in Find-All, repeating early-stopped search 𝑘 times while unmarking each found item at zero query cost62,129 achieves 𝑟 BBHT at every stage. On the single-register boundary (𝑚 = 1, 𝑘 ≥ 1 for Find-Any, and (1, 1) for Find-All), early-stopped projective search is superseded by Fang and Heunen’s weakly measured loop66 (WG), which avoids discarding the amplified state when a check misses. Instead, WG first runs standard Grover halfway to 𝛼∗ = 𝜋/4 (50% marked weight, √︁ any costing 12 𝐷 std ), and then alternates calibrated weak checks (Eq. (6), 𝜅 ≈ 8 𝑘/𝑁) with single zero-query diffusion

25

a Published baselines and verified bounds Find-Any Reference

Evaluation in metric

Regime

Boyer et al.62 (BBHT, Eq. (8)) Early-stop restart + strike-out — Zalka63 (ZK, Eq. (8)) 𝑚-block partition + early stop 𝑚≥2, 𝑘=1 Gingrich et al.64 (GW, Eq. (10)) Unpartitioned 𝑚-slot early stop 𝑚, 𝑘 ≥2★ Grover & Radhakrishnan65 (GR0) Two-pass 𝑚-block staircase (𝑡1∗ ) — Fang & Heunen66 (WG; +ZK, Eq. (9)) Calibrated weak loop (+ZK at 𝑘=1) 𝑚=1 or 𝑘=1★

Find-All Rel. rounds Regime

Rel. rounds

— 𝑚=1, 𝑘 ≥2★ 0.879 𝑚≥2, 𝑘=1 0.942–0.997 — — 𝑚, 𝑘 ≥2★ 0.818 𝑘=1★

0.879 0.879 — 0.060–0.955 0.818

𝑚, 𝑘 ∈ {20 , . . . , 210 } 0.818 𝑚, 𝑘 ∈ {20 , . . . , 210 } 0.051–0.818 100/121 cells (𝑚, 𝑘 ≥2) up to 1.22× 110/121 cells (𝑘 ≥2) up to 1.41×

This work (Lean-verified circuits) Speedup vs. baseline envelope (Fig. 3d)

b Finding any one target

c Finding all 𝑘 targets

WG

GW

GR0

BBHT

0.88 0.73 0.52 0.38 0.28 0.20 0.15 0.12 0.09 0.07 0.06

512

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

512

0.88 0.73 0.53 0.39 0.28 0.21 0.16 0.13 0.10 0.08 0.07

256

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

256

0.88 0.74 0.54 0.40 0.30 0.23 0.18 0.14 0.11 0.10 0.08

128

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

128

0.88 0.75 0.56 0.41 0.31 0.24 0.19 0.16 0.13 0.11 0.10

64

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

64

0.88 0.77 0.57 0.44 0.34 0.26 0.21 0.18 0.16 0.13 0.12

32

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

32

0.88 0.79 0.60 0.46 0.36 0.30 0.24 0.21 0.18 0.17 0.16

16

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

16

0.88 0.82 0.63 0.50 0.40 0.34 0.28 0.26 0.23 0.19 0.17

8

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

8

0.88 0.86 0.68 0.55 0.45 0.41 0.35 0.29 0.26 0.24 0.24

4

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

4

0.88 0.88 0.72 0.64 0.52 0.44 0.40 0.38 0.37 0.36 0.36

2

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

2

0.88 0.95 0.77 0.68 0.63 0.61 0.60 0.59 0.59 0.59 0.59

1

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

1

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

0.80

0.60

0.40

0.20

Relative expected parallel rounds

1024

(1.00 = standard parallel Grover, Eq. (7))

0.82 0.94 0.97 0.98 0.99 0.99 1.00 1.00 1.00 1.00 1.00

Marked targets 𝑘

Marked targets 𝑘

1.00 1024

0.00 1

2

4

8

16

32

64

128

256

512 1024

1

ZK+WG

WG

Parallel queries per round 𝑚

2

4

8

16

32

64

128

256

512 1024

Parallel queries per round 𝑚 ZK+WG

Figure S7: Published parallel Grover baselines and verified bounds across 𝑚, 𝑘 ∈ {1, 2, 4, . . . , 1024}. a Each row evaluates a prior baseline protocol in our zero-error asymptotic metric (★ marks the winning baseline in each regime); the bottom rows summarize our Lean-verified circuits and speedups over the baseline envelope. Values report asymptotic expected parallel rounds as 𝑁 = 2𝑛 → ∞ relative to 𝐷std (Eq. (7)). b, c Winning baseline envelopes for finding any one (b) or all 𝑘 (c) targets, with dashed contours marking regime boundaries.

26

steps. Whenever a check does not click, its slight damping and −1 phase flip are offset by the diffusion step to any return the state back to 𝜋/4 without losing superposition; waiting for a click adds 𝜋1 𝐷 std expected queries, giving 𝑟 WG =

1 1 + ≈ 0.818310. 2 𝜋

(9)

For 𝑘 = 1 and 𝑚 ≥ 2 in both tasks, running WG inside each of Zalka’s 𝑚 disjoint blocks of size 𝑁/𝑚 (ZK+WG) is a direct substitution—the 𝑚 − 1 empty blocks never click while the unique target block evolves at scale √︁ 𝑁/𝑚—upgrading the 𝑘 = 1 boundary from 𝑟 ZK ≈ 0.879 to 𝑟 WG ≈ 0.818. Interior Find-Any (𝑚, 𝑘 ≥ 2; GW). When both 𝑚 ≥ 2 and 𝑘 ≥ 2, naive domain splitting breaks down because each of the 𝑚 blocks receives a random, unknown number of targets (and most blocks are empty when 𝑘 < 𝑚), causing multi-target blocks to rotate faster and overshoot 𝜋/2 under any fixed schedule. Gingrich, Williams and Cerf64 (GW) avoid this unknown-load problem by running all 𝑚 registers independently over the full domain √︁ {0, . . . , 𝑁 − 1}. Stopping all 𝑚 registers synchronously after 𝑗 ≈ 𝜙2 𝑁/𝑘 rounds finds a target unless all 𝑚 √︁ 𝜙 independent measurements miss (probability cos2𝑚 𝜙); minimizing expected rounds 2(1−cos 𝑁/𝑘 selects 2𝑚 𝜙) 𝜙∗ (𝑚) < 𝜙∗ with √  2 𝑚 𝜙∗ (𝑚) 2𝑚 ∗ ∗ ∗  , 1 − cos 𝜙 (𝑚) 1 + 2𝑚𝜙 (𝑚) tan 𝜙 (𝑚) = 0. (10) 𝑟 GW (𝑚) = 𝜋 1 − cos2𝑚 𝜙∗ (𝑚) Because 𝑚 unentangled copies combine success probabilities classically rather than coherently, 𝑟 GW (𝑚) is independent of 𝑘 and degrades from 0.942 at 𝑚 = 2 to 0.997 at 𝑚 = 1024, setting the published baseline on all 100 interior cells (Fig. S7b). √︁ Interior Find-All (𝑚, 𝑘 ≥ 2; GR0). To let 𝑚 registers find distinct targets in parallel at 𝑁/𝑚 block scale, Grover and Radhakrishnan65 randomly partition {0, . . . , 𝑁 − 1} into 𝑚 blocks of size 𝑁/𝑚. Each block receives an unknown target count 𝑐, which they clear via a descending staircase of exact amplitude-amplification stages127 √︁ at assumed counts 𝑠 = 𝑡, 𝑡 − 1, . . . , 1 (total depth 𝐻𝑡(1/2) 𝜋4 𝑁/𝑚), testing and unmarking hits after each stage. Counting down guarantees emptying every block with 𝑐 ≤ 𝑡: even if stages 𝑠 > 𝑐 miss, once 𝑠 reaches a block’s remaining count 𝑐, the assumed and actual counts match, finding a target with certainty and stepping 𝑐 → 𝑐 − 1 √︁ in lockstep with 𝑠 (while mismatched stages 𝑠 ≠ 𝑐 still hit with probability sin2 ( 𝜋2 𝑐/𝑠)). Because Theorem 3 of ref. 65 leaves tail cleanup at Θ(·) order, we evaluate a concrete two-pass schedule (GR0): Pass 1 runs a staircase from the optimal integer cap 1 ≤ 𝑡 1∗ (𝑚, 𝑘) < 𝑘 down to 1, and Pass 2 clears all 𝑅1 = 𝑘 − |found| remaining targets via a second staircase from 𝑅1 down to 1 (Fig. S7c).

E.3. Algorithmic mechanisms in verified circuits Beyond the 𝑘 = 1 boundary (ZK+WG), our interior baselines are single-paper protocols; Fig. S8a separates automatic recombinations, which join unchanged published subroutines by new classical control, from new coherent mechanisms, which alter the quantum dynamics or measurements within a search stage, listing three of the many mechanisms found per class. Since mechanisms interact, Fig. S7a reports only joint speedups, while Fig. S8b,c details the verified relative round costs and winning circuit regimes across (𝑚, 𝑘). Unlike distributed baselines such as GW and GR0 that run 𝑚 uncoupled registers, our shared-workspace model allows inter-slot entanglement: coupling all 𝑚 slots via odd-parity fanout in Find-Any extends the boundary constant 𝑟 WG to every interior (𝑚, 𝑘 ≥ 2), while Find-All entangles slot and storage registers. Although nonoracle unitaries carry zero query cost in the black-box specification, our verified circuits use 𝑂 ((𝑚 + 𝑘)𝑛) qubits and each unitary step decomposes into poly(𝑛, 𝑚, 𝑘) elementary gates.

27

a Selected mechanisms in verified circuits Mechanism

Builds on

Regime

Description

Automatic recombinations Weak-loop pipelining

62, 64, 66, 131

Find-All, 𝑘 ≳ 𝑚

Sibling sub-block re-search

62, 63, 65

Find-All, 𝑘 ≈

Re-partitioned sweeps

62, 65, 66

Find-All, 𝑘 < 𝑚

New coherent mechanisms Odd-parity joint reflection

63, 66

Find-Any

Tensor-power conveyor

9

Find-All, 𝑘 ≫ 𝑚

Collective all-hit weak probe

63, 131

Find-All, 𝑘 ≪ 𝑚

b Finding any one target

Full-domain slots run weakly measured loops; a click strikes out its target and restarts only that slot, while the others keep their progress. A target missed by a partitioned sweep most likely shares a block with a found one; only those blocks are re-searched, split across all slots. Under-rotated sweeps over fresh (bit-swapped) partitions stop once all targets are found; a weakly measured loop finds the last one.

√ 𝑚

Conjugating 𝑂𝑆⊗𝑚 by marker-qubit gates gives a reflection about slot tuples holding an odd number of targets. A zero-query rotation repeatedly moves found amplitude from each query register into 𝑑 − 1 storage registers. Lockstep block searches are weakly probed for whether all remaining targets are found; a click returns all, a non-click continues coherently.

c Finding all 𝑘 targets 0.70 0.51 0.37 0.28 0.21 0.16 0.12 0.09 0.07 0.06 0.05

512

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

512

0.71 0.52 0.39 0.29 0.22 0.17 0.13 0.10 0.08 0.07 0.06

256

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

256

0.72 0.54 0.40 0.30 0.23 0.18 0.14 0.12 0.10 0.08 0.08

128

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

128

0.73 0.55 0.42 0.32 0.25 0.20 0.16 0.13 0.12 0.10 0.09

64

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

64

0.74 0.57 0.44 0.34 0.27 0.22 0.18 0.16 0.13 0.12 0.11

32

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

32

0.75 0.59 0.46 0.36 0.29 0.25 0.21 0.18 0.17 0.14 0.12

16

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

16

0.76 0.62 0.48 0.40 0.33 0.28 0.25 0.21 0.18 0.16 0.15

8

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

8

0.76 0.64 0.52 0.44 0.39 0.33 0.27 0.25 0.23 0.23 0.22

4

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

4

0.76 0.67 0.58 0.51 0.42 0.38 0.36 0.35 0.34 0.34 0.34

2

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

2

0.76 0.71 0.63 0.58 0.55 0.54 0.53 0.53 0.52 0.52 0.52

1

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

1

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

0.80

0.60

0.40

0.20

Relative expected parallel rounds

1024

(1.00 = standard parallel Grover, Eq. (7))

0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82 0.82

Marked targets 𝑘

Marked targets 𝑘

1.00 1024

0.00 1

2

4

8

16

32

64

128

256

512 1024

1

Parallel queries per round 𝑚

2

4

8

16

32

64

128

256

512 1024

Parallel queries per round 𝑚

Figure S8: Verified parallel Grover mechanisms and relative round costs across 𝑚, 𝑘 ∈ {1, 2, 4, . . . , 1024}. a Selected algorithmic mechanisms in our Lean-verified circuits (not exhaustive). b, c Verified asymptotic expected parallel rounds relative to 𝐷std (Eq. (7)) for finding any one (b) or all 𝑘 (c) targets, with dashed contours marking distinct winning circuit regimes.

28

Baseline circuit: > 440,576 𝑇, cost > 1.08×108

preprocessing

square root

polynomial

input | 𝑦⟩ sign, |𝑦|

restore 𝑦

35 qubits

branch 1 qubit

𝑧 35 qubits

√ 𝑧 35 qubits

clear branch

|𝑦| ≥ 12

𝑧= 1−|𝑦| 2

clear 𝑧 √ 𝑧 · 1/ 𝑧

√ clear 𝑧

293,768 𝑇

8,376 𝑇

poly 𝑃 35 qubits

odd polynomial √ 𝑃 (|𝑦|) or 𝑃 ( 𝑧)

clear polynomial

69,216 𝑇

69,216 𝑇

output |0⟩ 35 qubits

𝑃 if |𝑦|< 12 𝜋 1 2 −2𝑃 if |𝑦| ≥ 2

flip sign if 𝑦<0

uncompute

| 𝑦⟩

|0⟩

|0⟩

|0⟩

|0⟩

| arcsin 𝑦⟩

Figure S9: Baseline circuit to implement the arcsin function,10 using 𝑛 = 35, 𝑚 = 3, 𝑑 = 3. After restricting to the positive range, the approximation splits the calculation of arcsin between a degree-3 polynomial in the interval [0, 0.5] and a Newton iteration for the square root function in [0.5, 1]. Number of 𝑇 gates and number of qubits calculated as in their Appendix, for reversible computation.

F. Fixed-Point arcsin F.1. Problem and specification Many fault-tolerant quantum algorithms require converting amplitudes held in a quantum register into singlequbit rotation angles, including probability-distribution loading and state preparation,132 eigenvalue inversion in quantum linear-system solvers,133 and quantum rejection and Metropolis sampling.134,135 Implementing these rotations via phase kickback or controlled Pauli gates first evaluates arcsin(𝑦) reversibly on a fixed-point register, a subroutine that often dominates the non-Clifford gate count.10,136 We consider reversible evaluation |𝑦⟩|𝑏⟩|0⟩ ⊗𝑚 ↦→ |𝑦⟩|(𝑏 + 𝑧(𝑦)) mod 2 𝑘 ⟩|0⟩ ⊗𝑚 on 𝑘 = 25 signed two’scomplement registers, where 𝑦 is the input register, 𝑏 is the output register, and 𝑧(𝑦) approximates arcsin(𝑦). d arcsin(𝑦) = (1 − 𝑦 2 ) −1/2 diverges as |𝑦| → 1, uniform polynomial approximations require high Because d𝑦 degree near the endpoints, while iterative shift-and-add methods accumulate deep chains of reversible multiplications.10,137 Our signed two’s complement representation (1 sign, 1 integer and 23 fractional bits) matches the float32 mantissa size. With 23 fractional bits, the smallest representable value is 2−23 ≃ 1.19 × 10−7 . Allowing for some small rounding error, we require a maximum absolute error |𝑧(𝑦) − arcsin(𝑦)| ≤ 1.25 × 10−7 across all 224 + 1 = 16,777,217 inputs 𝑦 ∈ [−1, 1]. Using 𝑚 clean ancillas, a candidate program in Clifford+𝑇 gates and mid-circuit measurements must apply this exact action across all 250 basis states (𝑦, 𝑏) and return all ancillas to |0⟩ ⊗𝑚 .

F.2. Baseline We consider as baseline the algorithm by Häner et al.,10 which uses a piecewise-polynomial approach.1 We compare against their (𝑛, 𝑚, 𝑑) = (35, 3, 3) fixed-point two’s-complement configuration, whose maximum error ∼ 10−6 is driven by the error in the square root computation (Fig. 6 of ref. 10), and larger than our target bound of 1.25 × 10−7 , thus providing a lower bound on the spacetime cost. As shown in Fig. S9, this baseline splits 1 This approximation is stronger than the quantum CORDIC paper.137 While their paper does not report results for our input type, we ran

the code from their github repository and got a maximum error of 9 × 10 −3 .

29

the computation of arcsin on the interval [−1, 1] between a degree-3 polynomial evaluation on [−0.5, 0.5] and a √ √ Newton iteration for 𝑧 = 𝑧 · 1/ 𝑧.2 As their Appendix D describes, the former can be implemented using 140 qubits and requires 17,304 Toffoli gates and the same amount for reversing the computation, for a total of 34,608 Toffoli gates (138,432 𝑇 gates). The latter can be implemented using 245 qubits and requires 73,442 Toffoli √ gates to implement it as the product of 𝑧 with 1/ 𝑧, as described in their Appendix C.2, and an additional 2,094 √ Toffoli gates to also reverse the product operation, being 1/ 𝑧 already a reversible operation, for a total of 75,536 Toffolis (302,144 𝑇 gates). We calculate a lower bound of the full circuit spacetime cost of 1.08 × 108 by using the maximum number of required qubits in the two subcircuits, 245, and the sum of the 𝑇 gates required for them, 440,576 𝑇 gates. We thus ignore persistent registers and the smaller branch-selection and combination blocks, which would further increase the cost.

F.3. Program Discovery While our library lets us represent arbitrary gates and formally verify the cost of algorithms, the kickmix model7 restricts circuits to classical reversible gates (𝑋, CNOT, Toffoli and CSWAP), Pauli-𝑋 measurement-based uncomputation,23 and diagonal 𝑍, 𝐶 𝑍 and 𝐶𝐶 𝑍 phase corrections so that every basis input stays a single signed basis state (−1) 𝜙 |𝑥⟩ along each measurement branch, enabling fast classical fuzz-testing without statevector simulation. The fact that agentic systems can produce compact arithmetic quantum circuits by using the feedback from kickmix testing is already known,117,138 and has also been applied to a related arcsin(𝑐/𝑋) subroutine, but on a restricted input range rather than [−1, 1]. We exploited this speed by first running our multi-agent system to search for circuits using kickmix. The result was a circuit of spacetime cost 498,168 (102 qubits, 4,884 𝑇 gates). However, the kickmix gate set is limited, and we expect that the full Clifford+𝑇 gate set could allow for a more efficient implementation. To obtain more general algorithms that are not limited by the kickmix restrictions, we need a different way to verify the circuit, and this is where our formal library helps. Starting from the algorithm obtained with kickmix, we instructed agents to start using our quantum algorithm specification and verification framework to further optimize the algorithm. For a while, agents were able to continue optimizing the circuit up to a cost of 415,200 (100 qubits, 4,152 𝑇 gates, Fig. S10a and Table S2), which continued using a restricted set of gates, and could still be translated to kickmix. Subsequently, the agents truly took advantage of our library and produced circuits that could not be expressed and efficiently simulated with kickmix (Fig. S10b,c). This drove the cost down by a further 11% to 369,800 (100 qubits, 3,698 𝑇 gates), 290× below the baseline10 (Fig. 3a,c). In other words, for this problem, our agents using kickmix can do an efficient search in the restricted subspace without the overhead of a formal proof. Afterwards, our agents using formal verification lift the gate-set restriction and allow further optimization that would not be easily testable classically. Every circuit that can be simulated with kickmix can also be proven in Lean, and seeding a Lean discovery agent from a kickmix solution further improves the solution.

F.4. Interpretation Fig. S10 provides an interpretation of the algorithms that we obtained, and shows where the optimization using the Lean verifier obtained an improvement. Since arcsin is an odd function, i.e. 𝑧(−𝑦) = −𝑧(𝑦), we can perform the calculation only for positive inputs, and flip the output register according to the sign. Subsequently, we also split off the linear part, 𝑧(|𝑦|) = |𝑦| + 𝑟 (|𝑦|) 2 Our baseline requires √ 𝑧 = 𝑧/√ 𝑧. A recent circuit138 computes 1/√ 𝑥 to 2 −24 relative error in 7,735 Toffoli gates and 260 qubits. Using

this here would slightly increase the total number of qubits but significantly reduce the number of gates. The number of gates for the square-root could be cut by a factor of up to 10, and the baseline10 cost by up to 3×.

30

a Kickmix solution: 4,152 𝑇, cost 415,200

preprocessing

coefficient lookup

polynomial

uncompute

| 𝑦⟩

1,348 𝑇 → 894 𝑇

input | 𝑦⟩ 25 qubits

sign, |𝑦|

shift |𝑦|→𝑡

shift 𝑡→|𝑦|

restore 𝑦

92 𝑇

188 𝑇

188 𝑇

92 𝑇

bin 𝑠 2 extra qubits

find 𝑠

products of 𝑠

clear 𝑠

68 𝑇

132 𝑇

20 𝑇

coeff 𝐴 / 𝑡 2

𝑡2

clear 𝑡 2

172 𝑇

84 𝑇

clear 𝐴

19 qubits

coeffs 𝐵, 𝐶

load 𝐴, 𝐵, 𝐶

24 qubits

|0⟩

|0⟩

rest of 𝐵, 𝐶

clear 𝐶

clear 𝐵

44 𝑇

64 𝑇

76 𝑇

|0⟩

workspace

|0⟩

5 qubits 1,008 𝑇

output |𝑏⟩ flip 𝑏 25 qubits if 𝑦<0

+|𝑦|

+𝐴

+𝐶𝑡 2 +𝐵𝑡

rest of +𝐵𝑡

96 𝑇

164 𝑇

1,000 𝑇

664 𝑇

b Non-kickmix improvement: 3,698 𝑇, cost 369,800 bin 𝑠 9 qubits

clear 𝐴

19 qubits

inner products

𝑍, 𝐶 𝑍 cancel sign

𝑍, 𝐶 𝑍 cancel sign

coeffs 𝐵, 𝐶 output |𝑏⟩ 25 qubits

|𝑢1 ⟩

|𝑢1 ⟩

|𝑣1 ⟩

|𝑣1 ⟩

|𝑢2 ⟩

|𝑢2 ⟩

|𝑣2 ⟩

|𝑣2 ⟩

Clifford

×26

coeff 𝐴

24 qubits

𝑇 , 𝑇 † gates

c Inner-product block

products of 𝑠 132 𝑇

flip 𝑏 if 𝑦<0 |𝑏 + 𝑧 ( 𝑦) ⟩

×15

inner products 1,008 𝑇 → 364 𝑇

44 𝑇 → 294 𝑇

+𝐴 164 𝑇 → 104 𝑇

|0⟩ 𝐻

𝑇

𝑇†

𝑇

𝑇†

𝑇

𝑇†

𝐻 𝑆 † (−1) 𝜙 |𝑢1 𝑣1 ⊕ 𝑢2 𝑣2 ⟩

Figure S10: Sketch of the algorithm to implement the fixed-point arcsin module. (a) Full kickmix circuit. It uses 50 data qubits (|𝑦⟩ and |𝑏⟩, 25 each) and 50 ancilla qubits reused across stages, and a total of 4,152 𝑇 gates. The bin index 𝑠 has 9 bits but needs only 2 extra ancillas. After "shift |𝑦| → 𝑡", 6 bits of 𝑠 are simply the top 6 bits of 𝑡, which identify the bin within its group. A 7th bit replaces the 12 bit of |𝑦|, which can be recomputed from 𝑠 and is erased. The remaining 2 bits use one ancilla each: one is stored directly, and the other replaces the top bit of |𝑦⟩, whose value is moved into an ancilla. 𝑡 2 is computed into the ancillas freed by clearing 𝐴. At peak, the ancillas hold 𝐴 (19), 𝐵 and 𝐶 (24), 5 lookup work qubits, 1 bit of 𝑠, and the moved bit of |𝑦⟩. (b) Improved block in the non-kickmix circuit. Algorithm verification with our formal quantum computation library allows further optimization of the circuit. Specifically, the coefficient lookup block can be replaced with a more efficient block, saving overall 454 𝑇 gates. Each coefficient bit is computed by one inner-product block taking a variable number 𝑟 ∈ {2, . . . , 7} of product pairs and using 2𝑟 + 2 𝑇 gates. We have 26 blocks totaling 364 𝑇 gates before +𝐴, and 15 blocks totaling 230 𝑇 gates on the freed qubits after clearing 𝐴. Each inner-product block leaves an extra sign phase that is then removed before returning the result. The whole circuit requires now 3,698 𝑇 gates instead of 4,152 𝑇 gates. (c) Example of the optimized inner-product block for two product pairs, using 6 𝑇 gates, which could not be expressed in the kickmix framework.

31

Table S2: Summary for fixed-point arcsin( 𝑦) on [ −1, 1] at 𝑘 = 25. The baseline evaluates the (𝑛, 𝑚, 𝑑) = (35, 3, 3) configuration,10 assuming 4 𝑇 per Toffoli.23,107 We derive a lower bound on its spacetime cost by summing the two dominant reversible submodules on the 245-qubit square-root workspace while neglecting persistent registers and the steps that combine the two parts. In the non-kickmix Lean 4 circuit, the 3,698 𝑇 gates comprise 776 four-𝑇 temporary-AND gates (3,104 𝑇) plus 594 single-qubit 𝑇/𝑇 † gates across 41 inner-product gadgets. Method

𝜺

Toffoli

T

𝑄

Spacetime cost (𝑄 · T)

Baseline10 (lower bound)

∼ 10−6

110,144 34,608 75,536

440,576 138,432 302,144

245 — —

1.08 × 108 — —

1,038 776

4,152 3,698

100 100

415,200 369,800

– arcsin on [ −0.5, 0.5] √ – 1/ 𝑧 Kickmix Non-kickmix (Lean 4)

1.25 × 10−7 1.25 × 10−7

and approximate the remainder 𝑟 (|𝑦|) ≈ arcsin(|𝑦|) − |𝑦| using a separate quadratic polynomial on 440 intervals of [0, 1]. Each interval is chosen to have a width roughly proportional to its distance to 1, so on each interval the square root is smooth, a second order polynomial fits well, and the fit error shrinks when getting closer to 1. The √︁ intervals get narrower toward |𝑦| = 1, where arcsin(|𝑦|) ≈ 𝜋2 − 2(1 − |𝑦|) grows steeply. The closest input to 1 on the fixed-point grid is 2−23 away, so finitely many intervals cover all inputs. The point |𝑦| = 1 is handled separately. Subsequently, the circuit looks for the interval that contains |𝑦| and stores its index in a 9-bit register 𝑠. It does so by using a barrel shift, i.e. it counts the leading zeros of 1 − |𝑦|, and shifts the magnitude bits left using controlled swaps to form the local offset 𝑡. A lookup block then computes the interval’s coefficients 𝐴, 𝐵, 𝐶 for 𝑠, and squarer and adder circuits add 𝐴 + 𝐵𝑡 + 𝐶𝑡 2 to 𝑏. As an optimization, the 19 high bits of 𝐴 are added to 𝑏 and erased so that the remaining coefficient bits can be computed on the same qubits. Similarly, 𝐶 and 𝑡 2 are erased midway so their qubits can be reused for the rest of +𝐵𝑡. Measurements with 𝑍 and 𝐶 𝑍 corrections erase the coefficients and all other scratch qubits at zero 𝑇 cost. Finally, the circuit is made reversible by undoing the shift and the sign conversion, restoring 𝑦 and returning all ancillas to |0⟩. As shown in Fig. S10, a large amount of the total kickmix 𝑇 gates are spent on the coefficient lookup phase. Specifically, each coefficient bit is a fixed function of the interval number 𝑠, given by a table with one entry per interval. Any such table can be written as an XOR of products of bits of 𝑠, e.g. 𝑠1 𝑠4 ⊕ 𝑠2 𝑠3 𝑠7 ⊕ 𝑠5 . The kickmix circuit first builds a few products that many coefficient bits share, and then builds each coefficient bit by XOR-ing in the products it needs using a 4 𝑇 AND circuit for each product. The non-kickmix circuit replaces most of these bitwise product blocks with 41 inner-product circuits that need roughly half as many 𝑇 gates. Indeed, each block puts its coefficient qubit in an equal superposition of 0 and 1 states, writes the products as a relative phase between the two branches using 𝑇 and 𝑇 † gates, and then makes the branches interfere to get the appropriate bit. However, each inner-product circuit leaves a sign ±1 that depends on the specific 𝑠, which is cancelled across each lookup pass with 𝑍 and 𝐶 𝑍 gates at zero 𝑇 cost. Because each inner product writes directly into its target coefficient qubit and needs no extra scratch qubits, the circuit can postpone more coefficient bits of 𝐵 and 𝐶 until after 𝐴 has been added to 𝑏 and cleared, leaving more spare qubits for that adder and reducing the lookup-and-add stage from 1,348 to 894 𝑇 gates. Together, these changes lower the full circuit from 4,152 to 3,698 𝑇 gates on the same 100 qubits.

G. Stopping Power in Inertial-confinement Fusion G.1. Hamiltonian and specification Following Eqs. (1)–(7) and Tables 1–2 of ref. 48, the system consists of 𝜂 = 218 electrons (𝜁𝑒 = −1, mass 1) and one 𝛼-particle projectile (𝜁proj = +2, mass 𝑀proj = 7,294.29954171 𝑚 𝑒 , matching 3.9726 proton masses in Table 2 of ref. 48) in a periodic cubic cell of volume Ω = 2,419.68282 𝑎 30 containing 216 fixed protons at

32

arbitrary positions 𝑅ℓ ∈ R3 . In plane-wave first quantization, each electron momentum coordinate is stored in 𝑛 𝑝 = 6 signed-magnitude qubits and each projectile coordinate in 𝑛𝑛 = 8 signed-magnitude qubits,27,48 giving 𝑄 sys = 3(𝜂𝑛 𝑝 + 𝑛𝑛 ) = 3,948 system qubits. The valid grid subspace excludes the signed-magnitude negative zero |1, 0 · · · 0⟩ from every coordinate, leaving integer momenta in 𝐺 = [−31, 31] 3 for each electron (633 plane waves, covering the 533 classical time-dependent density-functional grid of Table 1 in ref. 48) and 𝐺˜ = [−127, 127] 3 for the projectile, at wavevectors 𝑘 𝜈 = 2𝜋𝜈/Ω1/3 . The projectile’s momenta are taken relative to its initial mean momentum 𝑘 proj , with 𝑘 proj Ω1/3 /(2𝜋) ∈ Z3 for compatibility with the cell’s periodicity and 𝑘 proj 2 ≤ 29,376 a.u. (𝑣 𝛼 ≈ 4 a.u.). On valid grid states, the discretized Hamiltonian in atomic units is 𝐻=

2 𝜂 ∑︁ ∑︁ 𝑘𝑝 2 𝑖=1 𝑝∈𝐺

| 𝑝⟩⟨𝑝| 𝑖 +

2

∑︁ 𝑘 𝑝 − 𝑘 proj 2 2 𝑝∈ 𝐺˜

2𝑀proj

| 𝑝⟩⟨𝑝| proj +

∑︁ ∑︁

𝜁 𝑎 𝑆( 𝑝 − 𝑞)𝐾 ( 𝑝 − 𝑞)| 𝑝⟩⟨𝑞| 𝑎

𝑎 𝑝,𝑞∈𝐺𝑎 𝑝≠𝑞

(11) 1 ∑︁ ∑︁ + 2 𝑎≠𝑏 𝜈≠0

∑︁

𝜁 𝑎 𝜁 𝑏 𝐾 (𝜈)| 𝑝 + 𝜈⟩⟨𝑝| 𝑎 |𝑞 − 𝜈⟩⟨𝑞| 𝑏 ,

𝑝∈𝐺𝑎 , 𝑞 ∈𝐺𝑏 𝑝+𝜈 ∈𝐺𝑎 , 𝑞−𝜈 ∈𝐺𝑏

and acts as zero outside the valid grid subspace. Here 𝑎 and 𝑏 range over the 𝜂 electrons (𝐺 𝑎 = 𝐺, 𝜁 𝑎 = −1) and ˜ 𝜁proj = +2), 𝐾 (𝜈) = 4𝜋/(Ω ∥𝑘 𝜈 ∥ 2 ), and 𝑆(𝜈) = Í216 𝑒 −𝑖𝑘𝜈 ·𝑅ℓ . the projectile (𝐺 proj = 𝐺, 2 ℓ=1 For every proton configuration {𝑅ℓ }, initial projectile momentum 𝑘 proj , evolution time 𝑡 ∈ {1, . . . , 10} a.u., and partition of the 218 electron registers into spin-up and spin-down subsets, a candidate circuit over Clifford+𝑇 and mid-circuit measurement using 𝑚 ancilla qubits must realize a single unitary 𝑊 that matches 𝑒 −𝑖𝐻𝑡 up to a global phase 𝜑, satisfying   𝑊 |𝜓⟩ ⊗ |0⟩ ⊗𝑚 − 𝑒 𝑖 𝜑 𝑒 −𝑖𝐻𝑡 |𝜓⟩ ⊗ |0⟩ ⊗𝑚 2 ≤ 𝜀

(12)

at 𝜀 = 10−2 for every normalized grid state |𝜓⟩ antisymmetric under exchange of same-spin electrons. All ancillas begin in |0⟩ ⊗𝑚 in each run, rather than carrying pre-prepared resource states (such as phase-gradient states) across runs. Every circuit is compiled into Clifford+𝑇 gates, mid-circuit measurements and classical feed-forward, and checked at that gate level by the correctness proof. Where later gates are conditioned on measurement outcomes, we count the 𝑇 gates of the most expensive outcome branch. To extract the stopping power from the projectile’s rate of energy loss, the protocol repeats time evolution 50 times at each of 𝑡 = 1, . . . , 10 a.u. (500 runs) to estimate the mean projectile kinetic energy, omitting state preparation and readout as their cost is negligible. In this work, our Lean specification asks for the algorithm to prove correctness and cost for all 500 circuits. However, in Sec. 2.3 and Fig. 4 we report the average 𝑇 count over the circuits, since this more accurately reflects the size of circuit a fault-tolerant quantum computer would need to coherently execute. We apply this to both the baseline and our solution, so the factor of improvement reported is equal regardless. However, the baseline costing convention48 (total over all circuits) can be obtained by simply multiplying our arithmetic mean by 500.

G.2. Baseline Table 2 of ref. 48 gives a momentum-space LCU 1-norm of 𝜆 = 1,744,784.42 Ha, a block-encoding cost of 𝐶BE = 2.498 × 104 Toffolis per walk step, and 𝑄 base = 5,650 logical qubits (3,948 system and 1,702 ancilla Í qubits). Each electron–proton or electron–electron pair contributes 𝜈 ∈ [−62,62] 3 \{0} (𝜋Ω1/3 ∥𝜈∥ 22 ) −1 = 22.53 Ha to 𝜆, giving 1.06 × 106 Ha from electron–proton attraction and 5.33 × 105 Ha from electron–electron repulsion (91.4% of 𝜆).

33

Generalized QSP139 implements 𝑒 −𝑖𝐻𝑡 as a polynomial in a qubitized walk operator25 that block-encodes 𝐻/𝜆, with one walk step per query. Evaluating the query count140 in Eq. (12) of ref. 48, 𝑁steps (𝑡) = 𝜆𝑡 +

32/3 (𝜆𝑡) 1/3 log2/3 2 (1/𝜀), 2

(13)

at 𝜀 = 10−2 and summing over the 50 runs at each of 𝑡 = 1, . . . , 10 a.u. gives 4.80 × 109 walk steps, or 1.20 × 1014 base = 2.40 × 1011 Toffolis per run, Toffolis over all 500 runs. This is an average of 9.60 × 106 walk steps and 𝑁Toff base = 9.59 × 1011 𝑇 gates per run and 𝑄 15 18 so Tbase = 4𝑁Toff base · Tbase = 5.42 × 10 per run (2.71 × 10 over 500 48 runs), the number presented in Fig. 3a. The same study also quotes an eighth-order product-formula estimate (1.40 × 1015 Toffolis on 6,170 qubits over 500 runs), which we do not use as a baseline since it needs 11.7× more Toffolis than the QSP estimate above.

G.3. Main improvements Section 2.3 summarizes the two changes that account for most of the reduction (Fig. 4b,c). Here we describe each one alongside the baseline construction it replaces, and Appendix G.4 gives the resulting resource counts. The baseline applies the electron–proton and electron–electron terms in momentum space, where each pair contributes 22.53 Ha to 𝜆 (Appendix G.2). Our solution instead Fourier transforms all electrons to a real-space grid each step to apply the electron–proton, electron–projectile and electron–electron interactions, while the kinetic and projectile–proton terms stay in momentum space. This basis change alone halves the contribution of each pair to 𝜆, to 11.3 Ha, but that reduction is canceled out by the extra cost of applying the walk step in real space. However, a further reduction follows by being in the position basis, where the solution can exploit Pauli exclusion. A subroutine checks every electron against each grid point near a given electron or proton, and each electron found there kicks back a phase of 𝑖 in one LCU branch and −𝑖 in the other. Averaging the two branches gives cos(𝜋𝑛/2) for 𝑛 electrons on the point, which equals 1 − 𝑛 for 𝑛 ≤ 2 and has magnitude at most one for any 𝑛. The Lean solution also proves that states antisymmetric under exchange of same-spin electrons have at most two electrons on any grid point, allowing it to satisfy the specification while not faithfully applying the 𝑛 > 2 interaction terms. Therefore, the circuit reproduces the interaction up to a constant, while each such term adds its potential to 𝜆 once rather than once for every electron that could occupy the point. At separations beyond ≈ 0.6 𝑎 0 , where the potential is below 1.4 Ha, the interaction is too weak for the savings to outweigh the cost of the subroutine. The pair potential is therefore range-separated at 1.4 Ha, with the subroutine applied only to the short-range part and the long-range part summed over all pairs, each contributing 0.74 Ha (Fig. 4b). The second most significant improvement found, in terms of cost reduction, relates to the electron–proton interaction. Protons do not sit on grid points, so to apply this term the circuit shifts all electrons by −𝑅ℓ to put each proton on a grid point, and then shifts them back. In the plane-wave basis this shift is a phase set by the total electron momentum 𝑃. Earlier real-space solutions computed and uncomputed 𝑃 around each shift, summing all 218 electron momenta four times per walk step, which made up about a fifth of the 𝑇 gates per step. Only the protons and the projectile change 𝑃, and both act in the real-space step, so the final circuit keeps 𝑃 in a 42-qubit register between walk steps, clearing it before the real-space step and rebuilding it after. This halves the sums and cuts the 𝑇 gates per step by 10% (Fig. 4c).

G.4. Resource counts Our solution uses 𝑄 = 4,374 logical qubits: 3,948 system qubits and 426 clean ancillas, against the baseline’s 1,702. The ancillas are a 42-qubit register that keeps the total electron momentum between walk steps, a 48-qubit phase-gradient register prepared in each run, 87 control and data qubits for the block encoding, and 249 workspace

34

qubits that every subroutine borrows and returns to |0⟩. The improvements above lower 𝜆 to 1.356 × 105 Ha. Each run of length 𝑡 is split into 2𝑡 segments of 0.5 a.u., each implemented by generalized QSP139,140 of degree 68,053, giving an average of 7.49 × 105 walk steps per run. Each walk step uses roughly 152,000 𝑇 gates: 3,400 for LCU state preparation, 129,000 for the QFTs and the real- and momentum-space Hamiltonian terms, 19,900 for walk reflections and valid-grid guards, and 110 amortized for QSP rotations. One-time initialization adds 59,600 𝑇 gates per run. Averaged over 𝑡 = 1, . . . , 10 a.u., this gives 1.14 × 1011 𝑇 gates and 𝑄 · T = 4.98 × 1014 per run, or 248,770,927,504,980,000 over all 500 runs. Compared with the baseline, this is 12.8× fewer walk steps and 1.29× fewer qubits at 1.52× the 𝑇 gates per step, a 10.9× lower cost (Fig. 4a).

H. Non-Born–Oppenheimer Dynamics of C23 H20 N3 O H.1. Hamiltonian and specification Following Reaction 5 in Eqs. (2)–(10) and (23)–(25) and Tables I and IV of ref. 58, the system consists of 𝜂 = 234 particles of composition C23 H20 N3 O: 47 nuclei (23 12 C, 20 1 H, 3 14 N, and 1 16 O, with charges 𝜁𝑖 = 𝑍𝑖 ∈ {6, 1, 7, 8}) followed by 187 electrons (𝜁𝑖 = −1). Each Cartesian coordinate is stored as a signed 𝑛𝑔 = 8-bit integer 𝑞 𝑖,𝑤 ∈ [−128, 127] on 𝑄 sys = 3𝜂𝑛𝑔 = 5,616 system qubits, representing position 𝑟 𝑖,𝑤 = 𝑞 𝑖,𝑤 Δ in a cubic box of width 𝐿 = 44 Å (83.15 𝑎 0 ) with grid spacing Δ = 𝐿/(2𝑛𝑔 − 1) ≈ 0.326 𝑎 0 . Electron masses are 𝑚 𝑖 = 1, and nuclear masses 𝑚 𝑖 (not stated in the baseline58 ) are set in electron-mass units from the 1 H, 12 C, 14 N, and 16 O isotopic atomic masses minus 𝑍𝑖 𝑚 𝑒 . The discretized non-Born–Oppenheimer Hamiltonian is 𝐻 = 𝑇 + 𝑉, with ! 𝜂 ∑︁ 𝜁𝑖 𝜁 𝑗 2𝜋 2 ∑︁ 1 1 ∑︁ † 2 ∥𝑘 ∥ 2 |𝑘⟩⟨𝑘 | 𝑖 QFT𝑖 , 𝑇= 2 (14) QFT𝑖 𝑉= , 2 𝑖≠ 𝑗 Δ max 𝑞 𝑖 − 𝑞 𝑗 2 , Γ̃𝑖 𝑗 𝐿 𝑖=1 𝑚 𝑖 𝑘 ∈𝐺 where 𝐺 = [−128, 127] 3 , QFT𝑖 is the quantum Fourier transform on the three coordinates of particle 𝑖, and the squared Coulomb saturation distance is Γ̃𝑖2𝑗 = 8 when both 𝑖 and 𝑗 are nuclei (𝑛Γ = 3 in Table IV of ref. 58) and √ Γ̃𝑖2𝑗 = 1 otherwise, capping electron interactions at 1/Δ and nuclear repulsion at 1/( 8Δ). A candidate circuit over Clifford+𝑇 and mid-circuit measurement must realize a single clean-ancilla unitary 𝑊 satisfying Eq. (12) at 𝜀 = 10−2 for 𝑡 = 1 fs on every state of the system register. Matching the baseline,58 initial-state preparation and observable readout are not costed, since in end-to-end fault-tolerant simulations of photochemical dynamics, real-time Hamiltonian evolution dominates initial-state preparation by orders of magnitude.141 All ancillas begin in |0⟩ ⊗𝑚 , so resource states such as phase-gradient states must be prepared within the circuit. Every Toffoli is compiled into Clifford+𝑇 gates and checked at that gate level by the correctness proof, and where later gates are conditioned on measurement outcomes we count the 𝑇 gates of the most expensive branch. The baseline instead bounds only the block-encoding error 𝐴 − 𝑒 𝑖 𝜑 𝑒 −𝑖𝐻𝑡 op ≤ 𝜖BE (Appendix C of ref. 58), where 𝐴 = (𝐼 ⊗ ⟨0𝑚 |) 𝑊 (𝐼 ⊗ |0𝑚 ⟩) is the part of the circuit that starts and ends with the ancillas in |0𝑚 ⟩. This leaves out the ancilla error, the part |𝜓⊥ ⟩ of the output in which the ancillas are not returned to |0𝑚 ⟩. The two parts are orthogonal, so the error in Eq. (12) splits as 2

2

𝑊 (|𝜓⟩ ⊗ |0𝑚 ⟩) − 𝑒 𝑖 𝜑 (𝑒 −𝑖𝐻𝑡 |𝜓⟩) ⊗ |0𝑚 ⟩ 2 = ( 𝐴 − 𝑒 𝑖 𝜑 𝑒 −𝑖𝐻𝑡 )|𝜓⟩ 2 + ∥|𝜓⊥ ⟩∥ 22 ,

(15)

and any circuit meeting Eq. (12) at 𝜀 also meets the block-encoding criterion at 𝜖 BE = 𝜀. For the baseline QSP circuit, the polynomial approximation error bounds the ancilla error25,139,140 by ∥|𝜓⊥ ⟩∥ 22 ≤ 2𝜖exp , so with the error √︃ 2 + 2𝜖 split in Table IV of ref. 58 (𝜖exp = 𝜖BE /12.95) it is only guaranteed to meet Eq. (12) at 𝜖BE exp ≈ 0.041, four times our target.

35

H.2. Baseline Table I of ref. 58 reports 𝑁Toff = 2.73 × 1011 Toffolis per femtosecond on 𝑄 pub = 6,198 qubits at 𝜖 BE = 10−2 , a spacetime cost of 6.77 × 1015 . Each walk step uses about 9.0 × 104 𝑇 gates, of which 52% go to the swap network, 25% to preparing the LCU weights and 22% to evaluating 1/𝑟 (Fig. 5a of ref. 58). These give the baseline values of 46.8k, 22.5k and 19.8k 𝑇 gates per step in Sec. 2.4 and Fig. 4e–g. The baseline costs the time evolution as the number of walk steps times the cost of one step, 𝑁Toff = 𝐷 old (𝜏, 𝜖exp ) · T𝐻 (Eqs. (C1) and (C4)–(C5) of ref. 58), where the number of steps is the degree of the generalized QSP polynomial.139,140 Two of the same authors tighten this degree bound, removing the factor 𝑒/2 ≈ 1.36 in front of 𝜏 (Theorem 1 of ref. 59, via Kapteyn’s inequality),   𝑒 2𝑐 𝐷 old (𝜏, 𝜖exp ) = , 𝜏 + ln 2 𝜖 exp &  1/3 !'  2 3 , (16) 𝑑Thm 1 (𝜏, 𝜖exp ) = 𝜏 cosh ln 𝜏 𝜖exp (1 − 𝑒 − 𝜃0 ) pub

√   1/3 where 𝜏 := 𝛼 𝐻 𝑡, 𝑐 = 4( 2𝜋 𝑒 1/13 ) −1 ≈ 1.4776 and 𝜃 0 = 𝜏3 ln(2/𝜖 exp ) . Theorem 2 there further tightens the 59 subleading term via Watson’s inequality. That work does not apply this bound to the system studied here, but it improves the same QSP construction, so we include it so that our solutions are compared against the strongest available baseline. The tighter bound only reduces the number of walk steps. The error split 𝑡𝜖 𝐻 +𝜖 exp ≤ 𝜖BE fixes 𝜖 𝐻 independently of the polynomial degree, so the 𝑇-gate count T𝐻 per step and the qubit count 𝑄 pub = 6,198 are unchanged. At the reported 𝛼 𝐻 = 2.16 × 105 Ha (𝜏 ≈ 8.93 × 106 at 𝑡 = 41.34 a.u.) and 𝜖exp = 𝜖BE /12.95, Theorem 2 lowers the number of walk steps from 𝐷 old = 12,136,779 to 𝑑Thm 2 = 8,930,416 (8,930,877 with Theorem 1). Rescaling the published Toffoli count by this ratio gives our baseline, pub 𝑑 Thm 2

base 𝑁Toff = 𝑁Toff

≈ 2.01 × 1011 , 𝐷 old base Tbase = 4𝑁Toff ≈ 8.04 × 1011 ,

𝑄 pub · Tbase ≈ 4.98 × 1015 ,

(17)

the number presented in Fig. 3a. At this large 𝜏 the subleading terms barely matter: using Theorem 1 instead, or simply dividing the published Toffoli count by 𝑒/2, gives the same cost to three significant figures.

H.3. Main improvements Section 2.4 summarizes three changes to the walk step that account for almost all of the reduction in 𝑇 gates per step relative to the baseline (Fig. 4e–g). Here we describe each one alongside the baseline construction it replaces, and Appendix H.4 gives the resulting 𝑇 counts. First, to apply a two-body interaction, the baseline swaps the coordinates of the selected pair into the two particle registers on which its interaction circuit acts, applies the interaction there, and swaps them back afterward.58 Instead, our solution copies the selected coordinates into an ancilla register, leaving the particle register untouched. Because the ancilla holds only a copy, it can be cleared using mid-circuit Pauli-𝑋 measurements and classically controlled 𝐶 𝑍 corrections,23,116 as done for momentum bits copied in plane-wave kinetic terms27 (Fig. 4e). Second, the potential 𝑉 in Eq. (14) requires computing 1/𝑟 = (𝑟 2 ) −1/2 for 𝑟 = 𝑞 𝑖 − 𝑞 𝑗 2 . Because the Í coordinates are stored as integers, 𝑟 2 = 𝑤 (𝑞 𝑖,𝑤 − 𝑞 𝑗,𝑤 ) 2 can be obtained cheaply using integer subtraction and squaring. To get to 1/𝑟 without a square root, the baseline prepares an ancilla register in uniform superposition

36

over integers 𝑚 < 𝑀, assigning +1 to branches with 𝑚 2 𝑟 2 < 𝑀 2 and an alternating sign (−1) 𝑚 to the rest. The alternating terms cancel, so the average over branches approximates 1/𝑟, but the test requires multiplying 𝑚 2 by 𝑟 2 , which dominates its cost.58 In this work, the range of 𝑟 2 is split into coarse intervals with rescaled position  Í 𝑟˜2 ∈ [0, 1), and 1/𝑟 on each interval is approximated by a cubic Bernstein polynomial 3𝑘=0 𝑘3 (𝑟˜2 ) 𝑘 (1− 𝑟˜2 ) 3−𝑘 𝑤 𝑘 (512 precomputed coefficients 𝑤 𝑘 in total). Rather than multiplying powers of 𝑟˜2 , the circuit samples this polynomial directly.67,142 It compares 𝑟˜2 against three ancilla registers in uniform superposition and counts how many are smaller, which gives 𝑘 ∈ {0, 1, 2, 3} with exactly the binomial weights above. Looking up 𝑤 𝑘 then gives the polynomial in expectation (Fig. 4f). Finally, in the electron–nucleus terms of 𝑉, each nucleus 𝑖 is weighted by its integer charge 𝑍𝑖 . Rather than preparing these weights via coherent alias sampling24 with amplitude amplification,58 a uniform superposition of basis states is prepared and a reversible classical circuit assigns 𝑍𝑖 states to each nucleus 𝑖, as proposed for fixed nuclei27 and for quantum nuclei.141 Our solution applies this to every weight of the linear combination (Fig. 4g).

H.4. Resource counts The verified circuit found in this work uses 𝑄 = 6,057 logical qubits, consisting of 5,616 system qubits and 441 clean ancillas. Evaluating the 1-norm at 𝐿 = 44 Å together with potential shifting gives block-encoding scale 𝛼 = 8.045 × 104 Ha and generalized QSP degree 𝑑 = 3,326,871. Each uncontrolled walk step uses 30,504 𝑇 gates (30,516 𝑇 on the two boundary controlled steps): 1,256 𝑇 for reversible nuclear-charge and pair-weight preparation, 24,526 𝑇 to copy selected particle coordinates into ancillas and 908 𝑇 for 𝑋-basis measurement uncomputation (25,434 𝑇 total routing, against 46.8k 𝑇 for the baseline swap network), 3,116 𝑇 for the 512-entry Bernstein 1/𝑟 evaluation, 446 𝑇 for the QFT kinetic term, and 252 𝑇 for the LCU reflection, plus 76 𝑇 per step for QSP rotations and 247 𝑇 for one-time phase-gradient initialization. This totals T = 3,326,871 × (30,504 + 76) + 2 × 30,516 + 247 = 101,735,776,459 ≈ 1.02 × 1011 𝑇 gates and 𝑄 · T = 616,213,598,012,163 ≈ 6.16 × 1014 (8.08× below baseline).

I. Cytochrome P450 Compound I I.1. Hamiltonian and specification The system is active space X of Compound I, with 𝜂 = 63 electrons in 𝑁 = 58 spatial orbitals.88 Under the Jordan–Wigner transformation each spin orbital ( 𝑝, 𝜎) is stored on qubit 2𝑝 + 𝜎, giving 𝑄 sys = 2𝑁 = 116 system qubits. GPU-accelerated density matrix renormalization group (DMRG) calculations now converge this 58-orbital active space classically,143 yet leave the physical spin-state ordering unresolved because dynamic correlation from omitted orbitals exceeds the sub-millihartree doublet–quartet gap.88,143 Active space X nonetheless serves as the standard benchmark across fault-tolerant resource estimates,60,88,89 and circuit improvements to its DFTHC walk structure60 carry over to the larger active spaces needed to capture dynamic correlation and resolve the spin ordering.143 The Hamiltonian is the (𝑅, 𝐵, 𝐶) = (9, 29, 14) double-factorized tensor-hypercontraction (DFTHC) factorization of Table V in ref. 60, with the released tensors144 rounded to (𝑏 coeff , 𝑏 rot ) = (10, 15) bits: !2 𝑅−1 𝐶 −1 𝐵−1 ∑︁ ∑︁ 1 ∑︁ ∑︁ (𝑟 𝑐) ′ † (𝑟 𝑐) 𝐻DFTHC = ℎ 𝑝𝑞 𝑎 𝑝 𝜎 𝑎 𝑞 𝜎 + 𝑊 𝐼+ 𝑤 𝑏 𝑛𝑢 (𝑟 ) , (18) 𝑏 2 𝑟=0 𝑐=0 𝜎, 𝑝,𝑞 𝑏=0 Í Í Í where 𝑛𝑢 = 𝜎 ( 𝑝 𝑢 𝑝 𝑎 𝑝 𝜎 ) † ( 𝑞 𝑢 𝑞 𝑎 𝑞 𝜎 ) for unit orbital vectors 𝑢 𝑏(𝑟 ) ∈ R58 (𝑀 = 𝑅𝐵 = 261) and 𝑊 (𝑟 𝑐) = Í 𝑤 𝐵(𝑟 𝑐) − 𝑏<𝐵 𝑤 𝑏(𝑟 𝑐) , as follows from expanding 𝑂 SF,𝑟 𝑐 in the DFTHC construction.60 As in the released dataset,144

37

Í DFTHC recovers Eq. (18) omits the scalar − 12 𝑟 ,𝑐 (𝑊 (𝑟 𝑐) ) 2 , and adding the classical Hartree–Fock shift 𝐸 HF − 𝐸 HF the active-space total energy (Eqs. 42–43 of ref. 60). We define the problem to not allow for improvement in the DFTHC factors,144 which reproduce the active-space coupled-cluster correlation energy to 0.28 mHa, to separate quantum circuit optimization from classical tensor fitting. We cost one run of phase estimation on the 116 system qubits, started in a 63-electron eigenstate |𝜓⟩ of 𝐻DFTHC with energy 𝐸. Assuming an eigenstate as input loses no generality for resource estimation: phase estimation on any state |𝜙⟩ gives, with probability |⟨𝜓 𝑗 |𝜙⟩| 2 , the same outcomes145 as on the eigenstate |𝜓 𝑗 ⟩. In practice |𝜙⟩ only approximates the ground state |𝜓0 ⟩, so finding 𝐸 0 takes on average 1/|⟨𝜓0 |𝜙⟩| 2 runs, each also paying for trial-state preparation.146 Like prior resource estimates,60,88,89 we do not count this overhead. The circuit uses Clifford+𝑇 gates and mid-circuit measurements on the system and 𝑚 ancillas that start in |0⟩. The specification applies to this gate-level circuit, so its error bound includes rotation synthesis and approximate state preparation as well as phase estimation. At the end, a 𝑏-qubit phase register among the ancillas is measured, and its outcome 𝑦 ∈ {0, . . . , 2𝑏 − 1} is converted into the energy estimate 𝐸ˆ (𝑦) = 𝐸 off + 𝑠 |cos(𝜋𝑦/2𝑏 )|,

(19)

where 𝑏, 𝐸 off and 𝑠 are fixed numbers chosen with the circuit. This form covers both standard qubitization and sum-of-squares spectral amplification. For a walk eigenphase 𝜑, the energy is 𝐸 = 𝜆 cos 𝜑 in the first4,24,25,89 and 𝐸 = 𝐸 SOS + Λ(1 + cos 𝜑) in the second.60,147 Since cos 𝜑 ≤ 0 at the energies measured here, both read 𝐸 = 𝐸 off + 𝑠 |cos 𝜑|, with (𝐸 off , 𝑠) = (0, −𝜆) and (𝐸 SOS + Λ, −Λ) respectively. When phase estimation applies the walk forward or backward depending on the phase register, 2𝜋𝑦/2𝑏 estimates ±2𝜑, so Eq. (19) estimates 𝐸. If the specification only covered the ground state, a circuit with no gates and 𝑠 = 0 would pass by setting 𝐸 off within 𝜀 of the ground-state energy 𝐸 0 . The specification therefore requires the same circuit and decoder to work for every eigenstate up to 𝐸 top = 𝐸 0 + Δ, with Δ = 0.1 Ha and 𝜀 = 10−3 Ha. For each 63-electron eigenstate |𝜓⟩ with energy 𝐸, the outcome distribution 𝑝(𝑦 | 𝜓) must satisfy ∑︁ 2 𝑝(𝑦 | 𝜓) min( 𝐸ˆ (𝑦), 𝐸 top ) − min(𝐸, 𝐸 top ) ≤ 𝜀 2 . (20) 𝑦

This is the root-mean-square error behind the phase-estimation step counts of Eqs. (21)–(23) in ref. 24. For an eigenstate inside the window, it bounds the root-mean-square error of the estimate by 𝜀, with estimates above 𝐸 top counted as 𝐸 top . For an eigenstate above the window, it only requires that estimates do not fall more than 𝜀 below 𝐸 top . A circuit that ignores |𝜓⟩ gives the same estimates for every eigenstate, and in root mean square these would have to lie within 𝜀 of 𝐸 0 and at most 𝜀 below 𝐸 0 + Δ at once. This is possible only if Δ ≤ 2𝜀 = 2 mHa, far below Δ = 0.1 Ha. The window also spans the gap of about 75 mHa between the quartet and sextet states found by DMRG (Fig. 4 of ref. 143). The tolerance 𝜀 = 1 mHa matches prior resource estimates on this active space, although separating the doublet and quartet states would require tighter tolerances. All ancillas begin in |0⟩ ⊗𝑚 , so resource states such as phase-gradient states must be prepared within the circuit. Every Toffoli is compiled into Clifford+𝑇 gates and checked at that gate level by the correctness proof, and where later gates are conditioned on measurement outcomes we count the 𝑇 gates of the most expensive branch.

I.2. Baseline Our baseline starts from the sum-of-squares spectral amplification estimate in Table V of ref. 60 (51,510 walk † steps at 9,535 Toffolis/step on 1,150 qubits, or a spacetime cost of 2.26×1012 ), where 𝐻DFTHC − 𝐸 SOS = 𝐻sqrt 𝐻sqrt is block-encoded with norm Λ and energy-window gap 𝐸 gap = 𝐸 ub + Δ − 𝐸 SOS using the phase-estimation step count24,60   √︃ 𝜋𝜆eff . (21) 𝑁steps = 𝜆eff = 𝐸 gap (2Λ − 𝐸 gap ), 2𝜀

38

Adding Δ to 𝐸 gap in that estimate60 raises its step count from 51,510 to 51,948 and its cost to 2.28 × 1012 (+0.85%). The published construction60 forms the one-body term ℎ′ from the exact two-electron tensor 𝑔, while the squares in Eq. (18) use the factorized tensor 𝑔. ˜ The Hamiltonian it block-encodes therefore differs from the (ℎ, 𝑔) ˜ Hamiltonian by a one-body term that lowers the low-lying energies by about 0.6 Ha. Its 𝐸 gap subtracts the sum-of-squares bound of the block-encoded Hamiltonian from the sextet Hartree–Fock energy of the (ℎ, 𝑔) ˜ Hamiltonian,144 so it is about 0.6 Ha larger than when both energies come from one Hamiltonian, which overestimates the cost. We form ℎ′ from 𝑔, ˜ so that Eq. (18) is the (ℎ, 𝑔) ˜ Hamiltonian up to a constant, whose CCSD(T) correlation energy is within 0.28 mHa of that of (ℎ, 𝑔). This lowers Λ from 97.4395 to 97.3864 Ha (𝐸 SOS = −134.8874 Ha), and with both energies evaluated on this Hamiltonian 𝐸 gap = 5.189 Ha including Δ (49,269 steps). Bounding 𝐸 0 ≤ 𝐸 ub = −129.8443 Ha with the quartet (𝑆 = 3/2) ROHF determinant instead lowers 𝐸 gap to 5.143 Ha, giving 𝜆eff = 31.23 Ha and 𝑁steps = 49,056. Adding a coherent 16-qubit phase-estimation register and storing each of the 57 Givens angles in 13 rather than 15 bits gives 1,052 qubits and a cost of 1.97 × 1012 before space–time tradeoffs. Thirteen bits suffice because the angles 𝜃 𝑝 = 2𝜋𝑘 𝑝 /215 enter the orbital vectors4 as cos 2𝜃 𝑝 and sin 2𝜃 𝑝 , and the overall sign of each vector does not affect 𝑛𝑢 , so fixing that sign puts every angle index of 𝐻DFTHC in 0 ≤ 𝑘 𝑝 < 213 . As suggested in prior work,89 we use both these observations and integrate them into our baseline. We then apply recent compilation options,61 recomputing the (𝐺, 𝑟, 𝑐, 𝜎, 𝑏 = 𝐵) index registers from an 8-bit outer index 𝑥 𝑜 with minimum-Toffoli comparators108 and loading the 57 Givens angles in three batches of 19 (5 QROM lookups per select) while reusing idle angle wires as clean-QROAM116 workspace. These options come from later work than the spectral-amplification study,60 but we include them so that our solutions are compared against the strongest available baseline. On our 13-bit instance we also pad 𝐶 rather than 𝑅 in 𝑥 𝑜 , skip the two always-zero addend bits in the 15-bit phase-gradient adders,23 and include 32 Toffolis/step to control the walk reflections from the phase-estimation register, omitting approximate state preparation and rotation synthesis so 𝐻DFTHC remains exact. Minimizing 𝑄 · T over QROAM block sizes and angle batch sizes gives 𝑄 base = 481 logical qubits and 𝐶BE = 11,517 Toffolis/step (5.65 × 108 Toffolis, Tbase = 4𝐶BE 𝑁steps = 2.26 × 109 𝑇 gates), for a baseline cost of 𝑄 base · Tbase = 1.087 × 1012 ≈ 1.09 × 1012 ,

(22)

the number presented in Fig. 3a. At a fixed number of walk steps, the 13-bit angles and these compilation options61 together roughly halve the published cost,60 from 1,150 qubits and 9,535 Toffolis per step to 481 qubits and 11,517, including the phase-estimation register. Fig. 3b shows the published estimate,60 extended to the energy window, in gray and this baseline in red.

I.3. Main improvements Section 2.5 summarizes the main change in our solution, which replaces the angle lookups of the baseline with a one-hot register for the chosen orbital vector, and uses the same trick in the inner state preparation. Here we describe both alongside the baseline construction they replace, together with a smaller change to the spin swaps that the main text leaves out. Appendix I.4 gives the resulting 𝑇 counts. Each walk step block-encodes Eq. (18) with a state preparation and two select calls.60 The outer stage of the state preparation picks a square (𝑟, 𝑐) or a one-body term, and the inner stage picks 𝑏, which fixes the orbital vector 𝑢 𝑏(𝑟 ) . select rotates this vector into a single orbital with 57 Givens rotations, acts on that orbital and rotates back.4 In the baseline, each select call loads the 13-bit Givens angles of the chosen vector into a 247-qubit register, 19 at a time with 5 QROM lookups per call, and each rotation adds its angle into the phase-gradient register (Appendix I.2). Our solution instead builds a 145-qubit one-hot register in each select call, for 296 𝑇. Each of its qubits stands for two orbital vectors, so the register covers 290 of them: the 261 vectors 𝑢 𝑏(𝑟 ) and 29 of the 58

39

eigenvectors of ℎ′ . The other 29 eigenvectors are handled by the second call of the step. A further qubit 𝑠 records which vector of the pair was chosen. Each angle bit then enters the phase-gradient adder of its rotation as (𝛼 ⊕ 𝑀1 ) (𝛽 ⊕ 𝑀0 ) ⊕ 𝑀01 ,

𝛽 = 𝑞 𝑐 𝑠,

𝛼 = 𝑞 𝑐 ⊕ 𝛽,

(23)

where 𝑞 𝑐 is the control qubit of the rotation and 𝑀0 , 𝑀1 and 𝑀01 are CNOT parities of the one-hot qubits whose first vector, second vector or both vectors have that bit set. At most one one-hot qubit is set, so 𝑀0 𝑀1 = 𝑀01 , and Eq. (23) is 0 for 𝑞 𝑐 = 0 and the bit of the chosen vector for 𝑞 𝑐 = 1. The baseline already uses one AND gate per angle bit to control the rotation. Eq. (23) also needs one AND gate per bit, plus one per rotation for 𝛽. With the one-hot register, the rotations and their angles cost 11,818 𝑇 per call rather than 18,844 𝑇, and the angle register is no longer needed. The inner stage uses the same idea. It keeps a 126-qubit one-hot register for (𝑟, 𝑐) and a 5-bit binary register for 𝑏, so each alias-sampling lookup24 costs 390 𝑇, against 1,968 𝑇 for the QROAM of the baseline. Together with the one-hot select, this accounts for 96% of the 𝑇 gates saved per walk step (Table S3). Our solution also includes a second, smaller improvement, which halves the cost of the spin swaps. Rather than performing the basis rotations once for each spin, the baseline applies them to the spin-up qubits only and, controlled by a qubit in superposition, swaps the spin-down qubits into their place before and back after, with four blocks of 58 controlled swaps per step.60 Since swapping two qubits only flips the sign of their antisymmetric √ state (|01⟩ − |10⟩)/ 2, each block can instead be implemented as a single controlled sign flip, applied when an odd number of the 58 orbitals are in that state. After a Clifford change of basis to Bell pairs, the circuit computes this parity with 58 Toffolis, or 232 𝑇, as many as one block of swaps, and erases it with 𝑋-basis measurements for free. Since the system register is untouched between consecutive select calls, one parity serves two swap blocks.

I.4. Resource counts The best verified circuit uses 𝑄 = 333 logical qubits and T = 1,310,839,337 ≈ 1.31 × 109 𝑇 gates, so 𝑄 · T = 436,509,499,221 ≈ 4.37 × 1011 , 2.49× below the baseline (Fig. 3a,b). This comes from 1.67× fewer 𝑇 gates per walk step (Appendix I.3), 1.44× fewer qubits and 3% fewer walk steps. The qubits are the 116 system qubits, a 16-qubit phase-estimation register, an 11-qubit phase-gradient register, 17 and 24 qubits for the outer and inner state-preparation registers, and 149 qubits of workspace shared by the subroutines. Most of the saving against the 481 qubits of the baseline comes from dropping its 247-qubit angle register. The circuit runs 𝑀 = 47,487 walk steps. We bound 𝐸 0 ≤ 𝐸 ub = −130.1526 Ha with a 3,000-determinant quartet wavefunction, whose energy is checked in Lean. This is 0.31 Ha below the quartet ROHF bound of the baseline and gives 𝐸 gap = 4.835 Ha and 𝜆eff = 30.30 Ha, 3% below the 31.23 Ha of the baseline. A slightly tighter error bound for phase estimation than Eq. (21) saves another 0.2%. The state preparation is approximate, so the block-encoded Hamiltonian differs from 𝐻DFTHC by at most 4.0 × 10−7 Ha on the 63-electron sector. This comes from the synthesized rotations in the state preparation, and the correctness proof adds it to the phase-estimation error to show that the total stays within 𝜀. The walk steps run in 16 blocks totaling 47,360 steps, followed by 127 single steps. As qubits of the phaseestimation register are prepared stage by stage, fewer remain free as extra workspace for select: 8 blocks (45,440 steps in total) borrow 11 unprepared qubits for 160 workspace qubits at the 27,402 𝑇 per step of Table S3, 1 block of 1,024 steps borrows 10 qubits (28,298 𝑇 per step), and 7 blocks of 128 steps borrow 7 qubits (31,010 𝑇 per step). On top of Table S3, the baseline spends 268 𝑇 per step on reflections and phase-estimation control, for 46,068 𝑇 in total. Each of our blocks uses 84 𝑇 for each reflection between its steps and 232 𝑇 for an ordinary first swap block. The 127 single steps cost 37,642 𝑇 each (including 418 𝑇 per inner lookup), because all phase-estimation qubits are then in use and select has to fit in 149 qubits of workspace. The reflections between blocks and

40

Part of a walk step

Baseline

This work

Rotations and their angles Index decoding Spin swaps Outer state preparation Inner state preparation

37,688 264 928 1,032 5,888

23,636 440 464 598 2,264

Total

45,800

27,402

Table S3: 𝑇 gates per walk step for the baseline and for a step inside the first eight blocks (45,440 steps) of the best verified circuit. Reflections and phase-estimation control are counted separately in the text. between single steps, together with phase-estimation control, take 13,316 𝑇, with 31 reflections controlled by the phase-estimation register. Preparing the initial state of the phase-estimation register takes 142,248 𝑇, the inverse QFT 12,603 𝑇 and the phase-gradient state 1,036 𝑇. Adding these up gives the T = 1,310,839,337 quoted above.

J. Code Availability and Reproducibility Appendix References 1.

Beverland, M. E. et al. Assessing requirements to scale to practical quantum advantage 2022. arXiv: 2211.07629 [quant-ph].

2.

Preskill, J. Beyond NISQ: The Megaquop Machine. ACM Transactions on Quantum Computing 6, 1–7. arXiv: 2502.17368 [quant-ph] (2025).

3.

Reiher, M., Wiebe, N., Svore, K. M., Wecker, D. & Troyer, M. Elucidating reaction mechanisms on quantum computers. Proceedings of the National Academy of Sciences 114, 7555–7560 (2017).

4.

Lee, J. et al. Even More Efficient Quantum Computations of Chemistry Through Tensor Hypercontraction. PRX Quantum 2, 030305 (2021).

7.

Babbush, R. et al. Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations. PRX Quantum 7, 031001. arXiv: 2603.28846 [quant-ph] (2026).

9.

Grover, L. K. A fast quantum mechanical algorithm for database search in Proceedings of the TwentyEighth Annual ACM Symposium on Theory of Computing (1996), 212–219.

10.

Häner, T., Roetteler, M. & Svore, K. M. Optimizing Quantum Circuits for Arithmetic 2018. arXiv: 1805. 12445 [quant-ph].

23.

Gidney, C. Halving the cost of quantum addition. Quantum 2, 74 (2018).

24.

Babbush, R. et al. Encoding Electronic Spectra in Quantum Circuits with Linear T Complexity. Physical Review X 8, 041015 (2018).

25.

Low, G. H. & Chuang, I. L. Hamiltonian Simulation by Qubitization. Quantum 3, 163 (2019).

27.

Su, Y., Berry, D. W., Wiebe, N., Rubin, N. & Babbush, R. Fault-Tolerant Quantum Simulations of Chemistry in First Quantization. PRX Quantum 2, 040332 (2021).

41.

De Moura, L. & Ullrich, S. The Lean 4 Theorem Prover and Programming Language in Automated Deduction – CADE 28 12699 (Springer, 2021), 625–635.

42.

Feng, Y. & Ying, M. Quantum Hoare Logic with Classical Variables. ACM Transactions on Quantum Computing 2, 1–43 (2021).

43.

Litinski, D. A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery. Quantum 3, 128 (2019).

44.

We will shortly open source our Lean 4 library, problem specifications and verified solutions.

41

45.

The mathlib Community. The Lean mathematical library in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (2020), 367–381.

46.

The Physlib Community. Physlib: The Lean Physics Library https://github.com/leanprovercommunity/physlib. 2024.

47.

Meiburg, A. Quantum Information in Lean https://github.com/Timeroot/Lean- QuantumInfo. 2024.

48.

Rubin, N. C. et al. Quantum computation of stopping power for inertial fusion target design. Proceedings of the National Academy of Sciences 121, e2317772121 (2024).

55.

Qu, A. et al. CORAL: Towards Autonomous Multi-Agent Evolution for Open-Ended Discovery in Proceedings of the Conference on Language Modeling (COLM) (2026). arXiv: 2604.01658 [cs.AI].

56.

Zhong, Z., Raghunathan, A. & Carlini, N. ImpossibleBench: Measuring LLMs’ Propensity of Exploiting Test Cases 2025. arXiv: 2510.20270.

57.

Lean FRO. comparator: A trustworthy judge for Lean proofs from untrusted sources https://github. com/leanprover/comparator. Accessed Nov. 2026. 2025.

58.

Pocrnic, M., Loaiza, I., Arrazola, J. M., Wiebe, N. & Motlagh, D. Efficient Simulation of Pre-BornOppenheimer Dynamics on a Quantum Computer 2026. arXiv: 2602.11272 [quant-ph].

59.

Pocrnic, M. & Motlagh, D. Improved constant factors for qubitized Hamiltonian simulation 2026. arXiv: 2608.02734 [quant-ph].

60.

Low, G. H. et al. Fast Quantum Simulation of Electronic Structure by Spectral Amplification. Physical Review X 15, 041016 (2025).

61.

Low, G. H. et al. A denser planar surface code 2026. arXiv: 2605.30455 [quant-ph].

62.

Boyer, M., Brassard, G., Høyer, P. & Tapp, A. Tight Bounds on Quantum Searching. Fortschritte der Physik 46, 493–505 (1998).

63.

Zalka, C. Grover’s quantum searching algorithm is optimal. Physical Review A 60, 2746–2751 (1999).

64.

Gingrich, R. M., Williams, C. P. & Cerf, N. J. Generalized quantum search with parallelism. Physical Review A 61, 052313 (2000).

65.

Grover, L. K. & Radhakrishnan, J. Quantum search for multiple items using parallel queries 2004. arXiv: quant-ph/0407217.

66.

Fang, W. & Heunen, C. Weakly Measured Loops for Quantum Amplitude Amplification: Oracle Savings and Adaptive Search with Unknown Target Probability 2026. arXiv: 2609.39621 [quant-ph].

67.

Goyal, V. & Sigman, K. On simulating a class of Bernstein polynomials. ACM Transactions on Modeling and Computer Simulation 22, 1–5 (2012).

88.

Goings, J. J. et al. Reliably assessing the electronic structure of cytochrome P450 on today’s classical computers and tomorrow’s quantum computers. Proceedings of the National Academy of Sciences 119, e2203533119 (2022).

89.

Caesura, A. et al. Faster Quantum Chemistry Simulations on a Quantum Computer with Improved Tensor Factorization and Active Volume Compilation. PRX Quantum 6, 030337 (2025).

90.

Gidney, C. How to factor 2048 bit RSA integers with less than a million noisy qubits 2025. arXiv: 2505.15917 [quant-ph].

91.

Hietala, K., Rand, R., Hung, S.-H., Wu, X. & Hicks, M. A verified optimizer for quantum circuits. Proceedings of the ACM on Programming Languages 5, 1–29 (2021).

92.

Zhou, L., Barthe, G., Strub, P.-Y., Liu, J. & Ying, M. CoqQ: Foundational Verification of Quantum Programs. Proceedings of the ACM on Programming Languages 7, 833–865 (2023).

93.

Ying, M. Floyd–Hoare logic for quantum programs. ACM Transactions on Programming Languages and Systems 33, 1–49 (2011).

42

94.

Liu, J. et al. Formal Verification of Quantum Algorithms Using Quantum Hoare Logic in Computer Aided Verification – CAV 2019 11562 (Springer, 2019), 187–207.

95.

Zhang, L., Jing, M., Zhao, Y., Liu, J. & Wang, X. Lean-QuantumAlg: A Framework for AI Agents to Produce Quantum Algorithms that Humans Can Trust Oct. 2026. arXiv: 2610.30216 [quant-ph].

96.

Ren, Y. et al. QEDIA: Quantum Program Verification in Lean Oct. 2026. arXiv: 2610.17708 [quant-ph].

97.

Ying, M. A practical quantum Hoare logic with classical variables, I. Information and Computation 309, 105417. issn: 0890-5401 (2026).

98.

Morgan, C., McIver, A. & Seidel, K. Probabilistic Predicate Transformers. ACM Transactions on Programming Languages and Systems 18, 325–353 (May 1996).

99.

The Lean Developers. The Lean Language Reference (Lean v4.35.0), Chapter 17: The vcgen Tactic https://lean-lang.org/doc/reference/4.35.0/The--vcgen--tactic/. Lean FRO. Accessed: 2026-11-04. 2026.

100.

Gladshtein, V., Pîrlea, G., Zhao, Q., Kurin, V. & Sergey, I. Foundational Multi-Modal Program Verifiers. Proceedings of the ACM on Programming Languages 10, 2233–2264 (2026).

101.

VERSE Lab. Loom: A Framework for Foundational Multi-Modal Program Verifiers in Lean https : //github.com/verse-lab/loom. GitHub repository. Accessed: 2026-11-04. 2026.

102.

Gudder, S. P. & Greechie, R. Effect Algebra Counterexamples. Mathematica Slovaca 46, 317–325 (1996).

103.

Baker, B. et al. Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscation 2025. arXiv: 2503.11926 [cs.AI].

104.

Schmidgall, S. & Moor, M. AgentRxiv: Towards Collaborative Autonomous Research 2025. arXiv: 2503. 18102.

105.

Jiang, Y., Zhang, Y., Shen, X., Backes, M. & Zhang, Y. “Humans welcome to observe”: A First Look at the Agent Social Network Moltbook 2026. arXiv: 2602.10127.

106.

Chen, Y., Niu, G., Cheng, J., Han, B. & Sugiyama, M. When and Why Does Multi-Agent Debate Fail and Does It Really Underperform? in Proceedings of the 43rd International Conference on Machine Learning (ICML) (2026). arXiv: 2510.20963 [cs.LG].

107.

Jones, C. Low-overhead constructions for the fault-tolerant Toffoli gate. Physical Review A 87, 022328 (2013).

108.

Khattar, T. & Gidney, C. Rise of conditionally clean ancillae for efficient quantum circuit constructions. Quantum 9, 1752 (2025).

109.

Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. Surface codes: Towards practical large-scale quantum computation. Physical Review A 86, 032324 (2012).

110.

Horsman, D., Fowler, A. G., Devitt, S. & Van Meter, R. Surface code quantum computing by lattice surgery. New Journal of Physics 14, 123011 (2012).

111.

Bravyi, S. & Kitaev, A. Universal quantum computation with ideal Clifford gates and noisy ancillas. Physical Review A 71, 022316 (2005).

112.

Gidney, C. & Fowler, A. G. Efficient magic state factories with a catalyzed |𝐶𝐶 𝑍> to 2|𝑇> transformation. Quantum 3, 135 (2019).

113.

Gidney, C., Shutty, N. & Jones, C. Magic state cultivation: growing T states as cheap as CNOT gates 2024. arXiv: 2409.17595 [quant-ph].

114.

Gidney, C., Newman, M., Fowler, A. & Broughton, M. A Fault-Tolerant Honeycomb Memory. Quantum 5, 605 (2021).

115.

Kim, I. H. et al. Fault-tolerant resource estimate for quantum chemical simulations: Case study on Li-ion battery electrolyte molecules. Physical Review Research 4, 023019 (2022).

116.

Berry, D. W., Gidney, C., Motta, M., McClean, J. R. & Babbush, R. Qubitization of Arbitrary Basis Quantum Chemistry Leveraging Sparsity and Low Rank Factorization. Quantum 3, 208 (2019).

43

117.

Gu, A., Kemeny, A. H., Yelin, S. F. & Lukin, M. D. Discovering state-of-the-art quantum circuits with large language models Oct. 2026. arXiv: 2610.22367 [quant-ph].

118.

Von Burg, V. et al. Quantum computing enhanced computational catalysis. Physical Review Research 3, 033055 (2021).

119.

Rubin, N. C. et al. Fault-Tolerant Quantum Simulation of Materials Using Bloch Orbitals. PRX Quantum 4, 040303 (2023).

120.

Litinski, D. & Nickerson, N. Active volume: An architecture for efficient fault-tolerant quantum computers with limited non-local connections 2022. arXiv: 2211.15465 [quant-ph].

121.

Bravyi, S. et al. High-threshold and low-overhead fault-tolerant quantum memory. Nature 627, 778–782 (2024).

122.

Gidney, C. & Ekerå, M. How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum 5, 433 (2021).

123.

Jeffery, S., Magniez, F. & de Wolf, R. Optimal Parallel Quantum Query Algorithms. Algorithmica 79, 509–529. issn: 1432-0541 (2016).

124.

Bennett, C. H., Bernstein, E., Brassard, G. & Vazirani, U. Strengths and Weaknesses of Quantum Computing. SIAM Journal on Computing 26, 1510–1523 (1997).

125.

Høyer, P. Arbitrary phases in quantum amplitude amplification. Physical Review A 62, 052304 (2000).

126.

Long, G. L. Grover algorithm with zero theoretical failure rate. Physical Review A 64, 022307 (2001).

127.

Brassard, G., Høyer, P., Mosca, M. & Tapp, A. in Quantum Computation and Information 53–74 (American Mathematical Society, 2002). arXiv: quant-ph/0005055.

128.

Yoder, T. J., Low, G. H. & Chuang, I. L. Fixed-Point Quantum Search with an Optimal Number of Queries. Physical Review Letters 113, 210501 (2014).

129.

Aldenbro, D. & Skalski, A. Comparing Grover’s algorithm to linear search when finding multiple queried elements Bachelor’s thesis (KTH Royal Institute of Technology, 2024).

130.

Mizel, A. Critically Damped Quantum Search. Physical Review Letters 102, 150501 (2009).

131.

Andrés-Martínez, P. & Heunen, C. Weakly measured while loops: peeking at quantum states. Quantum Science and Technology 7, 025007 (2022).

132.

Grover, L. & Rudolph, T. Creating superpositions that correspond to efficiently integrable probability distributions 2002. arXiv: quant-ph/0208112.

133.

Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum Algorithm for Linear Systems of Equations. Physical Review Letters 103, 150502 (2009).

134.

Temme, K., Osborne, T. J., Vollbrecht, K. G., Poulin, D. & Verstraete, F. Quantum Metropolis sampling. Nature 471, 87–90 (2011).

135.

Ozols, M., Roetteler, M. & Roland, J. Quantum rejection sampling. ACM Transactions on Computation Theory 5, 1–33 (2013).

136.

Sanders, Y. R., Low, G. H., Scherer, A. & Berry, D. W. Black-Box Quantum State Preparation without Arithmetic. Physical Review Letters 122, 020502 (2019).

137.

Burge, I., Barbeau, M. & Garcia-Alfaro, J. Quantum CORDIC – Arcsine on a Budget 2024. arXiv: 2411.14434 [quant-ph].

138.

Khattar, T. et al. Leveraging verifiable structure in quantum circuits to find more efficient compilations with agentic AI 2026. arXiv: 2610.23832 [quant-ph].

139.

Motlagh, D. & Wiebe, N. Generalized Quantum Signal Processing. PRX Quantum 5, 020368. arXiv: 2308.01501 [quant-ph] (2024).

140.

Berry, D. W., Motlagh, D., Pantaleoni, G. & Wiebe, N. Doubling the efficiency of Hamiltonian simulation via generalized quantum signal processing. Physical Review A 110, 012612 (2024).

44

141.

Eklund, E. C. et al. End-to-End Simulation of Chemical Dynamics on a Quantum Computer 2026. arXiv: 2603.19007 [quant-ph].

142.

Nacu, Ş. & Peres, Y. Fast simulation of new coins from old. The Annals of Applied Probability 15, 93–115 (2005).

143.

Menczer, A. et al. Parallel Implementation of the Density Matrix Renormalization Group Method Achieving a Quarter petaFLOPS Performance on a Single DGX-H100 GPU Node. Journal of Chemical Theory and Computation 20, 8397–8404 (2024).

144.

Rubin, N. Fast quantum simulation of electronic structure by spectral amplification Zenodo. 2025.

145.

Abrams, D. S. & Lloyd, S. Quantum Algorithm Providing Exponential Speed Increase for Finding Eigenvalues and Eigenvectors. Physical Review Letters 83, 5162–5165 (1999).

146.

Lee, S. et al. Evaluating the evidence for exponential quantum advantage in ground-state quantum chemistry. Nature Communications 14, 1952 (2023).

147.

King, R., Low, G. H., Babbush, R., Somma, R. D. & Rubin, N. C. Quantum Simulation with Sum-ofSquares Spectral Amplification. Physical Review Letters 136, 110601 (2026).

45

Related documents

Record · ID 1598901 · SHA-256 5164d64cbbfbcd6b
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive