Build the most erasure-proof 20-qubit memory
Which twenty-qubit code best keeps four qubits through random erasures?
Leaderboard: [[20,4]] code, erasure probability 1/10 Hot
QArena's record 0.0002884 loss probability by yicheng Ties it
| # | Participant | Score (loss probability) | vs University of Gdańsk (published) | Submission |
|---|---|---|---|---|
| 1 | lit-grassl-20-4-6 (published method, run by QArena)(literature) Baseline | 0.0002884 | #4 | |
| 2 | yicheng | 0.0002884 | #5 |
Baseline: University of Gdańsk: 0.0002884 loss probability · paper
Instance: Code size and erasure probability
Overview
Task
Find a stabilizer code on n = 20 qubits with k = 4 logical qubits that keeps its logical qubits through as many erasure patterns as possible. Each physical qubit is erased independently with probability p = 1/10, and the decoder knows which qubits were erased. The memory survives when the state of all four logical qubits can be recovered exactly from the qubits outside the erased set E. That holds exactly when E is correctable: every Pauli operator supported inside E that commutes with all the stabilizers is itself a stabilizer (phases ignored). This is the Knill–Laflamme condition for erasures. The score is the survival probability
P = ΣE correctable p|E| (1 − p)20 − |E|,
summed over all 220 = 1,048,576 erasure sets. Nothing is sampled: P is an exact fraction whose denominator divides 1020.
- Ranked instance
em-20-4-p10: a [[20,4]] code (16 generators) at p = 1/10. - Debug instance
em-5-1-p10(unranked): a [[5,1]] code (4 generators) at p = 1/10. The five-qubit code reaches the proved optimum 12393/12500 = 0.99144 there.
Submission file
{"stabilizers": ["XIIIIIIIXYIXIZYZIYXZ", "ZIIIIIIIZXIZIYXYIXZY", "IXIIIIIIYYZYXXIZZZII", ... 16 strings in all]}
Exactly one key, stabilizers: a list of exactly n − k = 16 strings, each of exactly 20 characters from
I, X, Y, Z (uppercase ASCII, no sign). Character q of a string, counting from 1,
acts on qubit q. The file is parsed as strict JSON (duplicate keys, NaN, Infinity and other non-standard values are refused) and
may be at most 8 KiB; a valid file is about 400 bytes.
Validation
The first failing rule rejects the file. The message names the rule and the first offending position, counting from 0.
- Rule 1 (shape). The file has the shape above.
- Rule 2 (commuting). Every pair of generators commutes. The first anticommuting pair (i, j), i < j, in lexicographic order is named.
- Rule 3 (independent). The 16 generators are independent over GF(2), so the code has exactly four logical qubits. The first generator that is a product of the ones before it, or the identity, is named.
Every valid code is accepted, however poor; the score measures it. A verification that runs out of its 60 s CPU budget, or finds an internal inconsistency, returns status error and no score. It never returns an acceptance.
Scoring
Let r(F) be the GF(2) rank of the 16 × 2|F| submatrix of the generator matrix on the x and z columns of the qubits in F. The Pauli operators supported on E that commute with every stabilizer form a space of dimension 2|E| − r(E). The stabilizers supported on E form a space of dimension 16 − r(Ē), where Ē is the complement of E. The second space lies inside the first, so E is correctable exactly when 2|E| − r(E) = 16 − r(Ē).
The verifier computes r for all 220 sets by a subset recursion: the echelon basis of a set is the basis of the set without its last qubit, with that qubit's two columns inserted. It counts the correctable sets Nj of every size j and sums P = Σj Nj 920−j / 1020 with integers.
- Score:
p_survive= P as an exact fraction (hexadecimal numerator and denominator), maximized. - Shown, not ranked: the loss 1 − P (
p_loss), which orders entries the same way, and the distance d, the smallest j with Nj < C(20, j). The detail lists N0, …, N20 and P to ten digits. - Ties: equal values go to the earlier submission. Relabelled copies of a code always have equal values: a permutation of the qubits, single-qubit Clifford operations, or another generating set of the same stabilizer group.
Baseline and reference scores
Best known: 0.9997115744 (Grassl's table). Proved ceiling: 0.9999951157 (loose). No search has beaten the codetables code. The QArena baseline is that code, credited to Grassl's table, so a relabelled copy of it cannot take the top. It is GF(4)-linear (its stabilizer group is closed under the map X → Z → Y → X applied to every qubit), and every stabilizer in it has even weight, at least 8.
| Code | P | 1 − P | d | Source |
|---|---|---|---|---|
| Four five-qubit codes side by side | 0.9661971381 | 3.38 × 10−2 | 3 | the proposal's baseline: (12393/12500)4 = 23588797316429601/24414062500000000; code of Laflamme, Miquel, Paz and Zurek, quant-ph/9602019 |
| A random [[20,4]] code | 0.9967699267 | 3.23 × 10−3 | 3 | QArena (pre-launch run) |
| Annealing from a random code, 15 minutes | 0.9991433626 | 8.57 × 10−4 | 5 | QArena (pre-launch run) |
| Annealing from a random code, 30 minutes | 0.9991999530 | 8.00 × 10−4 | 5 | QArena (pre-launch run) |
| Best of 1,318 cyclic codes | 0.9993360580 | 6.64 × 10−4 | 5 | QArena (pre-launch run) |
| Annealing from a random code, 85 minutes | 0.9992146308 | 7.85 × 10−4 | 5 | QArena (this board's build) |
| Closest code found: a GF(4)-linear relative of the codetables code (below) | 0.9997087956 | 2.91 × 10−4 | 5 | QArena (this board's build) |
| Grassl's [[20,4,6]] code (the baseline) | 0.9997115744 | 2.88 × 10−4 | 6 | codetables.de, n = 20, k = 4 (stored generator matrix, entry last modified 2005-06-24): P = 49985578719124576371/50000000000000000000 |
| Proved ceiling for every [[20,4]] code | 0.9999951157 | 4.88 × 10−6 | QArena, below: P ≤ 124999389462581901/125000000000000000, that is 1 − P ≥ 610537418099/125000000000000000 |
The codetables code is unbeaten. Annealing from random codes (random two- and three-qubit Clifford moves, the exact P as the objective) ends at distance 5 and 0.99914 to 0.99921, and the best of 1,318 cyclic codes reaches 0.99934. The codetables code is a strict local optimum for small changes: each of the 1,710 codes one two-qubit Clifford gate away from it (every such gate, up to single-qubit Cliffords and a swap) loses at least 1.8 times as much, each of the 30,780 codes one three-qubit transvection away at least twice as much, and each of 500 random codes that keep 15 of its 16 stabilizer dimensions at least 2.3 times as much. Its GF(4)-linear relatives come closer: 10,800 random GF(4)-linear [[20,4]] codes that share a self-dual GF(4)-linear extension with it lose at least 12 % more, and 178 annealing walks of 35 to 55 minutes among such relatives met a distance-5 code that loses only 0.96 % more: it keeps more erasure sets of 7, 8 and 9 qubits than the codetables code but fewer of 5 and 6. Those walks and 80 more (through one-generator changes and Clifford moves) found nothing better than the codetables code. A record needs a code that keeps those gains on larger sets without the losses on small ones, and the board may stay at the baseline for a long time.
The ceiling is loose. Its proof uses only two facts. (a) For k ≥ 1, E and Ē are never both correctable: if E is correctable, every logical operator can be moved off E, so Ē supports a logical operator. (b) Every [[20,4]] code has a logical operator of weight u ≤ 6 (the codetables upper bound d ≤ 6, from Rains' linear programming), and every superset of its support U is uncorrectable. So a complementary pair (E, Ē) with |E| < 10 loses at least the probability of E when E contains U and at least that of Ē otherwise, and a pair of ten-qubit sets loses at least p10(1 − p)10. Summed, and minimized over u ≤ 6 (the minimum is at u = 6), the loss is at least 610537418099/125000000000000000 ≈ 4.884 × 10−6. The gap between this ceiling and the codetables code measures slack in the proof, not room for records: the code's loss on ten-qubit erasures alone, 184,756 p10(1 − p)10 ≈ 6.4 × 10−6, is already larger than the bound. No linear-programming or SAT bound for this objective is known.
Distance alone does not decide the score. The codetables code's loss comes 15.9 % from erasures of 6 qubits, 31.7 % from 7, 31.7 % from 8, 18.3 % from 9 and 2.2 % from 10. At p = 1/10 all of sizes 6 to 9 matter, so codes of equal distance can rank far apart.
Verification
The verifier is exact on every file: rules 1 to 3 with integer bit operations, then the rank of all 1,048,576 erasure sets
with numpy integer arrays and P with Python integers. Its cost hardly depends on the code: on one core of an AMD Ryzen 9 9950X (Python 3.12, numpy 1.26) the worst file the board reads, a dense random code written with JSON escapes and padded to the 8 KiB cap, takes 0.27 s of CPU time and 83 MiB for the whole process, against the board's limits of 60 s and 512 MiB (tests/cost_erasure.py).
A second program, tests/erasure_indep.py, was written separately from the specification, without reading the
verifier. It has its own strict JSON parser, takes a basis of the normalizer from a GF(2) kernel, enumerates all 224
elements of the normalizer in two halves, marks the support of every element outside the stabilizer group, closes the marks
upward over supersets and counts the uncorrectable sets. On 30,524 random and adversarial files (random codes at every n and k the instance rules allow with n + k ≤ 26, many of them degenerate or of distance 1; random [[20,4]] codes; letter, generator and structural mutants of valid codes; raw-byte cases such as escapes, a byte-order mark, duplicate keys, deep nesting and the size cap) the two programs agree on every verdict, every rejected rule and position, every count Nj and every score: 0 disagreements, 11,660 of the files accepted (tests/cross_erasure.py, seeds 1 and 2). Both reproduce the spec's eight known answers exactly, and the verifier also agrees with a brute force over every Pauli operator on 120 random codes of up to five qubits.
Application
Some hardware converts most of its errors into erasures at known positions: ytterbium atoms in Rydberg arrays (Wu, Kolkowitz, Puri and Thompson, arXiv:2201.03540, Nat. Commun. 13 (2022)) and dual-rail superconducting qubits (Kubica, Haim, Vaknin, Brandão and Retzker, arXiv:2208.05461; the published version, Phys. Rev. X 13, 041022 (2023), adds Harry Levine to the authors). Kuo and Ouyang (arXiv:2411.13509) give linear-time degenerate erasure decoders and capacity-achieving bicycle codes. PRISM (Barter et al., arXiv:2611.13630, 10 November 2026) is a transformer decoder that uses the known erasure positions of photonic fusion networks; this board scores a code under optimal erasure decoding (a linear solve) and has no decoder or latency column. Small modular memories, where whole qubits are lost, face the same question. A record is a 16-line stabilizer list with an exact survival probability.
Scope. Independent erasures at known positions, perfect operations and optimal erasure decoding (a linear solve). Records compare codes in this model only.
Where verification runs
Verifications of this board run on the first lane of this list that is up and has room: the Mac mini, then 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 60 s of CPU, 210 s of wall time and 512 MB of memory on the Mac mini, and 120 s of CPU, 300 s of wall time and 512 MB of memory on CU Boulder's Alpine, NCAR Derecho and RunPod (2 times the board's own CPU and wall time on the other lanes, because their processors are slower); the result goes to QArena only.
Current records
| Instance | Baseline | Record (loss probability) | Reference score | Record holder | Status |
|---|---|---|---|---|---|
| [[20,4]] code, erasure probability 1/10 Hot
n = 20 qubits, k = 4 logical qubits (16 generators), each qubit erased with p = 1/10; all 2²⁰ erasure sets counted |
0.0002884 University of Gdańsk, published | 0.0002884 | 4.884 × 10⁻⁶ Proved floor on the loss (QArena; loose): P ≤ 0.9999951157 for every [[20,4]] code, an erasure set and its complement are never both correctable, and every [[20,4]] code has a logical operator of weight at most 6 (codetables.de). Best known: Grassl's [[20,4,6]] code, loss 2.884 × 10⁻⁴, the QArena baseline; no search has beaten it |
lit-grassl-20-4-6 (published method, run by QArena)(literature) | Baseline not beaten |
| [[5,1]] code, erasure probability 1/10 (debug)
debug instance: n = 5, k = 1 (4 generators), p = 1/10 |
0.00856 QArena's run | 0.00856 | 0.00856 Proved optimum, met by the five-qubit code (also the QArena baseline): an erasure set and its complement are never both correctable, and the code keeps every set of at most two qubits, Laflamme, Miquel, Paz and Zurek, Perfect quantum error correcting code (1996) |
qarena-baseline (QArena's run)(QArena) | Matches proved optimum |
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
The first strict improvement on a ranked instance will appear here as a card, and a chart will follow the headline record over time.
Headline record now:
- Erasure memory, [[20,4]] code, erasure probability 1/10: 0.0002884 loss probability (exact) by lit-grassl-20-4-6