QArena · Classical simulation Submit

Fewest stabilizer terms for magic states

Fewer stabilizer terms can reduce the cost of simulating circuits with T, CCZ and other non-Clifford gates.

Overview

Each instance's leaderboard updates as soon as the verifier accepts a submission.

Task

Write a magic state as a linear combination of as few stabilizer states as possible. The target amplitudes below are unnormalized. Bit q of x corresponds to qubit q, and w = |x| is the number of ones in x.

  • T-m (m = 1 to 14, on m qubits): amplitude ζw, with ζ = eiπ/4.
  • CCZ-k (k = 1 to 4, on 3k qubits): amplitude ∏b (−1)x3bx3b+1x3b+2.
  • face-m (m = 1 to 14, on m qubits): amplitude (1 + √3)m−w (1 + i)w. This is m copies of the face state, whose Bloch vector is (1, 1, 1)/√3 (the T-type magic state of Bravyi and Kitaev). It is a different state from |T>.
  • sqrtT-m (m = 1 to 14, on m qubits): amplitude ηw, with η = eiπ/8, so m copies of |0> + eiπ/8|1>.
  • CS-m (m = 1 to 7, on 2m qubits): amplitude iΣj x2jx2j+1, so copy j of CS|++> sits on qubits 2j and 2j+1.
  • cat-m (m = 2 to 14, on m qubits): amplitude iw/2 when w is even and 0 when w is odd. This is the magic cat state of Qassim, Pashayan and Gosset, (|T>⊗m + (Z|T>)⊗m)/2. It is one state on m qubits, not m copies of a smaller state.
  • C3Z-m (m = 1 to 3, on 4m qubits): amplitude ∏j (−1)x4jx4j+1x4j+2x4j+3, so copy j of CCCZ|++++> sits on qubits 4j to 4j+3.

Each instance file states its family, the number of copies, the number of qubits n and the limit of 256 states.

Submission file

JSON structure:

{"n": 2, "states": [{"h": "00", "G": ["10", "01"], "Q": [], "L": [0, 0]}, {"h": "11", "G": [], "Q": [], "L": []}]}

This example is valid for CS-1: CS|++> is the all-ones vector plus (i − 1)|11>. The verifier bundle contains a larger example.

Each submitted state has the amplitude iΣ li yi (−1)Σ(i,j)∈Q yiyj at the basis state h ⊕ yG, for every y ∈ {0,1}k, and amplitude 0 elsewhere.

  • Bit strings use the same convention as the targets: character i is qubit i.
  • k is the number of rows of G. G must have full row rank over GF(2).
  • Pairs in Q satisfy 0 ≤ i ≤ j < k, with no repeats. Each li is 0, 1, 2 or 3.
  • This representation can express every stabilizer state (Dehaene and De Moor, quant-ph/0304125). The witnesses of the Unitary Foundation challenge use the same convention (x0 = h, W = G, the upper triangle of their Q, l = L).
  • Submit at most 256 states. Do not send coefficients; the verifier solves for them.

Validation

The verifier decides whether the target lies in the span of your states, using exact arithmetic for the validity check. Stabilizer amplitudes are Gaussian integers, so the target is first written as a sum of a few vectors with Gaussian-integer entries times fixed numbers that are linearly independent over the Gaussian rationals:

  • T: 1 and ζ. face: 1 and √3, using (1 + √3)j = aj + bj√3. sqrtT: 1, η, η2 and η3, using η4 = i. CCZ, CS, cat and C3Z: 1 alone.

The target lies in the span exactly when every component does. For each component:

  1. Gaussian elimination modulo a fixed prime selects an invertible block of the amplitude matrix.
  2. The verifier then solves the selected systems over the rational numbers.
  3. It checks every amplitude using modular arithmetic with enough primes to establish exact equality.

Sets with redundant states are accepted if they reproduce the target; the report shows their exact rank. If the fixed primes cannot prove a result (a lost rank modulo all three pivot primes, or a bound beyond the 200 fixed primes), the verifier reports an error and gives no verdict.

Scoring

Each instance is ranked by the number of submitted states. Fewer states rank first; equal counts are ranked by submission number (lower first). For T states the leaderboard also reports log2(r)/m.

Baseline and reference scores

T states:

m7891011121314
QArena baseline: products of the two-term T⊗2 identity161632326464128128
Reference score912181827365454
log2(r)/m of the reference0.4530.4480.4630.4170.4320.4310.4430.411

Sources: Kissinger, van de Wetering and Vilmart (arXiv:2202.09202), whose recursion χ(T⊗t) ≤ 3χ(T⊗(t−4)) gives 9 at m = 7 and 12 at m = 8; Qassim, Pashayan and Gosset (arXiv:2106.07740), 18 at m = 10; the Unitary Foundation stabilizer rank challenge (github.com/unitaryfoundation/stabrank), which holds checked constructions up to m = 10 and proofs of optimality up to m = 6. The values for m = 11 to 14 are derived bounds from the recursion, not published entries. The listed reference constructions have log2(r)/m above log2(3)/4, approximately 0.39624. χ(CCZ) = 2 because |CCZ> is not a stabilizer state; for k ≥ 2 the reference is the product bound 2k. Stabilizer rank does not change under local Clifford gates, so |T> and |H> have the same ranks.

For the other families, the instances below the first ranked size (face 1 to 6, sqrtT 1 to 5, CS 1 and 2, cat 2 to 6, C3Z-1) are solved and serve as debug instances.

InstanceRanked sizesQArena baselineReference score
face-mm = 7 to 149, 9, 15, 15, 24, 24, 45, 45same
sqrtT-mm = 6 to 1412, 12, 24, 30, 36, 60, 72, 144, 144same
CS-mm = 3 to 76, 9, 18, 27, 54same
cat-mm = 7 to 146, 6, 9, 9, 18, 18, 27, 27same
C3Z-mm = 2, 34, 8same

The small decompositions are the public witnesses of the Unitary Foundation challenge (face up to 10 copies, sqrtT up to 7, CS up to 3, cat up to 8 qubits), converted term by term and checked by this verifier. The face decompositions at 7 to 10 copies come from Bevins (arXiv:2610.17500) and the challenge's own searches; the cat witnesses are those of Qassim, Pashayan and Gosset. The face-12 baseline is Bevins' 24-term decomposition (his Table 1: 24 words in three two-qubit stabilizer states), and face-11 applies ⟨0| to one qubit of each of its terms. The other large face, sqrtT and CS baselines are tensor products of these, choosing the split with the fewest terms. C3Z uses |C3Z> = |+>⊗4 − 2|1111> (unnormalized) and its products. Cat states do not factor, but two of them can be joined: applying ⟨cat2| = ⟨00| − i⟨11| to the last qubit of cata and the first qubit of catb gives cata+b−2, and every joined pair of stabilizer terms is again a stabilizer state. So cat10 needs at most 3 × 3 = 9 terms from two copies of the 3-term cat6; the cat-9 to cat-14 baselines are built this way. Reference values for larger sizes come from the listed constructions by tensor products or, for cat states, by gluing (derived bounds, not published entries). Lower bounds on the challenge's site: at least 6 terms for 7 to 10 face copies, at least 7 for 6 and 7 sqrtT copies, at least 4 for 3 CS copies, and at least 5 for cat states on 7 and 8 qubits.

Application

A decomposition with fewer terms can reduce the work required by a stabilizer simulation of circuits with T, CCZ, controlled-S and other non-Clifford gates.

Current records

InstanceQArena baselineRecord (stabilizer states) Reference scoreRecord holderStatus
1 copy of |T⟩
1 qubit
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of |T⟩
2 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
3 copies of |T⟩
3 qubits
433 auroraMatches proved optimum
4 copies of |T⟩
4 qubits
444 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
5 copies of |T⟩
5 qubits
866 auroraMatches proved optimum
6 copies of |T⟩
6 qubits
866 auroraMatches proved optimum
7 copies of |T⟩
7 qubits
1699 auroraMatches reference
8 copies of |T⟩
8 qubits
161212 auroraMatches reference
9 copies of |T⟩
9 qubits
321818
Checked construction, Unitary stabrank challenge
auroraMatches reference
10 copies of |T⟩
10 qubits
321818
Published construction, Qassim, Pashayan, Gosset 2021
auroraMatches reference
11 copies of |T⟩
11 qubits
642727 auroraMatches reference
12 copies of |T⟩
12 qubits
643636 auroraMatches reference
13 copies of |T⟩
13 qubits
1285454 auroraMatches reference
14 copies of |T⟩
14 qubits
1285454 auroraMatches reference
1 copy of |CCZ⟩
3 qubits
222
Proved optimum, |CCZ⟩ is not a stabilizer state
qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of |CCZ⟩
6 qubits
444
Derived bound, product of single copies
qarena-baseline (QArena baseline)(baseline)Matches reference
3 copies of |CCZ⟩
9 qubits
888
Derived bound, product of single copies
qarena-baseline (QArena baseline)(baseline)Matches reference
4 copies of |CCZ⟩
12 qubits
161616
Derived bound, product of single copies
qarena-baseline (QArena baseline)(baseline)Matches reference
1 copy of the face state |F⟩
1 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of the face state |F⟩
2 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
3 copies of the face state |F⟩
3 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
4 copies of the face state |F⟩
4 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
5 copies of the face state |F⟩
5 qubits
666 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
6 copies of the face state |F⟩
6 qubits
666 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
7 copies of the face state |F⟩
7 qubits
999
Checked construction, Unitary stabrank challenge
qarena-baseline (QArena baseline)(baseline)Matches reference
8 copies of the face state |F⟩
8 qubits
999
Checked construction, Unitary stabrank challenge
qarena-baseline (QArena baseline)(baseline)Matches reference
9 copies of the face state |F⟩
9 qubits
151515 qarena-baseline (QArena baseline)(baseline)Matches reference
10 copies of the face state |F⟩
10 qubits
151515
Published construction, Bevins 2026
qarena-baseline (QArena baseline)(baseline)Matches reference
11 copies of the face state |F⟩
11 qubits
242424 qarena-baseline (QArena baseline)(baseline)Matches reference
12 copies of the face state |F⟩
12 qubits
242424
Published construction, Bevins 2026
qarena-baseline (QArena baseline)(baseline)Matches reference
13 copies of the face state |F⟩
13 qubits
454545
Derived bound, product of the 10-copy and 3-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
14 copies of the face state |F⟩
14 qubits
454545
Derived bound, product of the 10-copy and 4-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
1 copy of |√T⟩
1 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of |√T⟩
2 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
3 copies of |√T⟩
3 qubits
444 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
4 copies of |√T⟩
4 qubits
555 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
5 copies of |√T⟩
5 qubits
666 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
6 copies of |√T⟩
6 qubits
12912
Checked construction, Unitary stabrank challenge
auroraBetter than reference
7 copies of |√T⟩
7 qubits
121212
Checked construction, Unitary stabrank challenge
qarena-baseline (QArena baseline)(baseline)Matches reference
8 copies of |√T⟩
8 qubits
242024
Derived bound, product of the 7 + 1-copy constructions
auroraBetter than reference
9 copies of |√T⟩
9 qubits
303030
Derived bound, product of the 5 + 4-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
10 copies of |√T⟩
10 qubits
363636
Derived bound, product of the 5 + 5-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
11 copies of |√T⟩
11 qubits
605460
Derived bound, product of the 7 + 4-copy constructions
auroraBetter than reference
12 copies of |√T⟩
12 qubits
727272
Derived bound, product of the 7 + 5-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
13 copies of |√T⟩
13 qubits
144108144
Derived bound, product of the 7 + 6-copy constructions
auroraBetter than reference
14 copies of |√T⟩
14 qubits
144144144
Derived bound, product of the 7 + 7-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
1 copy of |CS⟩
2 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of |CS⟩
4 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
3 copies of |CS⟩
6 qubits
666
Checked construction, Unitary stabrank challenge
qarena-baseline (QArena baseline)(baseline)Matches reference
4 copies of |CS⟩
8 qubits
999
Derived bound, product of the 2 + 2-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
5 copies of |CS⟩
10 qubits
181818
Derived bound, product of the 2 + 2 + 1-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
6 copies of |CS⟩
12 qubits
272727
Derived bound, product of the 2 + 2 + 2-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
7 copies of |CS⟩
14 qubits
545454
Derived bound, product of the 2 + 2 + 2 + 1-copy constructions
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 2 qubits
2 qubits
111
Proved optimum, a stabilizer state
qarena-baseline (QArena baseline)(baseline)Matches proved optimum
Magic cat state on 3 qubits
3 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
Magic cat state on 4 qubits
4 qubits
222 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
Magic cat state on 5 qubits
5 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
Magic cat state on 6 qubits
6 qubits
333 qarena-baseline (QArena baseline)(baseline)Matches proved optimum
Magic cat state on 7 qubits
7 qubits
666
Published construction, Qassim, Pashayan, Gosset 2021
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 8 qubits
8 qubits
666
Published construction, Qassim, Pashayan, Gosset 2021
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 9 qubits
9 qubits
999
Derived bound, published cat states on 6 and 5 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 10 qubits
10 qubits
999
Derived bound, published cat states on 6 and 6 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 11 qubits
11 qubits
181818
Derived bound, published cat states on 6, 6 and 3 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 12 qubits
12 qubits
181818
Derived bound, published cat states on 6, 6 and 4 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 13 qubits
13 qubits
272727
Derived bound, published cat states on 6, 6 and 5 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
Magic cat state on 14 qubits
14 qubits
272727
Derived bound, published cat states on 6, 6 and 6 qubits glued together, see the problem statement
qarena-baseline (QArena baseline)(baseline)Matches reference
1 copy of |CCCZ⟩
4 qubits
222
Proved optimum, |CCCZ⟩ is not a stabilizer state
qarena-baseline (QArena baseline)(baseline)Matches proved optimum
2 copies of |CCCZ⟩
8 qubits
444
Derived bound, product of single copies
qarena-baseline (QArena baseline)(baseline)Matches reference
3 copies of |CCCZ⟩
12 qubits
888
Derived bound, product of single copies
qarena-baseline (QArena baseline)(baseline)Matches reference

Reference scores come from cited papers or derived constructions. Only accepted submissions can hold a QArena record.