PolyLabs Research Contact
Next direction · one registered test so far

Quantum codes

Every linear result on this site is about one object: polynomials in x and y over GF(2), on a torus. A pair of them is a bivariate bicycle code, the family of IBM's [[144,12,12]] gross code. A registered test found that the instruments built for periods count these codes' logical qubits: they agreed with plain linear algebra on 3,000 of 3,000 random codes and reproduced all 12 published values. A second registered test then computed their distances, which decide whether a code is any use, and reproduced all 12 of those too.

One object, two uses

A linear rule on the l × m torus is a polynomial in x and y, taken mod xl − 1 and ym − 1. Each monomial xpyq is a translation, and the rule adds, mod 2, the cells its translations reach. These polynomials form a ring, the group ring of the torus.

On an odd torus a rule acts diagonally. Its eigenvalues are its values at the torus's characters, in a finite field F(2d). The orders of the nonzero eigenvalues set the rule's period, as the linear atlas shows. A quantum code's logical qubits are set by the zero eigenvalues: the characters a rule wipes out.

What a quantum code is

Qubits are noisy. A quantum error-correcting code spreads k logical qubits over n physical ones, and measures parity checks. Each check reports the parity of a few qubits, which reveals errors without reading the information stored. There are two kinds of check, for the two kinds of error a qubit suffers: bit flips and phase flips.

A code is written [[n, k, d]]. Its distance d is the weight of its smallest logical error: the fewest qubits an error must touch to change the stored information while every check stays silent. An error on fewer than d qubits is either caught by a check or does no harm.

Two rules make the gross code

A bivariate bicycle code (Bravyi et al., 2024) takes two polynomials A and B on the l × m torus, and two copies of the torus, left and right, with a qubit on every cell: n = 2lm. Its checks are HX = [A | B] and HZ = [BT | AT]. The X check at cell (i, j) reads, on the left copy, the cells (i − p, j − q) for each monomial xpyq of A, and on the right the same for B. The Z check reads (i + p, j + q): B's monomials on the left, and A's on the right.

IBM's gross code is A = x3 + y + y2 and B = y3 + x + x2 on the 12 × 6 torus, so n = 144.

The checks of the gross code

click a cell to move the check
Check
check
matrix row
left qubits
right qubits
read on the left copy read on the right copy the check's cell reached across an edge

Each check reads six qubits, three on each copy, and each qubit is read by three X checks and three Z checks. The checks are sparse, and local on the torus. The arrow keys move the check too.

Logical qubits from the characters

The number of logical qubits is k = n − rank HX − rank HZ = 2 dim(ker A ∩ ker B): twice the number of independent patterns that A and B both wipe out.

That count can be read off the characters. The ring is a Frobenius algebra, so dim(ker A ∩ ker B) = dim R/(A, B), and R splits over the characters of the torus's odd part. At odd sizes, k is twice the number of characters where A and B both vanish: zero eigenvalues, which this project's instruments already compute.

At even sizes, write l = 2al′ and m = 2bm′ with l′ and m′ odd. Each common zero on the l′ × m′ odd part then counts with its multiplicity in the 2-part: the same split of a torus into odd part and 2-part as the library's even-size reduction.

A code's logical qubits, two ways

computed here
code
monomials
qubits n
k by ranks
k by characters
both ways
published
odd part
pointerpoint at a square
A and B both vanish; the number is its multiplicity only A vanishes only B vanishes neither

Each square is one character χ = (u, v) of the odd part: row u for x, column v for y. Write A and B as sums of monomials, such as x^3 + y + y^2, or 1 + π + π^2 with π = xy; 0 is the zero polynomial. Exponents are taken mod l and m, and a repeated monomial cancels, as it does mod 2. Your browser computes the ranks over GF(2), and the characters in the same field F(2d) as the project's code, so the squares carry the labels of its records. The random test draws codes of the registered test's two kinds. Distance is not computed in the browser.

The registered test

Before anything was built on the character count, it was tested, with its predictions written to a hash-chained ledger before the run. It compared k from the characters with k from ranks over GF(2), and with the published k. Development used only tori with l, m ≤ 4, and none of those was tested. Both predictions held.

PredictionTested onOutcome
k from the characters equals k from ranks over GF(2)3,000 random codes at 20 sizes, 150 at each and 1,500 at even sizes: 100 per size in the published trinomial form, A = xa + yb + yc and B = yd + xe + xf, and 50 with two to six random terms; and the 12 published entriesheld 3,000 of 3,000 random codes and 12 of 12 entries agree
k from the characters equals the published k12 published entries: five of the original bivariate bicycle codes and the coprime codes, two of them in two published versions12 of 12 every published k reproduced, the gross code's among them, and both versions of the two coprime codes whose published polynomials disagree
The distance d equals the published d, by two exact instruments: an exhaustive search written here and an integer program solved by SCIPthe same 12 entries, with up to 90 minutes per instrument12 of 12 the search gave every published d exactly: the gross code's 12 in 0.2 s, and [[288,12,18]]'s 18 in 3 minutes. The program agreed on 11 and bracketed the twelfth between 13 and 18
The program's distances agree with exhaustive enumeration, on random codes, and on both kinds of logical200 random codes at 8 small sizes, n up to 50failed once at 1 of 200, SCIP reported a wrong optimum (3 for a distance of 2). The cause, found afterwards, is SCIP's presolving of the parity constraints it builds itself
Both instruments as fixed (that presolving and SCIP's rapid learning off; the search raising its bound step by step) hold on codes nobody had looked atfresh codes against enumeration, against each other and on the toric code; the 38 known fault codes; 142 fresh codes where the fault lives, with SCIP's unfixed defaults alongside as a controlheld no failure in any part; the unfixed defaults went wrong on 3 of the fresh codes, so the test could see the fault
Two larger published codes whose distance was given only as an upper bound: d = 24 for [[360,12,≤24]], and a least weight of 34 for [[756,16,≤34]]a random-information-set search for checked upper bounds, and the exhaustive search split across 4 cores for lower bounds, with 10 and 8 hoursheld [[360,12]] has d = 24 exactly: a checked weight-24 logical, and nothing lighter, in 1.9 hours. For [[756,16]], 24 ≤ d ≤ 34: a checked weight-34 logical, and nothing below 24
A stronger cut keeps the exhaustive search exact and takes [[756,16]] to d ≥ 30 within 30 hours90 fresh small codes against enumeration, 20 fresh codes against the uncut search, three known distances, then [[756,16]] on 4 coresheld every check agreed, and [[756,16]] has 30 ≤ d ≤ 34: nothing below 30, in 7 hours. That matches the public lower bound of 30 (the DistQLDPC tool), with a second implementation of the same kind of search. The run then stopped during a pass that could not change this, and its ledger has no verdict entry
Every weight-6 code on 122 sizes held back from the census (up to 300 qubits): k exactly where a proved rule says, the best distance never rising with k, staying under 1.40 √n, and no code above the published record k d²/n = 13.5253,370 classes on 122 tori, registered before any was computed; 4 cores, then an 8-core pod after the cloud session kept restartingfailed the rule held on all 122 tori, but [[294,10,20]] scores 13.6, the best distance reaches 1.42 √n, and at one group it rises with k. Liang et al.'s [[192,8,16]] is the best of its kind, as predicted
The 154 classes that run left unfinished, on 9 of those sizes, all have d = 24, as the parity of d predicted154 classes on 9 tori, registered before the rerun; a second distance tool, DistQLDPC's cluster engine, and a checked weight-24 logical for each154 of 154 d = 24 exactly, in at most 11 minutes each. Those tori break the 1.40 √n envelope too: it now fails on 15 of the judged sizes, not 7
Every weight-6 code on 110 new sizes, from 302 to 400 qubits, against laws refitted on stage 3: the best distance under a fitted envelope; somewhere past stage 3's record d/√n; somewhere a new record k d²/n, but none above 17633,390 classes on 110 tori, registered before any was computed; 13,380 exact runs by DistQLDPC's cluster engine, each distance with a checked logical; one 32-core pod for 5.4 daysfailed the growth and the record held: [[354,4,28]] reaches 1.49 √n and [[384,12,24]] scores 18.0. That score breaks the ceiling of 17, and [[306,4,26]] is one step above the envelope at 306 qubits. On the published [[360,12,24]]'s torus, nothing of this form beats it
The 53 classes that run left at its 4-hour limit, all at 396 qubits, are settled with no practical limitregistered before any class reached the limit; the same tool with up to 14 days per class, and a checked logical for eachrunning 17 of 53 so far, every one d = 30: [[396,4,30]], at 1.51 √n the highest in the census

What the characters show

The [[72,12,6]], [[144,12,12]] and [[288,12,18]] codes share k = 12 because the same four characters of their 3 × 3 odd part carry it, two of them with multiplicity 2 in the 2-part. The coprime codes each take k from one Frobenius orbit of common zeros, so k is twice the orbit's size: the orbit {1, 2, 4} mod 7 for [[42,6,6]], and an orbit of six characters of the 7 × 9 torus for [[126,12,10]]. Pick them in the figure above to see it.

Symmetries: equivalent codes, and cheap gates

A map of the torus sends a code to an equivalent code: the same code with its qubits relabelled. The image test that shrank this project's censuses, by maps in GL2(Z/m), is a code-equivalence test, and it can shrink a search for codes the same way.

A symmetry of the torus that maps a code to itself is an automorphism of the code. Automorphisms are being studied as fault-tolerant logical gates, done by permuting qubits. The fourth pilot's half-Frobenius mechanism is exactly invariance under a dilation (x, y) → (xc, yc), by c = 6 at m = 37. Neither use has been tried on codes yet.

What carries over

In this projectIn quantum codesStatus
A linear rule: a polynomial on the torusThe polynomial A or B of a bivariate bicycle codethe same object
The l × m torusn = 2lm qubits, one on each cell of two copiesthe same object
Zero eigenvalues: the characters a rule wipes outLogical qubits: at odd sizes, k is twice the number of characters where A and B both vanishtested 3,000 of 3,000 random codes, 12 of 12 published
The 2-part at even sizesThe multiplicity of each common zerotested 1,500 random codes at even sizes
Maps of the torus in GL2(Z/m), and the image testEquivalent codes, which a search can skipcarries over, untried
Invariance under a dilation: the fourth pilot's half-Frobenius mechanismCode automorphisms, candidate logical gates done by permuting qubitscarries over, untried
The Lean bridge from a polynomial to its eigenvaluesA certified k, and certified symmetriesplanned
Registered tests, and a judge on held-out casesChecks of any code an agent proposes: k exactly, distance independentlyplanned
Periods, and the cubes and ninth powers at m = 37No direct role: the theorems themselves have no applicationdoes not carry over

The path

  1. Rediscovery. Done: the registered tests above reproduced every published k and every published distance.
  2. A census of code families. Sweep polynomial pairs at many sizes for high k, using the classes and symmetries to prune. Then measure distance, the hard and expensive part: the exhaustive search for exact values, the integer program as a cross-check and for bounds, randomised information-set methods for larger codes, and circuit-noise simulation (stim, BP-OSD decoders) for the logical error rates practitioners care about. This is where the compute goes. Stage 1, an exploratory survey, found every code of the published form on 116 tori up to 200 qubits: 3,330 distinct classes, each with an exact distance. The gross code has the best ratio k d²/n of all of them, and an exact rule, proved by hand, says which tori have codes at all. Stage 2 tested predictions on 122 sizes held back from stage 1. It confirmed the rule and a linear distance law up to 300 qubits. Stage 3 widened the family to every weight-6 code: about 290,000 classes. Its registered predictions on the held-back sizes failed where it mattered most. At 294 qubits the census finds a [[294,10,20]] code, with k d²/n = 13.6, above the published [[288,12,18]]'s 13.5. An independent check of 20 frontier codes with other tools agreed everywhere, and confirmed that d = 20 by a second method. A registered rerun with a second distance tool then settled the 154 classes the run had left unfinished: every one has d = 24, as the parity of d predicted. Stage 4 covered 110 more tori, from 302 to 400 qubits, against laws refitted on stage 3 and registered before it started. Distances kept growing faster than √n, and [[384,12,24]] set a new record, k d²/n = 18.0. That broke the registered ceiling of 17, and one code at 306 qubits sat a step above the fitted envelope, so its verdict is fail. A follow-up is settling the 53 hardest classes, at 396 qubits; every one so far has d = 30. The census page charts every stage.
  3. Pilots on codes. Point the agent loop at structural questions with a payoff for codes. For example: which conditions on (A, B) force many logical qubits and a torus automorphism at once? The judge checks k exactly and distance independently, on held-out sizes registered in advance, as in the seven pilots so far.
  4. Certificates. Extend the Lean bridge to k and to automorphisms. Distance will mostly stay outside Lean, but a certified k and certified symmetries with independently checked distances are a stronger claim than most code-search papers make.

The plan names two weaker leads for the same algebra. Linear cellular automata are standard test-pattern generators in chip testing, where a short cycle is a defect, and the mechanisms here predict exactly when the cycle collapses. In fracton and fractal spin models (Newman–Moore is built on the triangle rule), ground-state counts and recurrence times are given by the same algebra. The codes are the strongest of the three: a live field, an industrial roadmap built on exactly this ring, and a quantity, k, that the instruments here already compute.

what this does not show

Caveats

Distance. Distance decides whether a code is useful. The project now computes it exactly for codes like the published ones, with two instruments that were fixed after a registered test caught a solver fault, and then passed a second registered test. Distance says nothing about how a code does under realistic noise, which needs simulation.

Competition. Bivariate bicycle code search is active, with groups searching by brute force, by covering-graph constructions, and already with LLM-guided search. What this project would bring is its method (machine-checked structure, and held-out tests registered in advance) and any new families it finds, not a head start.

Sources. The published codes were transcribed from search summaries of the papers, because arXiv was not reachable from the environment the work runs in, and are still to be checked against the papers. A disagreement with a published k would first be a question about the transcription.

Sources: the original bivariate bicycle codes, the gross code among them, are from Bravyi et al., Nature 627, 778 (2024), arXiv:2308.07915. The coprime codes are from Wang and Mueller, arXiv:2408.10001, its QCE 2024 poster and its version in Quantum. DistQLDPC is Chen, Jafari and Lai's tool, arXiv:2606.12445 (github.com/guluchen/DistQLDPC); every run of it here used commit 8fe913e. The plan this page summarises is the project's next-direction note, and the census's records are in lattice-lab's studies.