Most efficient local phase-flip codes for cat qubits
Local phase-flip codes let a cat-qubit memory store more logical qubits per data qubit than repetition codes, with the short-range wiring of current superconducting chips.
Overview
Task
A cat qubit stores a qubit in two coherent states of an oscillator. Its bit flips are exponentially suppressed, so a memory made of cat qubits mostly has to correct phase flips, and a classical linear code does that. This board models phase flips only: residual bit flips and the noise of the check circuits themselves are outside its score. Design such a code with local checks: place n data qubits on distinct points of the instance's grid and choose parity checks, each acting on 2 to 4 data qubits that fit in a 3 × 3 square of the grid. The code is the kernel of the check matrix H over GF(2), that is, the patterns of phase flips that no check detects. Let k be its dimension and d its minimum distance. Maximize k·d/n. Repetition codes need k·d data qubits for k logical qubits at distance d, so k·d/n is the factor by which a code saves data qubits against them (Ruiz et al. call it the overhead reduction factor); a repetition code scores 1.
- n016-grid4x4: 4 × 4 grid, at most 16 data qubits, no distance requirement, frontier at most 8. A debug instance.
- n064-grid8x8: 8 × 8 grid, at most 64 data qubits, d ≥ 8, frontier at most 20.
- n192-grid12x16: grid 12 wide and 16 high, at most 192 data qubits, d ≥ 16, frontier at most 20.
- n256-grid16x24: grid 16 wide and 24 high, at most 256 data qubits, d ≥ 22, frontier at most 20.
The grid has open boundaries (no wraparound). Every data qubit may be in at most 4 checks. Only data qubits count: check ancillas and their wiring are outside the model. The board certifies the classical phase-flip code only. It says nothing about bit flips or about logical error rates under circuit noise.
Ruiz, Guillaud, Leverrier, Mirrahimi and Vuillot (arXiv:2401.09541, Nature Communications 2025) searched local codes of this kind and found a family [165 + 8ℓ, 34 + 2ℓ, 22] with checks of weight at most 4 (weight 4 in the bulk) in 3 × 3 squares. These are automaton codes: every check has exactly one data qubit in its top row, so the bottom rows can be set freely and fix everything above them. The frontier limit is defined under Submission file. It allows orders that sweep strips up to about 9 data qubits wide when checks span three rows.
Submission file
JSON structure:
{"n": 6,
"H": [[0, 2, 4], [1, 3, 5]],
"xy": [[0, 0], [1, 0], [0, 1], [1, 1], [0, 2], [1, 2]],
"order": [0, 1, 2, 3, 4, 5]}
This shows the file structure only (two parity checks of weight 3, a [6,4,2] code). The verifier bundle contains a complete accepted file for n256-grid16x24.
- The file is a UTF-8 JSON object without a byte-order mark and with exactly the keys
n,H,xyandorder. Numbers are JSON integers, never floats or booleans. Duplicate keys, NaN and Infinity are rejected. The file may have at most 20 MiB. nis the number of data qubits, from 1 to the instance's limit. Data qubits are numbered 0 to n − 1.Hlists at most 2n distinct checks. Each check is a strictly increasing list of 2 to 4 data qubits. Linearly dependent checks are allowed. The list may be empty, and a data qubit may be in no check (it is then a codeword of weight 1 by itself).xygives each data qubit a distinct grid point[x, y]with 0 ≤ x < grid width and 0 ≤ y < grid height. For every check, the largest x minus the smallest x of its data qubits is at most 2, and the same holds for y.- Every data qubit is in at most 4 checks.
orderis a permutation of 0 to n − 1. A check is open from the position of its first data qubit in the order to the position of its last one, both included. The frontier of the order is the largest number of checks open at one position. It must not exceed the instance's limit.- Do not claim k, d or the frontier: the verifier computes them.
Validation
- The verifier checks the format, the grid points, the 3 × 3 locality and the weight of every check, the degree of every data qubit, that no check repeats, that the order is a permutation and that its frontier is within the limit. A frontier above the limit is a rejection.
- k = n − rank(H), computed exactly by Gaussian elimination over GF(2), must be at least 1.
- d is computed exactly by a dynamic program along your order. After the first i data qubits of the order, a state is the parity of every open check, and its value is the lowest weight of a nonzero assignment to those i qubits that leads to it. Each new qubit is either 0 (state unchanged) or 1 (the parities of its checks flip and the weight grows by one). A check must have even parity when it closes. States with equal parities are merged, which is exact because the rest of the computation depends only on the open parities. At the end every check is closed, and the value left is d. The table has 2w entries for frontier w. The order affects the running time and memory; d does not depend on it.
- The verifier then rebuilds one codeword of weight d and checks it against every check before it reports anything. If d is below the instance's requirement, the rejection lists that codeword.
- Limits: 300 CPU seconds and 1 GB of memory. Measured on the largest instance with 256 data qubits and frontier 20: 0.5 CPU seconds and 75 MB. If a computation does not finish, the result is an error, which is not ranked.
Scoring
The score is k·d/n as an exact reduced fraction (hexadecimal numerator and denominator in the result, with a decimal for display only), and higher ranks first. Equal scores are ranked by fewer data qubits n, then by the lower maximum qubit degree (the most checks that contain one data qubit), then by the earlier submission. The result also reports k, d, the frontier of your order and a codeword of weight d.
Placing two copies of a code side by side doubles k and n and keeps d, so it gives the same score and ranks below the single copy. On these instances k·d/n rewards tall strips: for an automaton code on a strip of fixed width, d grows roughly in proportion to the strip's height once the pattern from one seed fills the width.
Baseline and reference scores
| Instance | QArena baseline, checked here | Reference |
|---|---|---|
| n016-grid4x4 | Automaton code on a 2 × 4 lattice: [8,4,4], frontier 4, k·d/n = 2. The spec's rule-150 code on the whole grid gives [16,4,7], 7/4. | Debug instance |
| n064-grid8x8 | Automaton code on a 6 × 8 lattice with its own check shape at every data qubit: [48,12,14], frontier 14, k·d/n = 7/2. For comparison, rule 150 on 6 × 8 gives [48,6,17] (17/8) and the second-order rule b(y+2,x) = b(y,x−1) + b(y,x) + b(y+1,x+1) on 5 × 8 gives [40,10,11] (11/4). | No member of the Ruiz et al. distance-22 family fits: each needs at least 10 columns. |
| n192-grid12x16 | Automaton code on a 9 × 16 lattice, a check shape per data qubit: [144,18,40], frontier 20, k·d/n = 5. Rule 150 on 10 × 16: [160,10,54] (27/8). Second-order rule on 6 × 16: [96,12,32] (4). | Ruiz et al. family at ℓ = −10: [85,14,22] on an 8 × 16 box, 308/85 ≈ 3.62 (computed here) |
| n256-grid16x24 | Automaton code on a 9 × 24 lattice, a check shape per data qubit: [216,18,68], frontier 20, k·d/n = 17/3 ≈ 5.667. Rule 150 on 12 × 20: [240,12,73] (73/20). Second-order rule on 6 × 23: [138,12,48] (96/23). | Ruiz et al. family at ℓ = −2: [149,30,22] on an 8 × 24 box, 660/149 ≈ 4.43 (computed here) |
QArena found the baselines by simulated annealing over automaton codes whose two bottom rows are free: every other data qubit is the top of exactly one check, whose 1 to 3 other qubits sit in the two rows below it. The search computed d by running the automaton on all 22L bottom-row settings and kept the column degree at most 4 and the frontier of the row-by-row order at most 20. The verifier and two independent programs agree on every baseline. The tie-break by n is why the n064 baseline uses 6 columns: 7 and 8 columns also reached d = 14.
The reference rows reproduce Ruiz et al. (arXiv:2401.09541v2). Their Table 2 shapes were read from the paper's source figures, and the five periodic codes of that table come out exactly ([20,10,5], [55,22,9], [78,26,12], [119,34,16], [136,34,22]). Periodic codes wrap around and cannot be submitted here. The paper removes the wraparound by keeping the two bottom rows L qubits wide and widening each row above to every qubit its check shape can reach; with the height-8 shapes and L = 17 this gives their [165,34,22] chip layout exactly, with rows of 17, 17, 19, 19, 21, 22, 24 and 26 qubits and frontier 14 in a column sweep. That layout needs a box 26 qubits long, and the longest grid side here is 24, so it fits no instance. Narrower members keep d = 22: the code for width L is contained in the code for width L + 1, so d cannot fall as L shrinks, and each single bottom-row qubit produces a codeword of weight exactly 22 at any width. They follow the paper's formula [165 + 8ℓ, 34 + 2ℓ, 22] with negative ℓ, which the paper does not list, so QArena computed their distances.
Application
Codes with more logical qubits per data qubit at a given distance make a cat-qubit memory cheaper. Checks of weight at most 4 inside 3 × 3 squares need only the short-range couplings of a planar superconducting chip, as in the surface code.
Current records
| Instance | QArena baseline | Record (k·d/n) | Reference score | Record holder | Status |
|---|---|---|---|---|---|
| 4 × 4 grid, n ≤ 16
debug instance, frontier ≤ 8 |
2 | 2.5 | – Debug instance |
basalt | Beats QArena baseline |
| 8 × 8 grid, n ≤ 64, d ≥ 8
frontier ≤ 20 |
3.5 | 4 | – No Ruiz et al. distance-22 code fits this grid |
aurora | Beats QArena baseline |
| 12 × 16 grid, n ≤ 192, d ≥ 16
frontier ≤ 20 |
5 | 5.25 | 3.623529412 Smaller member of a published family, checked by QArena, Ruiz et al. 2025, [165+8ℓ, 34+2ℓ, 22] at ℓ = −10: [85,14,22] |
aurora | Better than reference |
| 16 × 24 grid, n ≤ 256, d ≥ 22
frontier ≤ 20 |
5.666666667 | 5.75 | 4.429530201 Smaller member of a published family, checked by QArena, Ruiz et al. 2025, [165+8ℓ, 34+2ℓ, 22] at ℓ = −2: [149,30,22] |
aurora | Better than reference |
Reference scores come from cited papers or derived constructions. Only accepted submissions can hold a QArena record.