WorksPhysics and Astronomy
High-Rate Quantum Codes with Proven Distance and Low-Weight Measurements
Abstract
We study a family of quantum subsystem codes defined on rectangular coordinate grids of any dimension, with even side lengths of at least four. The directly measured operators act along coordinate lines. For every member of the family, we derive the number of protected logical qubits and prove its dressed distance without a numerical search. To illustrate the resulting design choices, we impose a budget of at most 10,000 data qubits and determine the complete tradeoff between encoding rate and measurement weight within this family at distances 16, 32, and 64. At distance 16, one code protects 4,096 logical qubits among 10,000 data qubits using weight-ten measurements. At distances 32 and 64, codes with 7,776 and 9,216 data qubits protect 1,024 and 256 logical qubits, respectively, using weight-six measurements. We include and explain Lean code snippets throughout the paper to guide readers through the formal verification of our subsystem-code construction and its dressed and bare distances.
Introduction
How many logical qubits can a finite quantum memory protect if the operators measured to obtain error information must have low weight? Encoding rate, distance, and measurement weight constrain different parts of this question. Rate determines the protected capacity of a block. Distance sets the minimum support of an undetectable logical Pauli error. Measurement weight counts the data qubits touched by one measured operator. A useful finite construction should make the relation between these quantities explicit.
Subsystem codes allow syndrome information to be obtained by measuring gauge operators that need not commute with one another. Only the protected subsystem must be preserved; the gauge subsystem can change during error correction [1, 2]. This distinction can replace a heavy stabilizer measurement by several lighter gauge measurements. It also changes the distance problem: multiplying a logical operator by a gauge operator can reduce its support, so the minimum must be taken over dressed logical operators.
We study this problem for coordinate-line gauge measurements on rectangular grids. For every number of axes and every even tuple , we prove
Here is the number of data qubits, the number of protected logical qubits, the number of gauge qubits, and the dressed distance. The largest measured gauge has weight . The distance depends only on the number of axes, whereas the rate and measurement weight depend on their lengths. This separates the choice of distance from the remaining finite optimization problem.
The construction extends the coordinate-line description of subsystem many-hypercube codes. Goto introduced many-hypercube codes based on concatenated even-length error-detecting codes [3]. Nakai and Goto subsequently developed their subsystem versions, including the uniform side-four and side-six families [4]. Their follow-up studies neural decoding and gauge-measurement order under circuit-level noise for selected uniform side-four codes [5]. Mixed-side ordinary many-hypercube concatenations were also studied in Ref. [6]. We treat all even rectangular tuples in a common algebraic description, prove the dressed distance by a quotient-space argument, determine the minimum nonidentity stabilizer weight, and solve the resulting finite rate–weight optimization.
The matching distance bounds are constructive. For the upper bound, choose two coordinate values on every axis and apply to their Cartesian-product points. For the lower bound, take an arbitrary Pauli commuting with all stabilizers and quotient out the line gauges. For a nonzero logical class, a suitable binary labeling of the coordinates forces all labels to occur in its support. Thus no choice of gauge representative can reduce its weight below . The same corner operator commutes with every gauge, so the bare distance is also .
As an application, impose a budget of 10,000 data qubits. At distances 16, 32, and 64, the maximum-rate tuples are respectively , , and , where exponents denote repeated side lengths. Their parameters are
The complete frontier includes the lighter-measurement alternatives as well. The budget is an illustrative finite constraint, not a restriction on the construction. These optimality statements concern this family and the objectives of protected rate and maximum gauge weight.
We connect these arguments to the supplied Lean formalization. Lean is an interactive theorem prover: a theorem declaration states a mathematical proposition, and its proof supplies a term that the prover checks against that proposition [7]. The accompanying subsystem modules build on Lean-QECC and mathlib [8, 9]. They define the Pauli and binary descriptions of the code and prove the dressed and bare distance for the constructed subsystem record. We explain selected declarations beside the corresponding mathematics, including the meaning of their assumptions. The full-center equality, rank formulas, minimum stabilizer weight, and finite optimization are proved here in ordinary mathematical form; they are not claimed as formalized by the supplied subsystem modules.
Low gauge weight has a cost. We prove that every nonidentity stabilizer has weight at least . Each qubit participates in gauges in the full-line presentation, and the coordinate grid need not be geometrically local in a physical device. Consequently, the growing-distance sequence is not a conventional quantum low-density parity-check (QLDPC) stabilizer family. Asymptotically good QLDPC constructions achieve constant rate and linear distance with bounded check weights and degrees [10, 11]. Our result instead gives exact finite parameters and a family-specific optimization. The ideal measurement counts below do not establish fault-tolerant circuit distance or a logical error rate.
Subsystem codes and their Lean representation
Gauge equivalence and dressed distance
We use the binary symplectic description of Pauli operators [1, 12]. Ignoring scalar phases, a Pauli on qubits is specified by , representing . Its weight is .
Commutation is determined by
All vector-space orthogonal complements below use the binary dot product.
A subsystem code specifies a gauge group and a stabilizer group . In binary notation, the stabilizer is the radical of the gauge space, namely the gauge vectors commuting with all gauge vectors. Physical stabilizer representatives are chosen with consistent phases so that . This phase convention matters: the literal center of a Pauli gauge group may contain scalar operators that cannot be imposed as stabilizers. Whenever we write a center rank or support space, phases are omitted.
The stabilized Hilbert space [13] decomposes as , with dimensions and . If and are the binary ranks of gauge and stabilizer groups, then
We denote the parameters by ; gauge qubits are not included in the protected count .
A dressed logical commutes with every stabilizer and is not a gauge operator up to phase. Its distance is
where the set difference is understood modulo scalar phases. A bare logical additionally commutes with every gauge. Thus the dressed distance never exceeds the bare distance. These are properties of a static code; the number of faulty circuit locations needed to cause a logical error is a separate quantity.
Reading the Lean source
The excerpts1 retain the variables from their surrounding source: C denotes a subsystem code, r a rectangular grid, and l the dimension . They are excerpts from modules, rather than standalone input files. A few conventions suffice. The command def introduces a definition, theorem introduces a statement with its proof, and structure collects data together with properties that the data must satisfy. A colon means “has type”: for example, q : Fin l → ℕ specifies one natural number for each of the coordinate directions. Here Fin l is the set . The type ZMod 2 is the binary field. A variable followed by a dot selects one of its fields or an associated construction. Names beginning with h conventionally denote hypotheses or proofs.
The formal subsystem record extends an existing stabilizer code with a gauge group:
structure SubsystemCode (n : ℕ) extends StabCode n where
gauge : Subgroup (@PauliGroup_group n)
h_stab_le : stabs ≤ gauge
h_stab_central :
gauge ≤ Subgroup.centralizer
(stabs : Set (PauliGroup_group n))
The two hypotheses express and . For the rectangular construction, the supplied proofs show that box stabilizers are products of gauge lines and commute with every gauge line. This record does not require that be the full center of modulo phases. The equality with the full center follows from the separate linear-algebra argument in this paper; it is not among the formal theorems in the supplied source.
The formalization includes scalar phases explicitly. It defines trivialDressed as the subgroup generated by the gauge group and the scalar Pauli phases. The dressed-logical predicate is the following complete definition from Subsystem/Basic.lean:
def undetectable (E : PauliGroup n) : Prop :=
E ∈ C.normalizerGroup ∧
E ∉ C.trivialDressed ∧ PauliGroup.normalized E
The first condition says that commutes with every stabilizer. The second says that it is not a gauge operator, even after a scalar phase is removed. The third selects a fixed phase representative and has no effect on weight. This is the distinction between a nontrivial logical error and an error that changes only the gauge subsystem.
The distance is the minimum weight of these errors. The definition returns if there is no such error; this convention has no effect for our family because the cube construction supplies a nontrivial logical operator. The word noncomputable, used in several definitions, permits classical mathematical constructions. It does not stand for a missing proof or assert the existence of an efficient search procedure.
The equal-sector CSS case
The present code is of Calderbank–Shor–Steane (CSS) type: its gauge group is generated by pure and pure operators [14, 15]. Both sectors have the same support space . The stabilizer support in either sector is therefore
Writing and , we obtain , , and
Pure dressed logical classes form , while pure bare logical classes form . The sectors are identical. Keeping these quotients distinct is essential: a lower bound proved only for bare operators need not bound dressed distance in a general subsystem code.
Coordinate-line gauge measurements
Rectangular grids and line operators
Let and let every be even. Place one qubit at each point of
An axis- line fixes every coordinate except the th. Include the full-line operators and in the gauge generators for every such line . We call the resulting code .
A line has sites. Two parallel lines are either equal or disjoint. Hence opposite-Pauli line operators on the same axis commute, because any nonempty overlap has even size. Lines on different axes can intersect at a single site, in which case opposite-Pauli operators anticommute. These are allowed gauge measurements; they are not a commuting stabilizer generating set. For , the construction reduces to the detector stabilized by and .
The grid in Lean
The following complete record from RLG.lean stores the side lengths and their hypotheses.
structure RLG (l : ℕ) where
q : Fin l → ℕ
h_ge4 : ∀ i, 4 ≤ q i
h_even : ∀ i, Even (q i)
``
Thus an object r : RLG l contains both the rectangular grid and proofs that every side is even and at least four. These conditions are available wherever the object is used. They cannot be dropped accidentally when a later theorem is applied.
A coordinate is a function assigning a permitted value to each axis:
def n : ℕ := ∏ i, r.q i
abbrev Coord := (i : Fin l) → Fin (r.q i)
def coordEquiv : r.Coord ≃ Fin r.n := finPiFinEquiv
The last line supplies a bijection between grid points and the flat labels . This relabeling allows a geometric proof about lines and boxes to be used with the Pauli library, which indexes qubits by Fin r.n. It preserves supports and Hamming weights.
Boxes of parallel lines
For an axis , choose two distinct values on each other axis and include every value on axis . The resulting support is a box of parallel lines. Its indicator vector has the form
with factors placed in their coordinate order and . A same-axis line either misses this box or has even overlap . A transverse line either misses it or meets it at two sites. Consequently, the and operators supported on such boxes commute with every line gauge. They are also products of gauge lines. We will prove that these boxes span the full stabilizer support, rather than only a commuting subgroup of the gauge group.
Line–box commutation in Lean
The geometric commutation argument becomes a statement over . A line support and a box support have zero binary dot product:
theorem line_dot_box (i i' : Fin l) (c a b : r.Coord) :
r.lineVec i c ·ᵥ r.boxVec i' a b = 0 := by
unfold lineVec boxVec
split_ifs with hnd
· by_cases h : i = i'
· subst h
apply r.axisBox_dot_eq_zero _ _ i
rw [lineSet_self, boxSet_self, inter_self,
card_univ, Fintype.card_fin]
exact r.h_even i
· apply r.axisBox_dot_eq_zero _ _ i
rw [lineSet_self, r.boxSet_ne _ _ h, univ_inter,
card_pair (hnd i h)]
exact even_two
· simp
Here denotes the dot product modulo two. The proof has the same two cases as the geometric argument. If the line and box have the same direction, their overlap in that direction has even size ; the final command uses r.h_even i. If their directions differ, the relevant overlap contains the two transverse values defining the box. A degenerate box was defined to have zero support, which accounts for the final case. The commands rw replace an expression by an equal one, apply reduces a goal to the hypotheses of a known result, and exact supplies the required proof.
The results stabs_le_gauge and gauge_le_centralizer then assemble the subsystem record. Commutation is therefore proved for every allowed grid, without generating a large check matrix for each block size.
Figure 1. Three supports in the 4 × 4 code. (a) A row and a column meet once, so the indicated opposite-Pauli gauge operators anticommute. Each has weight four. (b) The four highlighted sites support a minimum logical operator. (c) Two parallel rows support a weight-eight stabilizer. The colors specify supports; panels (b) and (c) can be used in either pure Pauli sector.
The 4-by-4 example
On a 4 × 4 grid there are four rows and four columns, each measured in both Pauli sectors. The eight line supports per sector have one dependency: the sum of all rows equals the sum of all columns. Thus the gauge rank per sector is seven. The stabilizer rank per sector is five, as the general calculation below will show. Equations (8) then give
The product of two parallel rows is a weight-eight stabilizer. An operator on a corner has weight four and commutes with every gauge line, but is not a product of line gauges. It is a bare and dressed logical. The lower-bound proof excludes all lighter dressed logicals.
Gauge rank, stabilizer rank, and protected dimension
The coordinate construction becomes a tensor-product calculation over . Set
Here is the even-parity code of dimension and distance two. Evenness of gives , and therefore . Tensor basis vectors label physical grid sites. The gauge support is
Each summand is the span of all lines parallel to one axis.
Theorem 4.1 (Ranks and encoded subsystems). For every even tuple , the gauge and stabilizer ranks per Pauli sector are
The full stabilizer support is spanned by the boxes in (10) and equals
The code protects logical qubits and has gauge qubits.
Proof. Let be the quotient map. The kernel of is . One way to see this is to choose a complement to in each : in the resulting tensor decomposition, kills precisely the summands containing at least one factor. Its image has dimension , proving (14).
The orthogonal complement of the line span is
Indeed, orthogonality to every axis- line requires even parity on every such line. Intersecting these conditions for all axes gives the tensor product of the local even-parity spaces.
Restrict to . Its image is and its kernel is the sum on the right of (16). The same kernel is . This proves both the stabilizer formula and
Every is spanned by vectors with . Hence the summands in (16) are spanned by the box supports of (10); no additional stabilizer directions are missing. Subtracting the image dimension gives (15). Finally, substitution into (8) yields the stated and .
The proof also connects the two presentations used in this paper. The mathematical definition takes the full center of the line-gauge space. The Lean construction starts from box stabilizers and line gauges. Equation (16) identifies their binary support spaces. The formal coverage of these statements is recorded in § 10.
There are raw line measurements per sector. This is generally larger than : measuring every line retains algebraic redundancy. The Lean indexing of generators may repeat the same line for different anchor points, so the number of formal indices is not a hardware measurement count.
Dressed and bare logical operators
The rank calculation counts protected logical qubits, but it does not determine their distance. A dressed logical may be multiplied by any gauge operator without changing its action on the protected subsystem. We must therefore bound the weight of every representative of a nonzero logical class, including representatives that do not commute with the individual gauge generators.
Lemma 5.1 (Weight in the dressed quotient). Let and let be even. Set , , and , where is the all-ones vector, and define
Every vector representing a nonzero class in
has Hamming weight at least . The bound is attained by .
The linear functionals in the proof divide physical sites into classes; nontrivial logical action forces every class to contain an occupied site.
Proof. Write , let be the quotient map, and set . Since is even, the parity functional vanishes on and descends to a functional . It satisfies
The map has kernel . Moreover, , so a vector represents a nonzero class in the displayed quotient exactly when
Choose linear functionals such that . Such a choice exists: expand in tensor-product bases, choose a nonzero coefficient, and use the coordinate functional for that basis element in each factor. Extend each to a functional .
These functionals assign an -bit label to each physical site :
We show that the support of contains a site with each of the possible labels. For , define
Both and restrict to on . Consequently for every . On a projected physical basis vector, however, equals one precisely when the site has label : the factor with takes the value . Writing as the sum of its occupied basis vectors gives
Each label therefore occurs an odd, and hence positive, number of times. The label classes are disjoint, proving .
For the matching upper bound, each lies in because . Its class in is nonzero, and the tensor product of these nonzero classes is nonzero. Thus is a nontrivial class of weight .
The lemma gives the minimum over all nonzero classes; individual classes can have larger minimum weight. Its use of is essential: adding a gauge word changes but leaves this label unchanged, so the lower bound already includes every gauge dressing.
Theorem 5.2 (Exact dressed distance). The rectangular coordinate-line subsystem code with even side lengths has
The same distance is obtained when mixed – Pauli operators are allowed.
Proof. The gauge support is in both Pauli sectors, and the center support is . An -type operator commutes with every center stabilizer precisely when its support lies in
Its action on the protected subsystem is nontrivial precisely when its support does not lie in . The dressed -logical classes therefore form the quotient in Lemma 5.1. That lemma proves . Interchanging and gives .
A mixed Pauli has binary components and physical support . To commute with the center, both components must belong to . To act nontrivially on the protected subsystem, at least one component must lie outside . That component has weight at least , and its support is contained in the mixed support. The pure-sector corner operator supplies equality for the full Pauli distance. □
Corollary 5.3 (Bare distance). The minimum weight of a nontrivial bare logical operator is also .*
Proof. A bare logical commutes with every gauge operator. In one Pauli sector its support lies in , and it is nontrivial when it lies outside . It is consequently also a nontrivial dressed logical, so its weight is at least . The corner tensor belongs to and lies outside by the lemma. It is therefore a bare logical of weight . The same union of supports argument treats mixed Pauli operators. □
The distance lower bound in Lean
The Lean source proves the lower bound by induction on the number of coordinates. We describe that argument because it explains why the distance doubles with each added coordinate and why the even-side hypothesis matters.
Let be the binary span of the coordinate lines and let be the span of the box supports. For , split the array along the first coordinate into slices , each on an -dimensional grid. Let denote the line span on this smaller grid. Two slices are called equivalent if . This is ordinary gauge equivalence for their difference.
Two consequences of the box constraints control the induction. First, every difference commutes with the smaller box checks. Second,
To obtain the second statement, consider the boxes whose full side lies in the slicing direction. Their constraints say that the slice sum has even parity on every set containing two chosen values in each remaining coordinate. The auxiliary theorem Grid.mem_lineSpan_of_cubeSum proves that any array with all these parities zero belongs to .
If all slices were equivalent, choose a reference slice . Each difference could be generated by lines within slice , while the repeated array could be generated by lines in the first direction. These two contributions reconstruct , contradicting . There is consequently an inequivalent pair. For every such pair, the induction hypothesis and the Hamming-weight triangle inequality give
It remains to find two disjoint inequivalent pairs. Pass to the quotient by , and write . The cosets are not all equal and satisfy . Since the number of slices is even, they cannot consist of one exceptional coset and an otherwise constant list: the sum would be the difference between the exceptional and common cosets. With at least four slices, every other nonconstant list has two disjoint unequal pairs. Indeed, start with one unequal pair. If the remaining entries contain an unequal pair, we are done. Otherwise all remaining entries equal one coset; either both selected entries differ from that coset and can be paired with two remaining entries, or there is just one exceptional entry. The latter case was excluded. Summing the two pair bounds gives .
The formal statement below is reproduced from GridLines.lean; its proof body is omitted from this excerpt.
theorem two_pow_le_hammingNorm :
∀ (l : ℕ) (α : Fin l → Type u)
[∀ i, Fintype (α i)] [∀ i, DecidableEq (α i)],
(∀ i, Even (Fintype.card (α i)) ∧
4 ≤ Fintype.card (α i)) →
∀ z : Vec α, Cent z → z ∉ lineSpan α →
2 ^ l ≤ hammingNorm z
Here Fintype specifies finite coordinate sets, Cent z is the box-commutation condition, and hammingNorm z is its support size. The statement is independent of the side lengths apart from their parity and lower bound. The formal proof starts at dimension zero, where a nonzero binary vector on the single grid point has weight one.
Combining the two distance bounds
The cube support contains two chosen values in each coordinate and therefore has points. It meets every coordinate line in zero or two points, so its operator commutes with every gauge operator. To show that it is not a product of gauge lines, choose a second cube sharing exactly one corner with it. Every gauge line has even overlap with the second cube, whereas the first cube has odd overlap. This supplies the required witness outside the gauge group.
The final dressed-distance proof in RLGDistance.lean is short because the witness and lower bound have already been established:
theorem distance_eq :
r.toSubsystemCode.distance = 2 ^ l := by
obtain ⟨a, b, hab⟩ := r.exists_cube
exact SubsystemCode.distance_eq_of _
(r.cube_undetectable hab) (r.pauli_weight_cube hab)
(fun F hF => r.two_pow_le_pauli_weight F hF)
The first line of the proof chooses a nondegenerate cube. The underscore asks Lean to infer an argument; fun F hF introduces an arbitrary Pauli and a hypothesis hF that it is a dressed logical. The next lines supply three facts to distance_eq_of: this cube is a nontrivial dressed logical, its weight is , and every dressed logical has at least that weight. The proof applies to mixed , , and errors as well: at least one binary Pauli component lies outside the line span, and its Hamming weight is no larger than the Pauli support.
The same cube commutes with the entire gauge group and hence is also a bare logical. Since every bare logical is a dressed logical, the same lower bound gives bare distance . The source records this equality as RLG.bareDistance_eq.
Minimum stabilizer weight
The distance concerns logical operators. A different minimum determines whether the code also has a low-weight commuting stabilizer presentation. In the present family, gauge operators can be much lighter than every nonidentity stabilizer.
Theorem 6.1 (Minimum nonidentity stabilizer weight). For and even side lengths , the minimum weight of a nonzero word in the stabilizer support is
This is also the minimum weight of a nonidentity Pauli stabilizer, including mixed Pauli operators.
Proof. For , the stabilizer support is , whose unique nonzero word has weight . Suppose the claim holds in dimensions. Write and let be the smaller stabilizer support. Separating the last tensor factor in (16) gives
View a nonzero word of as slices in . Equation (22) implies that all slices have the same coset modulo and their sum is zero.
The tensor product has minimum distance . For completeness, the usual product-distance argument is inductive: a nonzero coordinate fiber of a tensor-code word occupies at least the distance of one factor, and each resulting nonzero slice is a word in the remaining tensor code. Product minimum words attain the bound.
If the common slice coset is nonzero, all slices are nonzero, giving weight at least . If the common coset is zero, every slice lies in , and at least two are nonzero because their sum vanishes. Induction then gives weight at least . The smaller of these two bounds is (21).
Choose a shortest axis . The box
has weight and attains the bound. Finally, a mixed stabilizer has support equal to the union of its two binary components. At least one component is a nonzero word of , so a mixed stabilizer cannot be lighter.
For RLG(), the measured gauges have weight six, whereas the lightest nonidentity stabilizer has weight 96. For RLG(), the corresponding weights are six and 128. No choice of stabilizer generating basis can avoid this lower bound. The result explains precisely what the gauge freedom reduces: the supports of the directly measured operators, while the stabilizer constraints remain heavy. The supplied Lean code constructs these box stabilizers and proves their commutation; it does not include the minimum-weight theorem for their span.
The finite rate–measurement-weight tradeoff
For a fixed distance , the rate and maximum gauge weight are
A tuple dominates another if it has at least as large a rate and at most as large a weight, with one strict inequality. The Pareto frontier consists of tuples not dominated by another allowed tuple. We identify tuples up to axis permutations. Capacity is a different objective from rate .
Theorem 7.1 (Complete frontier at distances 16, 32, and 64). Among even rectangular tuples with and , the complete frontiers for maximizing and minimizing are
The last tuple in each row uniquely maximizes the protected rate at that distance. No member under this data-qubit budget has distance 128 or greater.
Proof. Since , the budget gives . This proves the maximum-distance statement.
For , the function is increasing and strictly concave for . Hence
Equality requires for every axis. Under weight caps four, six, and eight, the corresponding uniform tuples are feasible and maximize each increasing factor in (24). Tuples with weight above ten are dominated by . This gives the distance-16 row.
For , a tuple with no side four has every side at least six. Any side at least eight would force . Thus is the only such tuple, with rate .
If exactly one side is four, the product of the remaining four sides is at most 2,500. At least two of those sides equal six: otherwise the product would be at least . After fixing two sixes, the last sorted even pair has product below 70. Its possibilities are , , , and . The last pair gives the largest rate, namely
If at least two sides are four, fix two of them. The other three have product at most 625. The same concavity bound gives
Since , the unique rate maximum is . Every weight-at-least-six alternative is dominated by it. The tuple has the smallest possible weight and remains on the frontier.
For , three sides above four would imply . If two sides exceed four, both must be six, because . If exactly one side exceeds four, it is six or eight. The complete list is therefore
with rates , , , and . The last tuple dominates the middle two, and has smaller measured weight. This proves the remaining row.
For a strict measured-weight cap , the maximum-rate distance-16 member becomes RLG; the distance-32 and distance-64 optima are unchanged. At distance 32, the tuple protects 1,152 qubits, more than the 1,024 protected by , but has lower rate and larger measured weight eight. It is therefore absent from the rate–weight frontier. This example shows why the objective must be specified when claiming an optimum.
These finite results use the distance theorem rather than a distance search. An independent exact-arithmetic enumeration gives 514, 55, and 4 sorted tuples for , respectively, and reproduces (25). The independent verification program also reconstructs small binary gauge matrices and checks their ranks and witnesses. The enumeration procedure appears in Appendix § 12.
Figure 2. Exact rate–weight frontiers at fixed distance under 10,000 data qubits. The points are the discrete choices in Table 1; line segments guide the eye and do not represent intermediate codes. Increasing the number of axes raises distance and reduces the maximum achievable rate under this budget.
| Sides | |||||||
| 256 | 16 | 110 | 16 | 4 | 32 | ||
| 1,296 | 256 | 302 | 16 | 6 | 48 | ||
| 4,096 | 1,296 | 590 | 16 | 8 | 64 | ||
| 10,000 | 4,096 | 974 | 16 | 10 | 80 | ||
| 1,024 | 32 | 570 | 32 | 4 | 64 | ||
| 7,776 | 1,024 | 2,550 | 32 | 6 | 96 | ||
| 4,096 | 64 | 2,702 | 64 | 4 | 128 | ||
| 9,216 | 256 | 5,422 | 64 | 6 | 128 |
Table 1. The complete frontiers under . The column is the largest measured gauge weight; is the minimum nonidentity stabilizer weight. Exponents denote repeated side lengths.
| Quantity | |||
| Distinct gauge measurements | 8,000 | 12,960 | 24,576 |
| Gauge rank | 6,878 | 9,302 | 14,382 |
| Stabilizer rank | 4,930 | 4,202 | 3,538 |
| Row dependencies | 1,122 | 3,658 | 10,194 |
| Data–gauge incidences | 80,000 | 77,760 | 110,592 |
| Total data degree | 8 | 10 | 12 |
| Reusable ancillas | 1,000 | 1,296 | 2,304 |
| Data + ancillas | 11,000 | 9,072 | 11,520 |
| Axis/Pauli batches | 8 | 10 | 12 |
| Ideal two-qubit gate layers | 80 | 60 | 56 |
Table 2. Counts for the three maximum-rate examples. Dependencies include both Pauli sectors. “Data + ancillas” uses the reusable pool in (32); it is not a fault-tolerant footprint.
Measurement counts and ideal schedules
A line-gauge presentation specifies both how many operators are measured and how often each data qubit participates. These counts are distinct from the number of independent gauge generators.
Proposition 8.1 (Full-line measurement counts). For RLG(), the numbers of distinct full-line operators are
Here counts data–gauge incidences and is the total data degree. There are binary row dependencies per sector.
Consider an ideal circuit using one reusable ancilla per active line, with all lines of one axis measured in parallel. Measure every X-axis batch before the Z-axis batches. The schedule uses
The layer count assumes direct ancilla–data interactions and excludes preparation, readout, reset, routing, and protection against fault propagation.
Proof. The lines parallel to axis partition the grid into disjoint supports. Summing over axes and sectors proves (30). Each qubit belongs to one line per axis in each sector, proving (31). Subtracting the rank gives the dependency count.
Within an axis batch, disjoint lines can use separate ancillas without gate collisions. Each line ancilla interacts with its data qubits in successive layers. Reusing the same ancilla pool across batches gives (32). All gauges commute with one another, as do all gauges, so this sector ordering allows products of same-Pauli outcomes to infer their stabilizer products in the ideal circuit.
A data-qubit cap and a live-qubit cap yield different optimizations. Under , exact enumeration gives maximum-rate tuples , , and at distances 16, 32, and 64. Their data-plus-ancilla counts are 9,000, 9,072, and 7,680, respectively. This calculation uses precisely the ideal ancilla policy in (32).
A smaller ancilla pool trades space for time. With only 512 reusable line ancillas, RLG() fits in 9,728 data-plus-ancilla qubits. Each length-four axis must be split into five subbatches, and each length-six axis into three, giving 52 subbatches and 232 ideal two-qubit layers across both sectors. The code parameters are unchanged.
In a noisy circuit, a single ancilla fault can propagate to several data qubits. Gauge outcomes from different times also cannot be multiplied indiscriminately to create error detectors. Flags, verified ancillas, measurement repetition, and an explicit circuit analysis may change both the footprint and time. Equations (30)–(32) are exact counts for the stated ideal schedule; they are not a claim that the circuit inherits distance .
Relation to existing codes
The uniform and members are subsystem many-hypercube codes [4]. Neural decoding and gauge-measurement scheduling have been studied under circuit-level noise for selected uniform side-four members [5]; those results do not establish the performance of the optimized rectangular codes considered here. Mixed side lengths have also been considered for ordinary concatenated many-hypercube codes [6]. The present analysis treats the full-line gauge group for arbitrary even rectangular tuples, determines its complete stabilizer support, and proves the dressed-distance lower bound for every gauge representative. The finite optimization then selects a tuple using proved parameters rather than estimating distance separately for each candidate.
Subsystem products provide a useful comparison with a different relation between rate and distance. For two classical codes with , the standard subsystem product has , , and dressed distance [16, 17]. Applying this construction to two binary simplex codes produces the SHYPS family [18],
with weight-three gauge generators for . At , it gives . The uniform line-gauge code has the same static distance and a protected rate , compared with for SHYPS(6). It also uses more data qubits and doubles the gauge weight from three to six. The SHYPS work develops logical Clifford operations and circuit-level simulations, which are outside the results established here. Static parameter comparisons do not determine which code is preferable for a complete computation.
High-rate stabilizer constructions, including bivariate bicycle codes [19], measure commuting checks rather than the noncommuting gauges used here. Hong constructs balanced-product QLDPC codes with design rate and weight-nine checks, and evaluates their decoding performance under idling-free circuit-level noise [20]. Their measured generators should therefore be compared with our gauges only together with a specified extraction circuit. A numerical logical witness proves an upper bound on distance. A finite exhaustive certificate proves an exact distance when accompanied by a matching witness. Such a certificate is as rigorous for its stated instance as a symbolic proof; the advantage of the present formula is that it applies to every allowed tuple without repeating a finite-instance distance computation.
For a uniform fixed side length and growing ,
The rate tends to zero, the full-line data degree is , and the lightest stabilizer has weight . Thus this family does not have the asymptotic guarantees of good QLDPC stabilizer codes [10, 11]. Its useful feature is the direct control of finite rate, exact distance, and gauge weight, with a simple description of every measured support.
Formalization and reproducibility
The Lean source is available in the Lean-QEC GitHub repository. The four subsystem modules used here, Basic.lean, RLG.lean, GridLines.lean, and RLGDistance.lean, are fixed at commit eccb50c389b4d5d9feab3e29809b23aa1761fa14. This snapshot also records the Lean toolchain and dependency revisions.
The formal proof establishes dressed and bare distance for the constructed subsystem record. The full-center equality, rank formulas, minimum stabilizer weight, measurement counts, and finite frontiers are established in this paper and are not claimed as Lean theorems.
Discussion
We prove that the dressed distance of rectangular coordinate-line subsystem codes is fixed entirely by the number of axes, despite the freedom to modify logical operators by gauge multiplication. For every grid with even side lengths of at least four, the distance is exactly . At fixed distance, the side lengths can therefore be chosen to balance encoding rate and measurement weight using explicit formulas. The 10,000-qubit frontiers demonstrate how this structure turns code selection into a finite optimization with proved parameters. The same approach applies to other qubit budgets and measurement-weight constraints.
The stabilizer analysis reveals where the benefit of gauge measurements arises. Although each measured operator acts along a single coordinate line, every nonidentity stabilizer has weight at least . Gauge freedom thus allows the information carried by increasingly heavy stabilizers to be accessed through lighter measurements. This distinction also identifies a central implementation challenge: recovering that information reliably requires control of errors in both the data and the measurement record. The minimum stabilizer weight makes clear that choosing a different stabilizer basis cannot remove this challenge.
The Lean development provides a complementary proof of the distance theorem by induction on the number of axes, with explicit treatment of Pauli phases and gauge equivalence. Extending it to the full-center equality and rank formulas would yield a complete formal verification of the code parameters. For implementation, the next step is to develop and evaluate decoders and fault-tolerant extraction circuits for the rectangular choices studied here, building on the decoding and measurement-order studies for uniform subsystem many-hypercube codes [4, 5]. These must account for the timing of gauge measurements, propagation of ancilla faults, and the connectivity available in a physical device. The resulting circuit distance and logical error rates may favor different side lengths from those selected by static rate and measurement weight alone. Establishing this connection would determine when the encoding advantage translates into a reduction in the resources needed for a reliable quantum memory.
Exact finite enumeration
For fixed , every allowed tuple can be enumerated in nondecreasing order. At a recursion node, let be the product of the chosen sides and let sides remain. A candidate next side can be accepted only if , where is the data-qubit budget. All later sides must be at least , so this condition is also an exact stopping test. No floating-point root or distance search is needed.
An exact-arithmetic implementation of this recursion compares rates as rational numbers. For , it enumerates 514, 55, and 4 tuples at . Grouping the middle case by the number of sides equal to four gives The program also checks gauge and stabilizer rank identities, the raw measurement counts and weight histograms, both qubit-budget policies, and small explicit binary line matrices. It exhausts the dressed quotient for the and examples. These finite checks passed. They support the numerical transcription and small instances; the general distance claim rests on the proofs in the text and the source declarations described above.
| Number of fours | Tuples | Largest-rate tuple in the group | Rate |
| 0 | 1 | 32/243 | |
| 1 | 4 | (4, 6, 6, 8, 8) | 1/8 |
| 2 | 11 | (4, 4, 6, 10, 10) | 8/75 |
| 3 | 21 | (4, 4, 4, 12, 12) | 25/288 |
| 4 | 17 | (4, 4, 4, 38) | 9/152 |
| 5 | 1 | 1/32 |
Table 3.
References
- [1]David Poulin. Stabilizer formalism for operator quantum error correction. Physical Review Letters, 95:230504, 2005. doi: 10.1103/PhysRevLett.95.230504. URL https://arxiv.org/abs/quant-ph/0508131.
- [2]Dave Bacon. Operator quantum error-correcting subsystems for self-correcting quantum memories. Physical Review A, 73:012340, 2006. doi: 10.1103/PhysRevA.73.012340. URL https://arxiv.org/abs/quant-ph/0506023.
- [3]Hayato Goto. High-performance fault-tolerant quantum computing with many-hypercube codes. Science Advances, 10:eadp6388, 2024. doi: 10.1126/sciadv.adp6388. URL https://arxiv.org/abs/2403.16054.
- [4]Ryota Nakai and Hayato Goto. Subsystem many-hypercube codes: High-rate concatenated codes with low-weight syndrome measurements. Physical Review Applied, 25:014032, 2026. doi: 10.1103/xbzn-vn37. URL https://arxiv.org/abs/2510.04526.
- [5]Ryota Nakai and Hayato Goto. Neural decoders for subsystem many-hypercube codes, 2026. URL https://arxiv.org/abs/2608.13975.
- [6]Hayato Goto. Optimized many-hypercube codes toward lower logical error rates and earlier realization, 2025. URL https://arxiv.org/abs/2512.00561.
- [7]Leonardo de Moura and Sebastian Ullrich. The Lean 4 theorem prover and programming language. In Automated Deduction—CADE 28, volume 12699 of Lecture Notes in Computer Science, pages 625–635. Springer, 2021. doi: 10.1007/978-3-030-79876-5_37. URL https://lean-lang.org/papers/lean4.pdf.DOI
- [8]Mattias Ehatamm, Yi Lee, Xiaodi Wu, and Runzhou Tao. End-to-end formalization of quantum error correction, 2026. URL https://arxiv.org/abs/2605.16523.
- [9]The mathlib Community. The Lean mathematical library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, pages 367–381, 2020. doi: 10.1145/3372885.3373824. URL https://arxiv.org/abs/1910.09336.
- [10]Pavel Panteleev and Gleb Kalachev. Asymptotically good quantum and locally testable classical LDPC codes. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 375–388, 2022. doi: 10.1145/3519935.3520017. URL https://arxiv.org/abs/2111.03654.
- [11]Anthony Leverrier and Gilles Zémor. Quantum Tanner codes. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 872–883, 2022. doi: 10.1109/FOCS54457.2022.000117. URL https://arxiv.org/abs/2202.13641.
- [12]Daniel Gottesman. Stabilizer Codes and Quantum Error Correction. PhD thesis, California Institute of Technology, 1997. URL https://arxiv.org/abs/quant-ph/9705052.
- [13]David W. Kribs, Raymond Laflamme, David Poulin, and Maia Lesosky. Operator quantum error correction. Quantum Information and Computation, 6:382–399, 2006. URL https://arxiv.org/abs/quant-ph/0504189.
- [14]A. Robert Calderbank and Peter W. Shor. Good quantum error-correcting codes exist. Physical Review A, 54:1098–1105, 1996. doi: 10.1103/PhysRevA.54.1098. URL https://arxiv.org/abs/quant-ph/9512032.
- [15]Andrew M. Steane. Multiple-particle interference and quantum error correction. Proceedings of the Royal Society of London. Series A, 452:2551–2577, 1996. doi: 10.1098/rspa.1996.0136. URL https://arxiv.org/abs/quant-ph/9601029.
- [16]Dave Bacon and Andrea Casaccino. Quantum error correcting subsystem codes from two classical linear codes, 2006. URL https://arxiv.org/abs/quant-ph/0610088.
- [17]Muvuan Li and Theodore J. Yoder. A numerical study of Bravyi–Bacon–Shor and subsystem hypergraph product codes, 2020. URL https://arxiv.org/abs/2002.06257.
- [18]Alexander J. Malcolm, Andrew N. Glaudell, Patricio Fuentes, Daryus Chandra, Alexis Schotte, Colby DeLisle, Rafael Haenel, Amir Ebrahimi, Joschka Roffe, Armanda O. Quintavalle, Stefanie J. Beale, Nicholas R. Lee-Hone, and Stephanie Simmons. Computing efficiently in QLDPC codes. Nature Communications, 17:7286, 2026. doi: 10.1038/s41467-026-73061-9. URL https://arxiv.org/abs/2502.07150.
- [19]Sergey Bravyi, Andrew W. Cross, Jay M. Gambetta, Dmitri Maslov, Patrick Rall, and Theodore J. Yoder. High-threshold and low-overhead fault-tolerant quantum memory. Nature, 627:778–782, 2024. doi: 10.1038/s41586-024-07107-7. URL https://arxiv.org/abs/2308.07915.
- [20]Yifan Hong. Quantum LDPC codes with design rate 1/5 and good performance below 1000 physical qubits, 2026. URL https://arxiv.org/abs/2607.27644.

