Alphabeta Math
Pipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Stabilizer and CSS Codes, Syndromes, and Procedures

1 · Prerequisites

2 · Summary

This page develops stabilizer code spaces from commuting Hermitian phase-aware Pauli checks on n≥1 physical qubits, defines their syndrome and logical-Pauli quotient, and proves the projector dimension and distance criteria. The CSS construction uses the nested-code convention C2⊆C1 with coset states indexed by C1/C2; no additional C2⊥⊆C1 condition is assumed. The binary dot product is bilinear over F2 and is not a positive-definite inner product.

The page gives finite syndrome procedures, a symplectic stabilizer encoder, and a relative square-patch surface-code example. Pauli phases are retained until a scalar quotient is explicitly taken. Circuit-level claims use the ordered-wire and chronological-composition conventions from the authored QC09 suppliers; measurement outcomes and classical corrections are modeled by finite projectors and observed instrument branches.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: AI-adaptedProof: AI-generatedOpen item page →

CSS code from nested binary codes

Definition

Let n≥1 and let C2⊆C1≤F2n be binary linear codes. Put k=dim⁡C1−dim⁡C2. The CSS coset code associated with this nested pair is the subspace of the ordered n-qubit register spanned by

∣x+C2⟩:=∣C2∣−1/2∑c∈C2∣x+c⟩,x∈C1.

Here addition is coordinatewise in F2n, and ∣y⟩ is the computational-basis vector indexed by the bit string y. The vector depends only on the coset x+C2. A basis of C2 extended to a basis of C1 chooses logical labels for the quotient C1/C2; the number of labels is 2k. No additional inclusion C2⊥⊆C1 is part of this nested-code convention.

For a binary code C, C⊥={y:x⋅y=0 for every x∈C} uses the standard bilinear dot product, as defined in Bilinear dual of a finite-field linear code.

Facts & Assumptions

Given: Binary linear codes C2⊆C1≤F2n with n≥1.

[F1]

Classical linear code over a finite field: a classical binary linear code is a subspace of F2n with its finite vector-space dimension.

[F2]

Finite registers and their ordered computational bases: the n-qubit register has an ordered computational basis indexed by F2n.

[F3]

The computational basis is orthonormal gives an orthonormal basis of each Q2 factor. Equip their ordered tensor product with the inner product of Ordered tensor registers, their inner product, and wire permutations; then The product basis is orthonormal and tensor dimensions multiply makes the bit-string-indexed product basis orthonormal.

[F4]

If dim⁡FV=n and U is a linear subspace of V, then U is finite-dimensional, dim⁡FU≤n, and dim⁡FU=n if and only if U=V: in finite dimension every linearly independent subset of a subspace extends to a basis of that subspace, without a choice principle.

Verification

1.1givenF1construct

Since C2⊆C1, every x∈C1 has a coset in C1/C2. If x′=x+c0 with c0∈C2, then c↦c+c0 permutes C2; reindexing the finite sum gives ∣x′+C2⟩=∣x+C2⟩. Thus the displayed vector is independent of the representative.

2.1givenF1F4step 1.1construct

By [F4], dim⁡C2≤dim⁡C1, so k≥0. Extend a basis of C2 to a basis of C1. If the dimensions are m and m+k, respectively, the added k basis vectors span a complement D with C1=C2⊕D. Each coset has exactly one representative in D, so D→C1/C2, d↦d+C2, is a bijection. Coordinate expansion in the chosen basis identifies D with F2k. There are 2k such coordinate lists, since each of the k coordinates has two choices; for k=0 there is one empty list. Hence ∣C1/C2∣=2k.

3.1givenF2F3step 2.1algebra∎

For each coset, the basis vectors ∣x+c⟩ in its sum are distinct, so [F3] gives squared norm ∣C2∣−1∣C2∣=1. Different cosets have disjoint supports in that basis, so their inner product is zero. The code space therefore has the 2k orthonormal coset vectors indexed by C1/C2.

Remarks

Cleve’s §37.3 gives a special CSS construction with an additional dual containment hypothesis. That hypothesis is not used here: membership in C2⊆C1 alone makes the coset vectors well defined.

LemmaStatement: AI-adaptedProof: AI-generatedOpen item page →

Dimension of the binary dual code

Statement

For every binary linear code C≤F2n with n≥1, dim⁡C⊥=n−dim⁡C. This argument uses no form of the Axiom of Choice.

Facts & Assumptions

Given: A subspace C≤F2n, its bilinear dual, and the standard coordinate basis of F2n.

[F1]

Bilinear dual of a finite-field linear code: x⋅y=∑j<nxjyj and C⊥={y:x⋅y=0 for every x∈C}.

[F2]

The dual family of a finite basis is a basis of the dual space, with the same dimension: the dual family of a finite basis of a vector space is a basis of its algebraic dual, with the same dimension.

[F4]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: for a linear map with finite-dimensional domain, domain dimension is the sum of kernel dimension and image dimension.

Proof

1.1F1F2construct

Let e0,…,en−1 be the standard basis of F2n. Its coordinate dual basis is e0∗,…,en−1∗, and ei⋅y=yi=ei∗(y) for 0≤i<n by [F1]. Thus the linear map J:F2n→(F2n)∗, J(x)(y)=x⋅y, sends a basis to the dual basis from [F2], so it is an isomorphism.

1.2givenF3construct

Choose a basis c1,…,cm of C and extend it to a basis of F2n by [F3]. For every f∈C∗, define f~ on the extended basis by f~(ci)=f(ci) and value 0 on each added basis vector, then extend linearly. This is a linear functional on F2n whose restriction to C is f. Hence restriction (F2n)∗→C∗ is onto.

2.1F1F2F4step 1.1step 1.2∎

The composite T:F2n→J(F2n)∗→C∗ is onto by the isomorphism in step 1.1 and surjectivity in step 1.2. Its kernel consists exactly of those x for which x⋅c=0 for all c∈C, namely C⊥ by [F1]. Since dim⁡C∗=dim⁡C=m by [F2], rank-nullity [F4] gives n=dim⁡C⊥+m. Therefore dim⁡C⊥=n−dim⁡C.

DefinitionDefinition: AI-adaptedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Stabilizer code space

Definition

Let n≥1 and let S be an abelian subgroup of the Hermitian elements of the phase-aware Pauli group Pn on the ordered n-qubit register. Assume −I∉S. The stabilizer code space is the common +1 eigenspace

C(S):={ψ∈(C2)⊗n:gψ=ψ for every g∈S}.

If g1,…,gr are independent generators of S, the associated stabilizer rank is r; independence means no nonempty product of distinct generators is I. The code-space projector and its nonzero dimension are established by Stabilizer projector and code dimension ↗.

Remarks

The subgroup elements here are Hermitian Paulis in the phase-aware ikXxZz convention. The binary label records commutation but does not replace the phase needed to determine whether a generator fixes the code with eigenvalue +1.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableOpen item page →

Stabilizer encoder by symplectic elimination

Definition

Inputs. An integer n≥1 and r≤n ordered rows P(ki,xi,zi)=ikiXxiZzi representing independent, pairwise-commuting signed Hermitian Pauli generators on the ordered n-qubit register.

Wire and factor indices. Tableau coordinates and circuit wire labels are q=0,…,n−1. The one-based Pauli factor index corresponding to wire q is j=q+1; factor j occupies tensor position j−1. Thus a one-wire gate on circuit wire q uses supplier factor index q+1, and a CNOT or SWAP on circuit wires q,s uses supplier indices q+1,s+1. The stored coordinates (xi,q,zi,q) use the same zero-based order.

Tableau updates. For a current row P(k,x,z), all phase entries are updated modulo 4 and binary entries modulo 2. Conjugation by Hq sends (k,xq,zq) to (k+2xqzq,zq,xq); by Sq it sends these entries to (k+xq,xq,zq+xq); by Sq† it sends them to (k−xq,xq,zq+xq). Conjugation by Xq adds 2zq to k and leaves the labels unchanged. Conjugation by SWAP⁡q,s interchanges xq with xs and zq with zs and leaves k unchanged. For CNOT⁡q→s, update xs←xs+xq and zq←zq+zs and leave k unchanged; all unmentioned binary coordinates are unchanged. Whenever a gate U is appended to chronological D, replace every current row R by URU†. For a row product P(k,x,z)P(k′,x′,z′), use the exact update (k+k′+2(z⋅x′),x+x′,z+z′).

Validity. If any row is not Hermitian, the binary labels are dependent, two rows fail to commute, or the generated subgroup contains −I, return INVALID. The independent commuting case with r=0 is valid.

Elementary gate alphabet. The output is a finite chronological list over H,S,S†,X,CNOT⁡c→t,SWAP⁡c,t. Here H,S,X,CNOT⁡,SWAP⁡ have the exact matrices in the cited gate definitions; S†=diag⁡(1,−i) is explicitly admitted as one primitive gate of this algorithm. No inverse or controlled black-box access is assumed.

Procedure. Keep the current rows phase-aware, an invertible binary row-operation matrix M∈GL(r,F2), and phase-aware input-combination rows Gi. Initially M=Ir, Gi=gi (the ith input row), and the chronological gate list D is empty. The invariant is that current row i is DGiD† and Gi=∏a=0r−1gaMia=P(κi,xˉi,zˉi),xˉi=∑a=0r−1Miaxa,zˉi=∑a=0r−1Miaza. where sums in the binary labels are in F2n and the product is in increasing input-row order. The input generators commute and square to I, so this product is independent of order. Its phase exponent κi∈Z/4Z is the signed row-operation phase data. On a gate conjugation update the current tableau row and its phase, leaving Gi and M unchanged. On a row multiplication i←i+p, update the current row by the exact phase-aware product, set Mi←Mi+Mp over F2, and set Gi←GiGp using the exact Pauli product rule (thereby updating κi). A row interchange swaps the corresponding rows of the current tableau, M, and G.

For each pivot position j=0,…,r−1:

  1. Among rows j,…,r−1, take the first row that is not identity on the unused wires, and let its row index be s. If s≠j, interchange the complete current rows s and j and interchange the corresponding rows of M and G, including the phase entry of G. This row interchange is not a circuit gate. Take the first unused wire q of the pivot row j with nonzero Pauli label. If q≠j, append the circuit gate SWAP⁡j,q to D and conjugate every current row by it.
  2. On pivot wire j and each later unused wire, normalize the pivot row's local factor: apply H to turn X into Z; apply S† followed by H to turn Y into Z; leave Z and I unchanged. Append each gate and update every row, including its phase.
  3. For each later wire q where the pivot row has a Z, append CNOT⁡q→j and update every row. The pivot becomes either +Zj or −Zj.
  4. If the pivot is −Zj, append Xj and update every row, making it +Zj. For each remaining row with a Zj factor, multiply that row by the pivot row and update the binary row-operation matrix to clear Zj.

For r=0, return the empty gate list, empty M and κ, and the unchanged logical register. On a valid input with r>0, return D, its reversed adjoint list D† as the encoder, and the signed row-operation data (M,κ), with the associated Gi defined by the invariant above. The returned checks satisfy DGiD†=+Zi for i=0,…,r−1. The logical label basis is the ordered computational basis on the remaining n−r wires, prefixed by ∣0r⟩.

Remarks

The procedure uses only finite tableau rows, deterministic first-pivot choices, and the declared gate list. Each appended gate can be read as a one-occurrence layer in Finite circuit syntax and ordered wire labels; the chronological gate list then denotes the product specified in Denotational semantics of a finite layered circuit. The algorithm explicitly lists S† as a primitive gate with its matrix and assumes no inverse-query access.

DefinitionDefinition: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Square planar surface code

Definition

Fix an integer d≥2. Take the square grid with vertices (i,j) for 0≤i,j≤d, unit horizontal and vertical edges, and d2 square faces. Let R consist of the left and right vertical boundary edges together with their vertices. The physical qubits are the edges not in R; there are 2d2 such edges. Order vertices and faces lexicographically by their coordinates, and order physical edges lexicographically by their lower endpoint, with horizontal edges before vertical edges when endpoints tie.

Let Q0 be the binary vector space on vertices outside R, Q1 the binary vector space on physical edges, and Q2 the binary vector space on faces. Define ∂1:Q1→Q0 by sending each physical edge to the sum of its endpoints that are outside R. Define ∂2:Q2→Q1 by sending each face to its boundary with any edge in R deleted.

The X-check matrix is HX=∂1, with rows indexed by vertices outside R and columns by physical edges. The Z-check matrix is HZ=∂2T, with rows indexed by faces and columns by physical edges. Thus X checks are the rows of HX and Z checks are the rows of HZ. The maps satisfy ∂1∂2=0. The rough boundaries are the left and right sides; the top and bottom are the complementary dual boundaries.

Facts & Assumptions

Given: The finite grid, the relative chain spaces, and the two boundary maps just defined.

[F1]

Generator and parity-check matrices over a finite field: generator and parity-check matrices use the declared finite coordinate order; a matrix row specifies a binary support vector.

[F2]

The Pauli matrices: X and Z are the exact Hermitian one-qubit Pauli matrices.

Verification

1.1givenconstructalgebra

For each face, every vertex outside R is incident to either zero or two of its boundary edges. If a boundary edge lies in R, its endpoints are in R and are omitted from Q0. Therefore every nonrough vertex appears an even number of times in ∂1∂2 of that face, so ∂1∂2=0.

2.1F1F2step 1.1algebra∎

The row vectors of HX and HZ have binary dot products given by HXHZT=∂1∂2=0 from step 1.1. Hence every X check commutes with every Z check; X checks commute among themselves, as do Z checks, since equal-type Pauli factors commute. This defines a commuting CSS stabilizer family without any physical or topological-order premise.

Remarks

The relative cellulation fixes every boundary convention. In particular, rough edges are removed from the physical register, and only vertices outside the rough boundary index X checks.

DefinitionDefinition: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Stabilizer syndromes and logical Pauli operators

Definition

Let n≥1 and let S be a stabilizer subgroup generated by an ordered independent Hermitian list g1,…,gr. For a phase-aware Pauli error E, its syndrome is the bit string s(E)∈F2r defined by

Egj=(−1)sj(E)gjE,sj(E):=ω(λ(E),λ(gj)).

Here λ(P(k,x,z))=(x,z) is the binary Pauli label and ω((x,z),(x′,z′))=x⋅z′+z⋅x′. The scalar center of Pn is Zn={ikI:k∈Z/4Z}, and the normalizer is N(S)={P∈Pn:Pg=gP for every g∈S}. The logical Pauli classes form the quotient group

N(S)/(ZnS).

A normalizer element is logically nontrivial exactly when it lies in N(S)∖ZnS. Multiplication by a scalar phase does not change a syndrome or logical class.

Facts & Assumptions

Given: The phase-aware Pauli group, its binary label, a stabilizer group S, and an ordered Hermitian generating list.

[F1]

Binary Pauli label and quotient: λ(P(k,x,z))=(x,z) forgets only the scalar phase.

[F2]

Binary symplectic form: ω((x,z),(x′,z′))=x⋅z′+z⋅x′.

[F3]

Pauli commutator is symplectic pairing: the Pauli commutator sign is (−1)ω(λ(P),λ(Q)).

Verification

1.1givenF2F3

Applying [F3] to E and gj gives Egj=(−1)ω(λ(E),λ(gj))gjE. The exponent is in F2, so it determines exactly one bit, and this verifies the stated sign-to-bit convention.

2.1F1F3step 1.1algebra

If E′=iaE for a scalar phase ia, then E′gj=iaEgj and gjE′=iagjE; the same commutation sign results. Equivalently, λ(E′)=λ(E) by [F1]. Hence the syndrome depends only on the Pauli coset modulo scalar phase.

3.1givenF1∎

If E∈ZnS, write E=zs with z∈Zn and s∈S. The scalar z commutes with every generator, and s commutes with every generator because S is abelian, so E∈N(S) and its logical quotient class is the identity. Conversely the denominator of the displayed quotient is exactly the scalar phases times stabilizers; thus a normalizer element outside ZnS represents a nonidentity logical Pauli class.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Termination and gate count of symplectic stabilizer elimination

Statement

On every valid input of r independent commuting signed Hermitian Pauli generators on n wires, the phase-aware symplectic-elimination encoder terminates after r pivots, uses at most r(3n+1) elementary gates, and stores O(rn+r2+rnlog⁡(n+1)) bits including its output gate list, excluding the read-only input tableau and the implicit wire count.

Facts & Assumptions

Given: A valid tableau with r≤n independent commuting rows and the procedure in the stabilizer encoder definition.

[F1]

Stabilizer encoder by symplectic elimination: each pivot interchanges the selected row into row j when needed, normalizes it to +Zj, clears all remaining rows on wire j, and records the gates and signed row-operation data.

[F2]

Hadamard pauli action: conjugation by H exchanges the binary X and Z coordinates.

[F3]

Phase gate pauli action: conjugation by S updates the binary label and tracks the phase exactly; its inverse gate has the inverse update.

[F4]

CNOT Pauli action: CNOT conjugation updates the binary coordinates and phase exactly.

Proof

1.1F1F2F3F4algebra

After j pivots, the first j rows are +Z0,…,+Zj−1, and every remaining row has zero X and Z coordinates on those j wires. This holds before the first pivot. At pivot j, the selected row is interchanged into row j when necessary; the interchange also updates the signed row-operation data and is not a circuit gate. All circuit gates act only on unused wires. For any zero-based circuit wire q, the one-based factor index in [F2]–[F4] is q+1; a CNOT with circuit control q and target s therefore uses supplier indices q+1,s+1. The local Clifford gates turn each nonidentity pivot factor into Z, and [F4] clears every other pivot-row Z using a control on that wire and target j. Commutation is preserved by conjugation, so remaining rows have no Xj factor. Row multiplication by the pivot then clears Zj without changing earlier wires.

2.1F1step 1.1algebra

The remaining r−j binary row labels are independent on the unused n−j wires: a dependence there would be a dependence among the original labels because all earlier coordinates are already zero. Since r−j>0 when j<r, at least one remaining row is nonidentity on an unused wire. Thus every valid pivot finds a row and a wire, and the loop executes exactly r iterations. This proves termination, including r=0.

3.1F1step 2.1algebra

During one pivot, at most one SWAP is used. On each of at most n unused wires, normalization uses at most two one-qubit gates. Clearing the pivot's other Z factors uses at most n−1 CNOTs, and correcting its sign uses at most one X. The total is at most 1+2n+(n−1)+1=3n+1 gates per pivot, hence at most r(3n+1) overall.

4.1F1step 3.1algebra∎

The current phase-aware tableau and the phase-aware input-combination rows together store 4rn label bits and O(r) phase bits. The signed row-operation output stores r2 bits for M and O(r) bits for κ. The output has at most r(3n+1) gates; each gate type takes constant space and each wire index takes at most ⌈log⁡2(n+1)⌉ bits. Their total is O(rn+r2+rnlog⁡(n+1)). For r=0, the output and signed row-operation data are empty, as specified.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Stabilizer projector and code dimension

Statement

Let n≥1 and let S be an abelian group of Hermitian n-qubit Pauli operators with −I∉S, generated by r independent checks. Then

PS:=∣S∣−1∑g∈Sg

is the orthogonal projector onto the stabilizer code space and has rank 2n−r. In particular, the code space is nonzero, including when r=n.

Facts & Assumptions

Given: n≥1 and a stabilizer code space C(S) with r independent generators on the ordered n-qubit register.

[F1]

Stabilizer code space: C(S) is the common +1 eigenspace of every element of S.

[F2]

Stabilizer average is the fixed-space projector: the finite average ∣S∣−1∑g∈Sg is self-adjoint and idempotent with image C(S).

[F3]

Stabilizer projector rank and code dimension: for the same stabilizer subgroup of rank r, its fixed-space projector has trace and image dimension 2n−r.

[F4]

An endomorphism is an orthogonal projection exactly when it is idempotent and self-adjoint: a self-adjoint idempotent on a finite-dimensional inner-product space is the orthogonal projection onto its image.

[F5]

Stabilizer labels form an isotropic space of the same rank: the span of the binary labels of r independent stabilizer checks has dimension r, so the rank convention agrees with the generator count.

Proof

1.1F1F2given

The subgroup in the Statement meets the definition in [F1]. By [F2], PS is self-adjoint and idempotent with image equal to the common +1 eigenspace.

2.1F3F5step 1.1

The rank-r hypothesis is the same rank convention used in [F3]: independent Hermitian generators give a binary label space of dimension r by [F5]. Therefore [F3] gives dim⁡C(S)=Tr⁡(PS)=2n−r.

3.1F4step 2.1algebra∎

By [F4] and step 1.1, PS is the orthogonal projector onto C(S). Since 2n−r≥1, this space is nonzero; the endpoint r=n has rank one and r=0 gives the full 2n-dimensional register.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

CSS encoding dimension and commutation

Statement

Let C2⊆C1≤F2n, n≥1, and k=dim⁡C1−dim⁡C2. The coset vectors from CSS code from nested binary codes define an isometric encoding of k logical qubits. For every c∈C2 and h∈C1⊥, Xc and Zh commute, and each fixes every encoded coset vector. Their common +1 eigenspace is exactly this encoding. The conclusion requires only C2⊆C1; it does not require C2⊥⊆C1.

Moreover, for every x∈C1, the Hadamard transform is

H⊗n∣x+C2⟩=2−k/2∑y+C1⊥∈C2⊥/C1⊥(−1)x⋅y∣y+C1⊥⟩.

The phase is independent of the representatives x+C2 and y+C1⊥.

Facts & Assumptions

Given: A nested pair C2⊆C1≤F2n, the ordered computational basis, and the Pauli operators Xc,Zh.

[F1]

CSS code from nested binary codes: each coset vector is ∣C2∣−1/2∑u∈C2∣x+u⟩, with labels in C1/C2.

[F2]

Bilinear dual of a finite-field linear code: C⊥ is defined by the standard bilinear dot product on binary coordinate vectors.

[F3]

Dimension of the binary dual code: dim⁡C⊥=n−dim⁡C for every binary linear code C.

[F4]

The computational basis is orthonormal: distinct computational basis vectors are orthogonal unit vectors.

[F5]

The Pauli matrices: X∣b⟩=∣b+1⟩ and Z∣b⟩=(−1)b∣b⟩ for b∈F2.

[F6]

Pauli commutator is symplectic pairing: Pauli operators commute exactly when their binary labels have symplectic pairing zero.

[F7]

Exact one-qubit gates and rotations: the Hadamard matrix is H=2−1/2(111−1).

[F8]

Stabilizer code space: the stabilizer code space is the common +1 eigenspace of all checks.

[F9]

Stabilizer projector and code dimension: a stabilizer generated by r independent commuting Hermitian checks has common +1 eigenspace of dimension 2n−r, provided −I is not in the generated group.

Proof

1.1F1F4algebra

There are ∣C2∣ distinct basis vectors in each coset sum. By [F4], its squared norm is ∣C2∣−1∣C2∣=1. Distinct cosets have disjoint supports, so their vectors are orthogonal. By [F1] there are ∣C1/C2∣=2dim⁡C1−dim⁡C2=2k such vectors, giving an orthonormal basis indexed by a k-bit logical register.

1.2F1F5given

By [F5], for c∈C2, Xc sends ∣x+u⟩ to ∣x+u+c⟩. Translation u↦u+c permutes C2, so Xc fixes the whole coset sum. For h∈C1⊥, each x+u∈C1 and therefore (−1)h⋅(x+u)=1; the diagonal operator Zh fixes every term. Thus both check families fix every encoded basis state and hence their linear span.

1.3F2F6given

The binary labels of Xc and Zh are (c,0) and (0,h). Their symplectic pairing is c⋅h. Since c∈C2⊆C1 and h∈C1⊥, this dot product is zero by [F2].

1.4F1F7construct

On a computational basis vector ∣w⟩, multiplying the one-bit Hadamard formulas from [F7] gives H⊗n∣w⟩=2−n/2∑y∈F2n(−1)y⋅w∣y⟩. Substituting the coset definition [F1] yields H⊗n∣x+C2⟩=2−n/2∣C2∣−1/2∑y∈F2n(−1)y⋅x(∑u∈C2(−1)y⋅u)∣y⟩. For y∈C2⊥, the inner sum is ∣C2∣. Otherwise choose u0∈C2 with y⋅u0=1; translation u↦u+u0 pairs terms with opposite signs, so the sum is zero.

2.1F1F3step 1.3algebra

Choose independent bases of C2 and C1⊥. Their separate X- and Z-type labels are independent: a zero combined label has both binary halves zero. By [F3] the combined number is dim⁡C2+n−dim⁡C1=n−k. This includes k=0.

3.1F1F8F9step 1.1step 1.2step 2.1construct

The checks are commuting Hermitian Paulis by steps 1.3 and [F5]. They fix the nonzero encoding from step 1.2, so their generated group cannot contain −I. Step 2.1 gives n−k independent checks; [F9] therefore gives their common +1 eigenspace dimension 2n−(n−k)=2k. By step 1.1 the encoding has dimension 2k, and step 1.2 says it lies in that eigenspace. Equal finite dimensions force equality: the CSS encoding is exactly the stabilizer code space [F8].

4.1F1F3step 1.4algebra∎

The transformed vector is supported exactly on C2⊥, with constant magnitude on that set. Since x∈C1, the phase (−1)x⋅y is constant on each coset of C1⊥ in C2⊥. Grouping terms by those cosets gives H⊗n∣x+C2⟩=2−k/2∑y+C1⊥∈C2⊥/C1⊥(−1)x⋅y∣y+C1⊥⟩. The coefficient is 2−k/2 because ∣C2∣∣C1⊥∣/2n=2−k by [F3]. This is the dual coset basis Fourier transform; the pairing is independent of representatives since C2⊆C1 and C1⊥⊆C2⊥.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Stabilizer encoder correctness

Statement

For every valid input of independent commuting signed Hermitian checks g0,…,gr−1 on n wires, let the symplectic-elimination encoder return the forward gate list D, its adjoint list D†, and signed row-operation data (M,κ). Thus M∈GL(r,F2) and, for each i, the exact input product Gi:=∏a=0r−1gaMia=P ⁣(κi,∑a=0r−1Miaxa,∑a=0r−1Miaza) has recorded phase κi∈Z/4Z and satisfies DGiD†=+Zi. Define the logical Hilbert space HL=(C2)⊗(n−r) and the encoding isometry V:HL→(C2)⊗n by V∣x⟩:=D†(∣0r⟩⊗∣x⟩),x∈F2n−r. The vectors V∣x⟩ form an orthonormal basis of the stabilizer code space, which has dimension 2n−r.

Facts & Assumptions

Given: A valid independent commuting signed Pauli check list on n ordered qubits, its phase-aware tableau, and the encoder output.

[F1]

Stabilizer encoder by symplectic elimination: the finite procedure records the chronological gate list and signed row-operation data (M,κ), with M∈GL(r,F2) and input-combination rows Gi=∏agaMia whose conjugates are +Zi.

[F2]

Termination and gate count of symplectic stabilizer elimination: the pivot loop terminates after r pivots on every valid input.

[F3]

Hadamard pauli action: H conjugates X to Z and Z to X with the exact phase update.

[F4]

Phase gate pauli action: S and its adjoint have the displayed exact phase-aware Pauli actions.

[F5]

CNOT Pauli action: CNOT conjugation has the stated control-target binary update and tracks phase.

[F6]

Stabilizer projector and code dimension: the input common +1 eigenspace has dimension 2n−r.

[F7]

Finite circuit syntax and ordered wire labels: each gate occurrence specifies its ordered wire tuple, and the circuit records finite layers with their chronological order.

[F8]

Denotational semantics of a finite layered circuit: a chronological layer list L1,…,Ld denotes ULd⋯UL1 on the ordered register.

[F9]

The computational basis is orthonormal: the ordered computational basis of each finite qubit register is orthonormal.

Proof

1.1F1F2F3F4F5F7F8construct

The procedure terminates after r pivots on every valid input by [F2]. By [F7]–[F8], each appended local gate acts on its ordered wires and the chronological list denotes its composed unitary. Each tableau coordinate and circuit wire q corresponds to supplier factor q+1, as fixed in [F1]; in particular, one-wire updates use factor q+1 and a CNOT on circuit wires q,s uses supplier control and target indices q+1,s+1. At each pivot, the local H, S†, and H transformations send the pivot row's nonidentity one-wire Pauli factors to signed Z factors. The S† step sends Y to X by the inverse phase-gate action [F4], and then [F3] sends X to Z. For each remaining pivot-row Zq, the control-q, target-j CNOT changes the pivot label ZqZj to Zj by [F5]. If the resulting row is negative, Xj changes −Zj to +Zj. Conjugation preserves commutation, while the exact phase-aware gate actions track every resulting sign.

2.1F1F7F8step 1.1algebra

Interchanging the selected pivot row into position j and each subsequent row multiplication are invertible elementary operations on the generator list; the former swaps rows of M and G, and the latter updates them by the same binary row addition and exact Pauli product. Thus M remains invertible and Gi=∏agaMia retains its recorded phase κi. Row multiplication by the pivot clears the remaining row's Zj coordinate because that row has no Xj coordinate: it commutes with the now-Zj pivot. Consequently the transformed input-product rows are exactly +Z0,…,+Zr−1, as asserted by [F1].

3.1F1F8step 2.1algebra

A vector is fixed by every Zj for j<r exactly when all its computational-basis coordinates with a 1 among the first r bits vanish. Thus the common +1 eigenspace of the canonical checks is ∣0r⟩⊗(C2)⊗(n−r). By the row-basis equivalence in step 2.1 and the denotation [F8], this is exactly DC(S).

4.1F1F6F7F8F9step 3.1algebra∎

The ordered computational basis is orthonormal by [F9], and x↦∣0r⟩⊗∣x⟩ embeds the logical computational basis as an orthonormal family. The finite product unitary D† from [F8] therefore defines the isometry V in the Statement and sends these 2n−r vectors to orthonormal vectors in C(S). Step 3.1 shows they span that space, and [F6] confirms its dimension is 2n−r. Hence they form the stated stabilizer code basis.

Remarks

The ordered wire tuple and chronological product in [F7]–[F8] are the only circuit-semantic interfaces used; the finite list is viewed as singleton layers in that syntax.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Dimension of the logical Pauli quotient

Statement

Let n≥1 and let S be an n-qubit stabilizer group generated by r independent commuting Hermitian Pauli checks with −I∉S. Then the logical Pauli quotient N(S)/(ZnS) is a binary vector space of dimension 2(n−r). Consequently, it is nontrivial exactly when the stabilizer code encodes at least one qubit.

Facts & Assumptions

Given: n≥1, a stabilizer subgroup S, its binary symplectic label space, and the normalizer/logical quotient convention.

[F1]

Binary Pauli label and quotient: quotienting phase-aware Paulis by the scalar center identifies their binary labels with Vn=F22n.

[F2]

Stabilizer labels form an isotropic space of the same rank: the label image W of S is an isotropic subspace of dimension r.

[F3]

Pauli commutator is symplectic pairing: a Pauli commutes with every element of S exactly when its label belongs to W⊥.

[F4]

Stabilizer syndromes and logical Pauli operators: the logical quotient is N(S)/(ZnS).

[F5]

Stabilizer projector and code dimension: the code dimension is 2n−r, so the encoded-qubit count is k=n−r.

[F6]

Binary symplectic form: ω is nondegenerate on Vn and dim⁡Vn=2n.

[F7]

If dim⁡FV=n and U is a linear subspace of V, then U is finite-dimensional, dim⁡FU≤n, and dim⁡FU=n if and only if U=V: every linearly independent subset of a finite-dimensional subspace extends to a basis, with no choice principle.

[F8]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: the dimension of a finite-dimensional domain is the sum of the kernel dimension and image dimension.

[F9]

The dual family of a finite basis is a basis of the dual space, with the same dimension: the algebraic dual of a finite-dimensional space has the same dimension.

Proof

1.1F1F2F3F4

By [F1], phase classes of Paulis are the vectors of Vn. By [F2] the stabilizer labels form an r-dimensional subspace W. The commutator criterion [F3] identifies the normalizer labels exactly with W⊥. The scalar phases label zero, so the subgroup ZnS has image W. Therefore N(S)/(ZnS) is identified with W⊥/W.

1.2F6F7F8F9construct

The nondegenerate pairing [F6] gives an injective map J:Vn→Vn∗, J(v)=ω(v,⋅). Restricting functionals from Vn to W is onto: extend a basis of W to one of Vn by [F7], then extend each functional by assigning zero to the added basis vectors. Since dim⁡Vn∗=dim⁡Vn=2n by [F9], injectivity and rank-nullity [F8] make J onto. Thus the composite Vn→W∗ is onto; its codomain has dimension r by [F9], and its kernel is W⊥. By [F8], dim⁡W⊥=2n−r.

2.1F2F5step 1.2algebra∎

Since W⊆W⊥, the quotient dimension is dim⁡(W⊥/W)=(2n−r)−r=2(n−r). By [F5], k=n−r is the number of encoded qubits; hence this dimension is 2k, which is zero exactly when k=0.

DefinitionDefinition: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Stabilizer distance

Definition

Let n≥1 and let S be a stabilizer code on n qubits whose code space has dimension 2k. The stabilizer distance is

d(S):=min⁡{wt⁡(E):E∈N(S)∖ZnS}if k>0.

This is a set difference: it excludes scalar-phase multiples of stabilizers. If k=0, define d(S)=+∞, since there is no nontrivial logical Pauli class.

Facts & Assumptions

Given: A finite stabilizer group S on n qubits, its logical Pauli quotient, and the quotient weight inherited from Pauli support.

[F1]

Dimension of the logical Pauli quotient: when the code encodes k qubits, N(S)/(ZnS) has binary dimension 2k.

[F2]

Support and weight of an operator on a finite register: every Pauli has a well-defined integer weight between 0 and n.

Verification

1.1F1F2construct

If k>0, [F1] gives a quotient of positive dimension, so it contains a nonidentity class. Any representative is a Pauli in the finite group Pn, and [F2] assigns it an integer weight in {0,…,n}. Thus the set in the minimum is nonempty and finite, so its minimum exists.

2.1F1algebra∎

If k=0, [F1] gives a zero-dimensional binary quotient, hence the quotient is trivial and N(S)=ZnS. Therefore the set difference defining the finite-distance branch is empty, which is why the definition assigns +∞.

Remarks

The weight is the number of physical qubits on which the Pauli is nonidentity. Scalar phases do not change it. The product set N(S)S is not the definition of logical nontriviality; the relevant set is N(S)∖ZnS.

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

CSS syndrome correction

Statement

Let n≥1, C2⊆C1≤F2n be a nested CSS pair, and t∈Z≥0. For a binary code C, define the local correction radius δ(C):=d(C) when C≠{0} and δ({0}):=+∞; the classical distance keeps the convention d({0})=n+1. Define

dX=min⁡{wt⁡(x):x∈C1∖C2},dZ=min⁡{wt⁡(z):z∈C2⊥∖C1⊥},

where the minimum of an empty set is +∞. Put dCSS=min⁡(dX,dZ). The separate syndrome decoders for the X and Z components correct every Pauli error supported on at most t qubits when 2t<min⁡(δ(C1),δ(C2⊥)). Under the same inequality, every finite error channel whose Kraus operators lie in the span of weight-at-most-t Pauli operators satisfies the Knill–Laflamme condition and admits an exact recovery. The quantum distance of this CSS stabilizer is dCSS.

Facts & Assumptions

Given: n≥1, a nested pair C2⊆C1≤F2n, its CSS coset encoding and check operators, and the ordered circuit/measurement interfaces specified below.

[F1]

CSS encoding dimension and commutation: the coset states form an isometric encoding equal to the common +1 eigenspace; X checks from C2 and Z checks from C1⊥ commute and fix each encoded state. It also gives the dual-coset Hadamard transform supported on C2⊥/C1⊥.

[F2]

Bilinear dual of a finite-field linear code: C⊥ consists of vectors whose dot product with every vector of C is zero.

[F3]

Dimension of the binary dual code: dim⁡C⊥=n−dim⁡C.

[F4]

Classical distance gives error detection, unique decoding, and erasure recovery: equal parity-check syndromes force errors to differ by a codeword; two errors of weight at most t with 2t<d(C) are equal.

[F5]

CNOT and Control-Target Order: a CNOT with data bit a as control sends an ancilla target bit b to b⊕a.

[F6]

Exact one-qubit gates and rotations: H exchanges the one-qubit X and Z actions on the computational basis.

[F7]

Quantum code as an isometric encoding and its code projector: an isometric encoding V has code subspace im⁡V and orthogonal projector P=VV∗.

[F8]

An explicit syndrome recovery corrects a Knill–Laflamme error family: if PEa∗EbP=CabP for every pair of Kraus errors of a finite channel, a finite exact recovery channel exists.

[F9]

Stabilizer distance: if the code encodes a qubit, its stabilizer distance is the least weight in N(S)∖ZnS; for a zero-qubit code the distance convention is +∞.

[F10]

Pauli commutator is symplectic pairing: two Paulis commute exactly when their binary symplectic pairing is zero.

[F11]

Stabilizer syndromes and logical Pauli operators: the normalizer is the Pauli centralizer of the checks, and logical classes quotient by scalar-phase stabilizers.

[F12]

Phase aware n qubit pauli group: every Pauli is ikXuZv for a scalar phase and binary vectors u,v.

[F13]

The Pauli matrices: I,X,Y,Z are the stated one-qubit matrices, with the stated Hermitian Y convention.

[F14]

Ordered tensor registers, their inner product, and wire permutations: ordered tensor products identify local Pauli products with operators on the full register.

[F15]

Support and weight of an operator on a finite register: an operator supported on a set of qubits acts locally there and as identity elsewhere; Pauli weight is the number of nonidentity sites.

[F16]

Hamming weight and distance of a finite-field linear code: binary vector weight is the number of nonzero coordinates; the classical distance of the zero code is the finite sentinel n+1.

[F17]

Finite circuit syntax and ordered wire labels: circuit wires and local gate slots are ordered, and a circuit is a finite chronological list of layers with its first layer applied first.

[F18]

Denotational semantics of a finite layered circuit: a circuit with chronological layers L1,…,Ld denotes ULd⋯UL1.

[F19]

Finite measurement branches and classical control: a finite controller may use the observed instrument outcome to select a specified finite unitary suffix; hidden Kraus indices are not observed outcomes.

[F20]

Finite projective measurements: a finite projective measurement is a finite family of orthogonal projections summing to identity, with outcome weight tr⁡(ρPa).

[F21]

Projective measurement outcome weights are probabilities: these projective outcome weights are nonnegative and sum to one.

[F22]

Conditional state for a projective measurement: for an outcome of positive weight, the conditional state is PaρPa/pa.

[F23]

The computational basis is orthonormal: distinct computational basis vectors are orthogonal unit vectors.

[F24]

Generator and parity-check matrices over a finite field: a parity-check matrix H for a code C has ker⁡H=C; its rows are independent, so when C={0} it is an invertible n×n matrix.

Proof

1.1F5F17F18construct

Choose a basis h1,…,ha of C1⊥. For an error Xu, append ancillas ∣0a⟩ and, for each i and each coordinate j with (hi)j=1, apply CNOT from data wire j to ancilla i. On a computational-basis input ∣y⟩∣0a⟩, repeated use of [F5] gives ∣y⟩∣H1y⟩, where the ith parity is hi⋅y. Ordered wire placement and chronological gate composition are fixed by [F17]–[F18].

2.1F1F2F3F14F18F19F20F21F22F23step 1.1algebra

For a code basis vector ∣x+C2⟩, each y=x+c belongs to C1, so hi⋅y=0. For the combined Pauli error ikXuZv, its action on ∣y⟩ is ik(−1)v⋅y∣y+u⟩. The parity circuit therefore writes H1(y+u)=H1u into the ancillas. The factor (−1)v⋅y changes only the data amplitude, so the first syndrome extraction is unchanged by the Zv component; it factors the state as a data density operator σ tensored with ∣s⟩⟨s∣, where s=H1u. The circuit maps are unitary by [F18], so tr⁡(σ)=1. The kernel of y↦(hi⋅y)i is (C1⊥)⊥: symmetry gives C1⊆(C1⊥)⊥, and [F3] gives equality of dimensions. By [F14] and [F23], Pr=Idata⊗∣r⟩⟨r∣ are pairwise orthogonal projections summing to identity, hence form a projective measurement by [F20]. Its weights are probabilities by [F21]; because Ps(σ⊗∣s⟩⟨s∣)Ps=σ⊗∣s⟩⟨s∣ and Pr(σ⊗∣s⟩⟨s∣)Pr=0 for r≠s, [F20] gives weight 1 at s and 0 elsewhere. [F22] leaves the data factor unchanged. The observed syndrome is H1u, and the classical controller receives it by [F19].

3.1F1F2F5F6F14F17F18F19F20F21F22F23step 2.1construct

Choose a basis c1,…,cb of C2. Apply H to every data wire, perform the parity circuit using the ci as parity rows, measure the ancillas, and then apply H again unconditionally. The combined error ikXuZv is conjugated by these Hadamards to ikZuXv, since [F6] exchanges X and Z on each wire. The Fourier identity in [F1] shows the transformed encoded state is supported on C2⊥, so the C2 parity vector is zero before the error. After the error, each supported basis word y∈C2⊥ is shifted to y+v, giving ancilla parity H2v; the diagonal factor Zu changes only its data amplitude and leaves this parity unchanged. Thus the syndrome is independent of the logical coset and the state factors as a data density operator τ tensored with ∣H2v⟩⟨H2v∣. The parity map has kernel C2⊥ by [F2]. Its circuit is unitary, so tr⁡(τ)=1. For the b-bit ancilla register, Qr=Idata⊗∣r⟩⟨r∣ are the computational-basis projectors, so [F20]–[F21] give the unique outcome H2v with probability one. Since QH2v fixes the product state, QH2v(τ⊗∣H2v⟩⟨H2v∣)QH2v=τ⊗∣H2v⟩⟨H2v∣, and [F22] leaves the data factor unchanged. The unconditional final Hadamards return the data to the original basis with the same XuZv error, up to its original scalar phase. The finite controller records the observed syndrome by [F19].

4.1F2F4F24step 3.1step 2.1algebra

If X errors u,u′ of weight at most t have the same first syndrome, their difference u+u′ lies in C1, since the first parity-check kernel is C1 by [F24]. If C1={0}, this immediately gives u=u′. If C1≠{0}, then 2t<δ(C1)=d(C1) and [F4] gives u=u′. Likewise, equal second syndromes put v+v′ in C2⊥ by [F2] and the second parity-map kernel. If C2⊥={0}, then v=v′ directly; otherwise 2t<δ(C2⊥)=d(C2⊥) and [F4] gives equality. Thus each observed syndrome with a weight-at-most-t error has at most one such error. For any syndrome with no such error, assign the zero vector as a default; this defines each total finite decoder, including the zero-code cases.

5.1F1F10F12F15F19step 3.1step 2.1step 4.1algebra

A Pauli error has the form ikXuZv by [F12], and [F15] shows that the supports of u and v lie among the same at-most-t physical sites. By [F10], the Z-check syndrome depends only on u and the X-check syndrome only on v, so the two decoders determine both components. The finite controller of [F19] applies the selected correction; applying ZvXu after the error returns every encoded vector to itself up to the scalar ik. Since both syndromes are independent of the logical basis label by steps 3.1 and 2.1, this correction preserves arbitrary superpositions.

6.1F1F2F3F9F10F11F12F15F16F25step 5.1algebra

Let S=⟨Xc:c∈C2; Zh:h∈C1⊥⟩, the group generated by the CSS checks in [F1]. They commute because c⋅h=0 for c∈C2⊆C1 and h∈C1⊥; their common code space is nonzero by [F1], so −I∉S. By [F10] and [F12], XuZv commutes with all X checks exactly when v∈C2⊥, and with all Z checks exactly when u∈(C1⊥)⊥. The inclusion C1⊆(C1⊥)⊥ follows from [F2]; [F3] gives both spaces dimension dim⁡C1, so [F25] gives (C1⊥)⊥=C1. Hence the normalizer condition is exactly u∈C1 and v∈C2⊥. The labels of ZnS are exactly pairs (c,h) with c∈C2 and h∈C1⊥, so logical triviality is exactly u∈C2 and v∈C1⊥. A nontrivial logical Pauli therefore has either u∈C1∖C2 or v∈C2⊥∖C1⊥. Its weight is at least dCSS, and each nonempty difference set supplies a pure logical Pauli attaining its own minimum. If k=0, inclusion C2⊆C1 and equality of their dimensions give C1=C2 by [F25]; their duals are equal, both difference sets are empty, and dCSS=+∞. The sufficient condition in the Statement implies 2t<dCSS because each pure logical weight is at least the minimum nonzero weight of its containing code. When k>0, the least nontrivial logical Pauli weight is the stabilizer distance by [F9]; when k=0, both sets are empty and the distance convention is +∞. The physical support of XuZv is supp⁡(u)∪supp⁡(v) by [F15], and its binary-vector weights are given by [F16].

7.1F1F7F9step 6.1algebra

Let P be the code projector. If a Pauli F of weight less than dCSS anticommutes with a check g, then [F1] gives gP=Pg=P, so PFP=PgFP=−PFgP=−PFP and hence PFP=0. If it commutes with all checks, step 6.1 and the definition of dCSS force it to be a scalar-phase stabilizer, so PFP=λP.

8.1F7F13F14F15F23step 7.1algebra

For Pauli errors Ea,Eb of weight at most t, the product Ea∗Eb has weight at most 2t<dCSS, so step 7.1 gives PEa∗EbP=CabP. On one qubit, direct substitution of [F13] gives the matrix-unit identities ∣0⟩⟨0∣=(I+Z)/2, ∣1⟩⟨1∣=(I−Z)/2, ∣0⟩⟨1∣=(X+iY)/2, and ∣1⟩⟨0∣=(X−iY)/2. For bit strings a,b∈{0,1}n, the global matrix unit ∣a⟩⟨b∣ is the tensor product of these one-qubit matrix units; expanding that product expresses it as a linear combination of tensor Pauli operators. Every operator A on the ordered computational basis has the matrix-unit expansion A=∑a,b⟨Aeb,ea⟩ ∣a⟩⟨b∣, so the tensor Paulis span the full operator space. By [F14]–[F15], every operator supported on at most t sites is a linear combination of Paulis of weight at most t. Bilinearity extends the scalar-compression condition to every pair of such Kraus operators.

9.1F8step 8.1∎

The finite scalar-compression matrix from step 8.1 satisfies the hypothesis of [F8]. Hence the channel has an exact finite recovery.

Remarks

The parity circuits are read as finite one-gate layers in the ordered-wire semantics of [F17]–[F18]. The ancilla readout uses projectors on the parity register; the factorized output makes the syndrome deterministic, and [F22] shows the data factor is unchanged. The controller uses only the measured syndrome as its finite branch label, as specified by [F19].

TheoremStatement: AI-adaptedProof: AI-generatedjudge pass (gpt-6-luna)Open item page →

Square planar surface-code distance and path count

Statement

For the relative d×d square patch of Square planar surface code, the code encodes one logical qubit and has stabilizer distance d. Every nontrivial Z logical class contains a rough-to-rough path of length at least d, and a straight row attains d. Every nontrivial X logical class contains a top-to-bottom dual path of length at least d+1. For each ℓ≥1, the number of self-avoiding rough-to-rough paths of length ℓ is at most (d+1)3ℓ.

Facts & Assumptions

Given: The relative boundary matrices of the square patch, its CSS stabilizer, and the logical Pauli quotient convention.

[F1]

Square planar surface code: the d×d relative grid has 2d2 physical edges with left and right rough boundary edges removed; the maps satisfy ∂1∂2=0, X checks are rows of ∂1, and Z checks are face boundaries with rough edges deleted.

[F2]

CSS encoding dimension and commutation: if C2⊆C1, the CSS code encodes dim⁡C1−dim⁡C2 qubits, with X checks from C2 and Z checks from C1⊥.

[F3]

Stabilizer syndromes and logical Pauli operators: a Pauli is in the normalizer exactly when it commutes with every stabilizer generator; logical Paulis are the normalizer modulo scalar phases and stabilizers.

[F4]

Stabilizer distance: distance is the minimum Pauli weight in N(S)∖ZnS when the code encodes a qubit.

[F5]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: for a finite matrix, the dimension of its domain is the sum of its kernel dimension and rank.

[F6]

Pauli commutator is symplectic pairing: two Pauli operators commute exactly when their binary symplectic pairing is zero.

[F7]

Generator and parity-check matrices over a finite field: a matrix row specifies a binary support vector in the declared coordinate order.

Proof

1.1F1givenalgebra

The grid has d(d+1) horizontal and d(d+1) vertical edges. Removing the 2d rough vertical edges leaves n=2d2 physical edges. The grid has (d+1)2 vertices, of which the two rough sides contain 2(d+1) distinct vertices; hence Q0 has (d−1)(d+1)=d2−1 coordinates. There are d2 faces.

1.2F1givenalgebra

The columns of ∂2 are independent. If a face combination b∈Q2 has zero boundary, its coefficient on each top horizontal physical edge is the coefficient of the unique face immediately below that edge, so all top-row face coefficients vanish. On the next horizontal row, each boundary coefficient is the sum of the face coefficients immediately above and below; the already-zero top row forces the next row to vanish. Repeating downward gives b=0. Hence rank⁡∂2=d2.

1.3F1algebra

A self-avoiding left-to-right path starts with one of the d+1 horizontal edges from a left rough vertex into the patch. At each subsequent vertex the square grid has at most four incident edges, and the edge just used cannot be immediately traversed backwards, leaving at most three choices. Thus for length ℓ≥1 there are at most (d+1)3ℓ−1≤(d+1)3ℓ such paths.

2.1F1step 1.1algebra

The rows of ∂1 are independent. Indeed, a linear combination of rows with coefficients av that vanishes on every physical edge has au+av=0 at the endpoints of each such edge, where av=0 on R. Every vertex outside R is connected to R by a horizontal path of physical edges, so these equations force every av=0.

3.1F8step 1.2step 2.1algebra

For a finite binary matrix A with p independent rows, its map into F2p is onto. Otherwise its image is a proper subspace; by [F8], extend a basis of that image to a basis of F2p and choose an added basis vector w. Define a linear functional to be 1 on w and 0 on every other vector of this basis. It is nonzero and vanishes on the image. In standard coordinates it is dot product with a nonzero coefficient vector, which gives a nontrivial linear combination of the rows of A equal to zero, a contradiction. Thus the map rank is p. Apply this argument to ∂1, using step 2.1, and to ∂2T, whose rows are independent because they are the transposes of the independent columns of ∂2 from step 1.2. Hence rank⁡∂1=d2−1 and rank⁡∂2T=d2; also rank⁡∂2=d2 by the independent columns in step 1.2.

4.1F2F5F7step 2.1step 3.1algebra

Put C2=row⁡(∂1) and C1=ker⁡(∂2T). The chain identity from Square planar surface code gives C2⊆C1. The independent rows in step 2.1 give dim⁡C2=d2−1, and [F5] with the map rank from step 3.1 gives dim⁡C1=2d2−rank⁡(∂2T)=d2. The CSS dimension theorem [F2] therefore gives k=dim⁡C1−dim⁡C2=1.

4.2F1F3F5F6F8step 1.1step 3.1

A Z-type Pauli with edge support z commutes with every X check exactly when ∂1z=0, so its support is a relative cycle. The Z-type stabilizers are exactly im⁡∂2, hence Z logical classes are ker⁡∂1/im⁡∂2. The chain identity gives im⁡∂2⊆ker⁡∂1. Extend a basis of im⁡∂2 to a basis of ker⁡∂1 using [F8]; the added basis vectors project to a basis of the quotient, since they span it and no nonzero combination of them lies in im⁡∂2. Therefore dim⁡(ker⁡∂1/im⁡∂2)=dim⁡ker⁡∂1−dim⁡im⁡∂2. By [F5], step 1.1 and step 3.1 give dim⁡ker⁡∂1=n−rank⁡∂1=2d2−(d2−1)=d2+1 and dim⁡im⁡∂2=rank⁡∂2=d2, so the quotient dimension is 1.

5.1F1F3step 4.2algebra

For a relative cycle z, let qi(z) be the parity of its selected horizontal edges between columns i and i+1, for i=0,…,d−1. Summing the relative vertex-boundary equations over columns 1,…,i cancels every interior edge twice and leaves only the two cut sets, so q0(z)=qi(z). Each face boundary has either zero or two horizontal edges in a given column strip, so qi vanishes on im⁡∂2. The straight horizontal row z0 has qi(z0)=1 for every i, and is therefore not a relative boundary. Since the quotient in step 4.2 is one-dimensional, every nonzero Z logical class has all qi=1; it must contain at least one horizontal edge in each of the d disjoint strips. Thus its weight is at least d, and z0 attains d.

6.1step 5.1constructalgebra

In the edge subgraph of a relative cycle, every vertex outside R has even degree, so all odd-degree vertices lie in R. The handshake identity ∑vdeg⁡(v)=2∣E∣ shows there are an even number of them. Add one dummy vertex joined to each odd boundary vertex; every degree in the augmented finite graph is now even. Starting with any unused edge, follow unused edges: at a vertex other than the start, the number of used incident edges is odd, so its even total degree leaves an unused edge. Finiteness therefore closes the trail at its start. Removing this closed trail preserves even degrees; repeating decomposes all edges into closed trails. Deleting dummy edges leaves cycles and paths with endpoints in R. Across any vertical cut, a cycle crosses evenly and a path crosses oddly exactly when its endpoints lie on opposite sides. Since qi=1, at least one path joins the left and right rough sides. Removing repeated-vertex loops leaves a self-avoiding such path contained in the support. It crosses each of the d disjoint vertical cuts, so its length is at least d.

6.2F1F2F3F6step 4.1step 4.2step 5.1algebra

For X-type supports, use the dual graph with one vertex per face and top and bottom exterior vertices, and one dual edge crossing each physical primal edge. The normalizer condition makes each face vertex even-degree, and X checks are the dual boundaries around vertices outside R. Their quotient has dimension dim⁡(C1/C2)=1 by step 4.1. A straight dual path from top to bottom is in the normalizer because it enters and leaves each face, and it crosses the straight Z logical row once. Since that Z cycle commutes with every X check, this odd intersection shows the dual path is not an X check; it represents the nonzero class.

7.1F1F3step 6.1step 6.2algebra

For an X support x, let qj′(x) be the parity of selected horizontal primal edges in row j, for j=0,…,d. Each X stabilizer has either zero or two such edges in each row, so every qj′ vanishes on the X stabilizer space. The straight dual path from step 6.2 has qj′=1 for all j. Since the X logical quotient is one-dimensional, every nontrivial class has qj′=1 in each of the d+1 disjoint rows. Its weight is therefore at least d+1. In the dual support graph every face vertex has even degree, so the finite even-degree decomposition from the path argument in step 6.1, now with top and bottom exterior vertices as boundary vertices, splits it into cycles and paths ending at those exterior vertices. A cycle and a path with both endpoints at the same exterior vertex cross each horizontal cut evenly; since every qj′=1, at least one path joins top to bottom. Every such path has length at least d+1, and the straight dual path attains this bound.

8.1F4step 4.1step 5.1step 6.1step 7.1algebra∎

Step 5.1 and step 6.1 show that every nontrivial Z logical support contains a self-avoiding left-to-right path, so the path count bounds the number of candidate logical paths of each length. Step 5.1 and step 7.1 give minimum nontrivial Z and X logical weights d and d+1, respectively. For a general normalizer Pauli iaXxZz, the CSS commutation equations require Xx and Zz separately to normalize the checks. If both components are scalar-phase stabilizers then so is their product, so a nontrivial general class has at least one nontrivial component. Its physical support contains the support of each component, since an overlap gives a nonidentity Y factor rather than cancellation. Thus its weight is at least min⁡(d,d+1)=d, and the straight Z row attains d. Since k=1 by step 4.1, [F4] gives stabilizer distance d.

Remarks

The count is a combinatorial upper bound on candidate paths, not a decoding failure probability. The proof uses the exact relative cellulation and no diagram.

TheoremStatement: AI-adaptedProof: AI-generatedOpen item page →

Stabilizer distance detection and correction

Statement

Let n≥1 and let S be a stabilizer code on n qubits of distance d(S). Every Pauli error E of weight less than d(S) either acts as a scalar on the code space (when E∈ZnS) or is detected by some stabilizer check. A finite error channel whose Kraus operators lie in the span of Pauli operators of weight at most t, for t∈Z≥0, is correctable whenever 2t<d(S). In particular, all unknown Pauli errors of weight at most t are correctable.

Facts & Assumptions

Given: n≥1, an n-qubit stabilizer code with projector P, distance d(S), and a finite family of Pauli or bounded-support error operators.

[F1]

Stabilizer distance: if the code dimension is 2k with k>0, d(S) is the minimum weight of a normalizer Pauli outside ZnS. If k=0, the logical quotient is trivial, so N(S)=ZnS and d(S)=+∞.

[F2]

Stabilizer syndromes and logical Pauli operators: a Pauli outside the normalizer anticommutes with at least one stabilizer generator.

[F3]

Stabilizer code space: the code space is the common +1 eigenspace of every stabilizer element.

[F4]

Stabilizer projector and code dimension: P is the orthogonal projector onto the common +1 eigenspace; for every stabilizer g, gP=Pg=P.

[F5]

An explicit syndrome recovery corrects a Knill–Laflamme error family: if PEa∗EbP=CabP for a finite channel's Kraus operators, a finite exact recovery exists.

[F6]

The Pauli matrices: the matrices I,X,Y,Z are the exact one-qubit Pauli basis matrices.

[F7]

Ordered tensor registers, their inner product, and wire permutations: ordered product bases identify tensor products of one-qubit operators with operators on the physical register.

[F8]

Support and weight of an operator on a finite register: support is the set of qubits on which an operator can act nontrivially, and Pauli weight is its support size.

Proof

1.1F1F2F3F4algebra

Let E be a Pauli of weight less than d(S). The code space is the common fixed space by [F3], and [F4] gives P=Pg=gP for each g∈S. If E anticommutes with some g∈S, then PEP=PgEP=−PEgP=−PEP and hence PEP=0. If instead E commutes with every g, then E∈N(S). For k>0, its weight is below the minimum in [F1], forcing E∈ZnS; for k=0, the same conclusion follows from N(S)=ZnS. Writing E=zs gives PEP=zP. Thus every such Pauli has scalar code-space compression, and every nonzero one not in the scalar-phase stabilizer is detected.

2.1F1F4F5F6F7F8step 1.1algebra

Enumerate the m≥1 tensor Paulis of weight at most t with factors in {I,X,Y,Z} as E1,…,Em; scalar phases do not affect correction. For any pair, the support of Ea∗Eb lies in the union of their supports, so its weight is at most 2t<d(S). Step 1.1 gives PEa∗EbP=CabP for a scalar Cab. Let V be the inclusion of the nonzero code space, so P=VV∗ by [F4]. Each Ea is unitary by the matrices in [F6] and their tensor action [F7], so Fa=Ea/m are Kraus operators of the channel N(A)=m−1∑aEaAEa∗: each summand is a unitary conjugation and ∑aFa∗Fa=I. Applying [F5] to PFa∗FbP=(Cab/m)P gives a recovery R. Its off-diagonal formula gives R(EaVXV∗Ea∗)=CaaX=X, since Ea∗Ea=I. Thus this single recovery corrects every Pauli in the family.

3.1F4F5F6F7F8step 2.1algebra∎

On one qubit every matrix A=(abcd) has the expansion A=a+d2I+b+c2X+c−b2iY+a−d2Z, as direct substitution of [F6] verifies. In the ordered one-qubit basis, the matrix units satisfy ∣0⟩⟨0∣=(I+Z)/2, ∣1⟩⟨1∣=(I−Z)/2, ∣0⟩⟨1∣=(X+iY)/2, and ∣1⟩⟨0∣=(X−iY)/2. For bit strings a,b∈{0,1}n, [F7] identifies the global matrix unit ∣a⟩⟨b∣ with the tensor product of the corresponding one-qubit matrix units, so each global matrix unit is a linear combination of tensor Pauli operators. Every endomorphism has its matrix-unit expansion A=∑a,b⟨Aeb,ea⟩ ∣a⟩⟨b∣ in this ordered computational basis; hence tensor Pauli operators span the full operator space. An operator supported on a fixed set of at most t qubits is a linear combination of the tensor Paulis that are identity off that set, so each term has weight at most t. For Kraus operators Kμ=∑auμaEa in the stated span, PKμ∗KνP=(∑a,buμa‾uνbCab)P by step 2.1. The code is nonzero by [F4], so [F5] applies to this actual finite channel and gives exact recovery.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

Steane seven-qubit CSS code

Example

Let the columns of the binary parity-check matrix be the seven nonzero vectors 110,101,011,111,100,010,001:

H=(110110010110100111001).

Put C1=ker⁡H and C2=row⁡(H). A generator matrix for C1 is GT, where the row-basis matrix G is

G=(1000110010010100100110001111).

The encoded basis is

∣0L⟩=8−1/2∑c∈C2∣c⟩,∣1L⟩=8−1/2∑c∈C2∣1110000+c⟩.

The six stabilizer checks are the three X operators with supports given by the rows of H, followed by the three Z operators with the same supports. The logical operators may be taken as XL=X1110000 and ZL=Z1110000. For site j, write hj for column j of H. With the stated generator order, the three single-site syndromes are

s(Xj)=(000,hj),s(Zj)=(hj,000),s(Yj)=(hj,hj).

Facts & Assumptions

Given: The displayed binary matrices, the standard dot product, and the Pauli matrices on the ordered seven-qubit register.

[F1]

Generator and parity-check matrices over a finite field: a parity-check matrix H defines the code ker⁡H, and its independent rows span the bilinear dual of that code.

[F2]

CSS encoding dimension and commutation: nested binary codes give orthonormal coset states, with commuting X and Z checks.

[F3]

Stabilizer syndromes and logical Pauli operators: a syndrome bit records whether an error anticommutes with its ordered Hermitian generator.

[F4]

Stabilizer projector and code dimension: r independent stabilizer checks on n qubits have code dimension 2n−r.

[F5]

CSS syndrome correction: the separate CSS syndromes identify and correct the bounded-weight X and Z components under the stated distance inequality.

[F6]

Dimension of the binary dual code: for a binary code in length n, dim⁡C⊥=n−dim⁡C.

Verification

1.1F1algebra

The columns of H are the seven distinct nonzero elements of F23, so they span F23 and rank⁡H=3. The first four columns of G form the identity matrix, so G has full row rank 4. Direct coordinate dot products give HGT=0, so the row space of G lies in ker⁡H. Rank-nullity gives dim⁡ker⁡H=7−3=4; therefore row⁡(G)=C1 and dim⁡C1=4.

2.1F1F2F6step 1.1algebra

The rows of H are independent because rank⁡H=3. Their pairwise dot products are zero: each row has weight four and every two distinct rows overlap in two coordinates. Hence HHT=0, so C2⊆C1 and dim⁡C2=3. The quotient dimension is k=4−3=1. Every vector in C1=ker⁡H is orthogonal to every row of H, so C1⊆C2⊥; both dimensions are 4 by step 1.1 and [F6], so C1=C2⊥. Also HGT=0 and C1=row⁡(G), so C2=row⁡(H)⊆C1⊥; both dimensions are 3, hence C2=C1⊥.

2.2F1step 1.1algebra

No weight-one vector lies in C1 because every column of H is nonzero. No weight-two vector lies in C1 because its syndrome is the sum of two distinct columns, which is nonzero. The vector x=1110000 is in C1 because h1+h2+h3=0. Thus d(C1)=3.

3.1F1F2F3step 2.1algebra

Every nonzero word of C2 is a nonzero linear functional evaluated on the seven nonzero vectors of F23. Such a functional is 1 on exactly four of the eight vectors, and is 0 on the zero vector, so every nonzero word of C2 has weight four. Therefore x∉C2, XL and ZL represent nontrivial logical classes, and their commutator is (−1)x⋅x=(−1)3=−1.

3.2F2F4step 2.1algebra

The row spaces of H used for the X and Z checks commute because HHT=0. Their six labels are independent: the three X-type labels are independent among themselves, the three Z-type labels are independent among themselves, and the two label halves are separate. Hence r=6 and [F4] gives code dimension 27−6=2. These checks stabilize the two displayed coset states by [F2].

4.1F3F5step 2.1step 2.2step 3.2algebra∎

The columns h1,…,h7 are nonzero and pairwise distinct. By steps 2.1 and 2.2, d(C1)=d(C2⊥)=3, so [F5] applies with t=1. The syndrome formulas in the Example follow by counting the overlaps between Xj,Zj,Yj and each ordered check. The three syndrome blocks distinguish the Pauli type, and within each type the nonzero distinct column hj identifies the site. Thus all 21 single-site Pauli errors have distinct syndromes and are corrected by [F5].

Sources