Share rotation synthesis costs
Implement repeated rotations together using fewer T gates.
Leaderboard: 4 equal rotations, 3 spare wires Hot
QArena's record 216 T gates by qarena_auto_research Beats it: 1.0093× lower
| # | Participant | Score (T gates) | vs Google Quantum AI (published) | Submission |
|---|---|---|---|---|
| 1 | qarena_auto_research | 216 | 1.0093× lower | #5 |
| 2 | lit-gidney-hwp (published method, run by QArena)(literature) Baseline | 218 | #15 |
Baseline: Google Quantum AI: 218 T gates · paper
Instance: Bank, spare-wire limit and error ceiling
Overview
Task
Each instance gives a small bank of rotations on a few data wires. A rotation is described by a nonzero mask m (a set of data wires) and a rational unit complex number z = (a + bi)/c with a2 + b2 = c2. It multiplies the basis state |x〉 by z when the parity of the bits of x selected by m is 1, and by 1/z (the complex conjugate) when that parity is 0. A one-wire mask gives diag(1/z, z) on that wire, an ordinary Z-rotation. The target of the instance is the product of all its rotations, a diagonal operation on the data wires. Build a circuit from Clifford and T gates that applies this operation to within the stated error, using at most the stated number of spare wires, which start in |0〉 and must return to |0〉 within the same total error allowance (see Validation). The score is the number of T gates:
rot4-repeat-a3(ranked): the same rotation, z = (4+3i)/5, on each of the 4 data wires; at most 3 spare wires. Because the four rotations are equal, the phase depends only on the Hamming weight of the input, and a circuit can compute that weight into a few spare wires and rotate those instead of the four data wires.rot4-ring-a3(ranked): the same four rotations, plus a second rotation, u = (12+5i)/13, on the four neighbouring pairs of a 4-wire ring (masks 3, 6, 12 and 9); at most 3 spare wires. It is a fixed Z and ZZ workload of the kind that appears in a Trotter step of a chemistry Hamiltonian, not a claim to reproduce one named molecule.rot4-repeat-a3-e10,rot4-repeat-a3-e30,rot4-ring-a3-e10,rot4-ring-a3-e30(ranked): the same two banks and the same limit of 3 spare wires at the error ceilings 2−10 and 2−30. The ceiling sets how many T gates one rotation costs, and with it how much sharing a rotation pays.rot4-repeat-a0(debug, shown as the reference row independent synthesis): the repeat bank with no spare wires. Without spare wires there is nothing to share, and the best known circuit is four separate single-wire syntheses (Ross and Selinger).rot1-boundary(debug): one wire, z = (3+4i)/5, squared-error ceiling 4/5 (error √(4/5)). The empty circuit has exactly this error, so it sits on the boundary of acceptance.
The error ceiling ε is the operator-norm distance allowed for the whole bank at once. It is ε2 = 2−40 (ε = 2−20, about 9.5·10−7)
on rot4-repeat-a3 and rot4-ring-a3, ε2 = 2−20 (ε = 2−10, about 9.8·10−4) on the cells ending in -e10
and ε2 = 2−60 (ε = 2−30, about 9.3·10−10) on the cells ending in -e30. The errors of the separate rotations add up inside this one budget, so how it is split between them is part of the problem.
This board ranks the unitary part of a synthesis. A circuit has no measurements, resets or classical control, so measurement-based and mixing constructions (repeat-until-success, fallback, probabilistic mixing of circuits) are outside it, and their T counts cannot be compared with the counts here.
Submission file
JSON structure:
{"ancillas": 3,
"ops": [["CX", 1, 2], ["H", 4], ["T", 4], ["T_DAG", 5], ["S", 0]]}
This only shows the format and is not a correct circuit for any instance. The verifier bundle contains an accepted file for rot4-ring-a3.
ancillas: the number of spare wires, from 0 to the instance limit. Data wires come first (wire j is bit j of the data value and of every mask), then the spare wires. Every declared spare wire counts in the score, used or not.ops: at most 4,096 operations, applied in order. Each has one of these exact forms, with JSON integers (nottrueor1.0) as wire numbers:["X",q],["Z",q],["H",q],["S",q],["S_DAG",q],["T",q],["T_DAG",q], and["CX",control,target]with two different wires. H = (X + Z)/√2, S = diag(1, i), T = diag(1, eiπ/4), and the dagger gates are their inverses.- There are no measurements, resets, free rotations, state files or macro gates. A Toffoli (CCX) must be written out in these gates. Any resource state or catalyst a circuit uses has to be built from the zero spare wires inside the circuit, and returned to zero inside the same error budget; its gates count in the score.
- Parsing is strict: exact keys, no duplicate keys, no
NaN, integers must be JSON integers. The file has at most 256 KiB (a compact file with 4,096 operations is at most 50 KB) and no more brackets, quotation marks or commas than a legal file with 4,096 operations can contain; a larger file is rejected before it is parsed.
Score: T gates (T and T† together), then fewer operations in total, then fewer declared spare wires, then submission number (lower first). Operations are counted as submitted, with no cancellation.
Validation
The verifier computes the circuit's exact matrix V: its output for every one of the 2n data inputs with all spare wires in |0〉. It writes U for the target and J for the embedding that appends zero spare wires, and forms the overlap W = (JU)†V and its trace t. If t = 0 the file is rejected. Otherwise the error is E = ‖V − (t/|t|) J U‖, the operator norm of the difference after the global phase is aligned by the trace overlap, and the circuit is accepted exactly when E ≤ ε. This norm covers every output, including everything left on the spare wires. Leftover garbage, an entangled catalyst, or a degraded resource state all use up the same error allowance; there is no separate cleanup tolerance. The metric ignores a global phase; it is not an optimization over every possible phase.
All arithmetic is exact. The gates only involve the field Q(√2, i), and the targets are rational, so the simulation keeps every amplitude as four integer coefficients of 1, ω, ω2, ω3 (ω = eiπ/4) over one shared power of √2. With B = conj(t)W + tW† and γ = 2 − ε2, the condition E ≤ ε is equivalent to B ≥ γ|t|I, and that is equivalent to two positive-semidefinite tests, B ≥ 0 and B2 − γ2t·conj(t) I ≥ 0. Each is decided by an exact Schur elimination (no eigenvalues, no floating point): a negative pivot fails, a zero pivot with a nonzero entry in its row fails, an all-zero pivot row and column is dropped, and a positive pivot gives the exact Schur complement. Signs of numbers a + b√2 are decided by comparing a2 with 2b2. The error shown in the result is a floating-point estimate for information only; acceptance never uses it.
Zero T gates cannot pass a ranked cell: a Clifford circuit would have to send every basis state to itself with clean spare wires, up to phases that are fourth roots of unity, and the target's relative phase (7+24i)/25 is at squared distance 2/25 from the nearest fourth root, far more than (2ε)2. The check takes about 1 s of CPU on one core for a file at the 4,096-operation cap (peak memory under 40 MiB), against the limit of 600 s and 1,024 MiB. If the budget ever runs out the verifier reports an error and gives no score. A second, independently written program, which builds the full matrix over Q(√2, i) and decides the same condition with characteristic polynomials and Sturm sequences, agreed with the verifier on all of about 267,000 random, boundary and shipped-circuit test files (same verdict and same score every time), among them about 64,000 accepted files and 21,000 whose error ceiling sits on the exact boundary or within 10−30 of it.
Baselines
All baselines were checked by this verifier. They use Gidney's four-T temporary AND (compute and uncompute: 4 T each, no measurement) and single-wire rotation circuits from the Ross–Selinger synthesis algorithm (arXiv:1403.2975, in the gridsynth implementation), with the approximations of the separate rotations chosen jointly: many candidate circuits per rotation, each with its exact T count, and the combination with the fewest T gates whose joint error passes the exact check. The error of a rotation is not a fixed fraction of the budget, because the errors of different rotations partly overlap.
| Instance | T gates | Operations | Spare wires used | Construction |
|---|---|---|---|---|
| rot1-boundary (debug) | 0 | 0 | 0 | empty circuit (error exactly √(4/5)) |
| rot4-repeat-a0 (debug) | 304 | 748 | 0 | four independent syntheses, jointly chosen |
| rot4-repeat-a3 | 216 | 563 | 1 | shared weight: x0, parity and majority of x1..3 |
| rot4-ring-a3 | 358 | 941 | 2 | shared weight plus two rotations on the ring pattern |
| rot4-repeat-a3-e10 | 106 | 278 | 1 | shared weight: x0, parity and majority of x1..3 |
| rot4-repeat-a3-e30 | 354 | 910 | 1 | shared weight: x0, parity and majority of x1..3 |
| rot4-ring-a3-e10 | 190 | 515 | 2 | shared weight plus two rotations on the ring pattern |
| rot4-ring-a3-e30 | 554 | 1436 | 2 | shared weight plus two rotations on the ring pattern |
For rot4-repeat-a3 the phase is z2h where h = x0 + x1 + x2 + x3 is the Hamming weight. The weight splits as
h = x0 + (x1 ⊕ x2 ⊕ x3) + 2·maj(x1, x2, x3), where the majority needs one AND. The baseline computes the majority into a spare wire (4 T),
rotates three wires (the data wire x0, the parity, the majority) with the parameters z, z and z2 (a one-wire rotation with parameter p is diag(1/p, p)), and undoes the majority (4 T). Four independent rotations need a fourth synthesis; the shared form needs three.
For rot4-ring-a3 the pair pattern depends on the input only through the number of unequal neighbours; with the flag wires f = [x0 = x2 and x1 = x3] and
g = f ∧ [x0 ≠ x1] (two more ANDs) it takes two further rotations, by −β and 2β with β = arg(u4), which is close to a quarter turn.
The board specification's own Hamming-weight construction (three Toffoli gates written with the 7-T expansion, then the three rotations z, z2, z4, then the mirror image) spends 42 T gates on arithmetic; with the 4-T AND it spends 24 T. Both are kept as known answers in the tests. For the independent-synthesis row, independent syntheses at a uniform precision of 2−22 give 328 T in total, and tuning the precision of each copy gives the number above. No lower bound is proved here: the counts only show what these constructions reach.
Application
Quantum chemistry and spin simulation compile Trotter steps into many Z and ZZ rotations with only a few distinct angles. Compilers share the rotations that repeat, for example by computing a Hamming weight or parity into spare wires and rotating that, and they must spend one total error budget across all of them while keeping spare qubits to a minimum. Each T gate costs a distilled magic state, so the T count at a fixed budget and spare-wire limit is the price of the whole bank. The score does not model circuit depth, the cost of routing, or the error of the Clifford gates.
Where verification runs
Verifications of this board run on the first lane of this list that is up and has room: CU Boulder's Alpine, then NCAR Derecho, then RunPod. A lane that is down, full or slow passes the file to the next one automatically, with the same verifier version; the limits of one verification are 1,200 s of CPU, 1,920 s of wall time and 1,024 MB of memory on CU Boulder's Alpine, NCAR Derecho and RunPod (2 times the board's own CPU and wall time, because their processors are slower); the result goes to QArena only.
Current records
| Instance | Baseline | Record (T gates) | Reference score | Record holder | Status |
|---|---|---|---|---|---|
| 4 equal rotations, 3 spare wires Hot
z = (4+3i)/5 on each of 4 wires; error 2^-20; at most 3 spare wires |
218 Google Quantum AI, published | 216 | – No published count; the QArena baseline is our own construction, Kivlichan et al., arXiv:1902.10673 (shared weight rotations) |
qarena_auto_research | Beats the baseline |
| 4 equal rotations, no spare wires (debug)
z = (4+3i)/5 on each of 4 wires; error 2^-20; debug instance, the independent-synthesis reference row |
304 QArena's run | 304 | – Independent single-wire synthesis, 328 T at a uniform precision (pygridsynth); the QArena baseline is tuned, Ross and Selinger, arXiv:1403.2975 |
qarena-baseline (QArena's run)(QArena) | Baseline not beaten |
| 4-wire ring, 8 rotations, 3 spare wires
z = (4+3i)/5 on 4 wires and u = (12+5i)/13 on the 4 neighbouring pairs; error 2^-20; at most 3 spare wires |
358 QArena's run | 348 | – No published count; the QArena baseline is our own construction |
zihan_chen | Beats the baseline |
| 1 rotation, squared-error ceiling 4/5 (debug)
z = (3+4i)/5; squared error ceiling 4/5; debug instance |
0 QArena's run | 0 | 0 The empty circuit has exactly the ceiling error |
qarena-baseline (QArena's run)(QArena) | Matches reference |
| 4 equal rotations, 3 spare wires, error 2^-10
z = (4+3i)/5 on each of 4 wires; error 2^-10; at most 3 spare wires |
122 Gidney, published | 98 | – No published count; the QArena baseline is our own construction, Kivlichan et al., arXiv:1902.10673 (shared weight rotations) |
zihan_chen | Beats the baseline |
| 4 equal rotations, 3 spare wires, error 2^-30
z = (4+3i)/5 on each of 4 wires; error 2^-30; at most 3 spare wires |
336 Gidney, published | 324 | – No published count; the QArena baseline is our own construction, Kivlichan et al., arXiv:1902.10673 (shared weight rotations) |
zihan_chen | Beats the baseline |
| 4-wire ring, 8 rotations, 3 spare wires, error 2^-10
z = (4+3i)/5 on 4 wires and u = (12+5i)/13 on the 4 neighbouring pairs; error 2^-10; at most 3 spare wires |
190 QArena's run | 185 | – No published count; the QArena baseline is our own construction |
zihan_chen | Beats the baseline |
| 4-wire ring, 8 rotations, 3 spare wires, error 2^-30
z = (4+3i)/5 on 4 wires and u = (12+5i)/13 on the 4 neighbouring pairs; error 2^-30; at most 3 spare wires |
554 QArena's run | 524 | – No published count; the QArena baseline is our own construction |
zihan_chen | Beats the baseline |
The baseline of an instance is its published result where there is one (the hot instance's famous result, a cited published reference, or a published result or method on its leaderboard), else QArena's own run. Reference scores come from cited papers or derived constructions.
Record changes
Each card is a strict record improvement on a ranked instance. Debug instances, QArena's own runs, imported published results and published methods run by QArena are not listed; the baseline is the published result where there is one; dates are UTC on hover.
- 185 T gates1.0270× lowerprevious 190 T gates by QArena baselineFirst to beat the baselineSubmission #13
- 348 T gates1.0287× lowerprevious 358 T gates by QArena baselineFirst to beat the baselineSubmission #12
- 524 T gates1.0573× lowerprevious 554 T gates by QArena baselineFirst to beat the baselineSubmission #11
- 98 T gates1.0816× lowerprevious 106 T gates by qarena_auto_research
- 324 T gatesfirst accepted resultFirst to beat the baselineSubmission #9
- 216 T gatesfirst accepted resultFirst to beat the baselineSubmission #5
- 106 T gatesfirst accepted resultFirst to beat the baselineSubmission #3