How it works
A bivariate bicycle code is fixed by whole numbers l and m and two polynomials A and B with coefficients in F2, the field with two elements. Let Sl be the l × l cyclic shift matrix, whose row i has a single one, in column i + 1 mod l. Then x = Sl ⊗ Im and y = Il ⊗ Sm are lm × lm matrices with xy = yx and xl = ym = 1, so each monomial xayb is a permutation matrix and A and B are sums of them. The check matrices are HX = [A | B] and HZ = [BT | AT] on n = 2lm qubits: the first lm columns are the left (L) qubits, the rest the right (R) qubits. Since A and B commute, HXHZT = AB + BA = 0, so every X check commutes with every Z check; the tool also checks this directly.
The number of logical qubits is k = n − rank HX − rank HZ, with ranks over F2; the paper shows that it equals 2 dim(ker A ∩ ker B), and the tool computes both. A check has one qubit for each monomial of A and of B, so with three terms in each, as in every code of the paper’s table, every check has weight 6. The Tanner graph joins each check to the qubits it acts on, and the tool counts its connected pieces. The paper’s net encoding rate, r = k/2n, counts n check qubits as well as the n data qubits.
The distance d is the least weight of a logical operator that is not a product of checks; the paper shows that X-type and Z-type logical operators have the same least weight. Computing d exactly is hard in general. The search here repeatedly puts a basis of ker HX or ker HZ in reduced row echelon form, taking the columns in a random order, and tests each row and each sum of two rows. A candidate counts if it has odd overlap with a logical operator of the other type. The lowest weight found is an upper bound on d. For the codes from the table, d is quoted from Table 3 of the paper, where an entry written ≤ is itself an upper bound.
Source: S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall and T. J. Yoder, “High-threshold and low-overhead fault-tolerant quantum memory,” Nature 627, 778 (2024), arXiv:2308.07915.
Limits
The tool does not compute the exact distance. The search gives an upper bound, it can miss the true value, and a value it finds proves nothing about lower weights. Nothing here models noise, circuits, decoders or the schedule of syndrome measurements: every number is a property of the check matrices alone. l and m are limited to 60 each and lm to 1,200, so n is at most 2,400; the parameters then still come back in a fraction of a second. The layout turns into plain dots when the cells get small, and the search slows as n grows.
Related
- Fair decoder baselines and finite-size scaling for bivariate bicycle codes, a paper companion page
- Quantum Error Correction in Practice, a course of interactive lessons
Cite this tool T. Pandey, Bivariate bicycle code explorer (2026), https://pandey-tushar.com/tools/bb-codes.html