Rem_21: CSS Code Initialization as Gauging #
Statement #
Standard CSS code initialization can be implemented via hypergraph gauging.
Standard initialization: A CSS code is typically initialized by preparing |0⟩^⊗n and measuring all X-type checks.
Gauging formulation:
- Start with a trivial code having one dummy vertex for each X-type check of the target CSS code
- Perform the generalized gauging measurement using the hypergraph corresponding to the Z-type checks of the CSS code
- The ungauging step performs readout measurement of Z on all qubits
Steane-style measurement via gauging: The state preparation and readout gauging procedure can be combined with another gauging measurement to implement a Steane-style measurement of a stabilizer group:
- Perform state preparation of an ancilla code block via gauging as described above
- Perform a gauging measurement of XX on pairs of matching qubits between the data code block and the ancilla code block
- Perform the ungauging step to read out Z on all ancilla qubits
This connection shows that many existing fault-tolerant gadgets can be unified under the gauging framework.
Formalization Approach #
We formalize the algebraic content underlying CSS initialization as gauging:
- CSS code structure with X-type and Z-type checks satisfying orthogonality
- The Z-check initialization hypergraph
- Core theorem: CSS orthogonality implies X-checks lie in ker(H_Z), making them measurable via the hypergraph gauging procedure
- Dummy vertex structure for the trivial starting code
- Steane-style measurement: data + ancilla blocks with pairwise XX operators
Main Results #
CSSCode: CSS code structure with X and Z type checksCSSCode.initHypergraph: The Z-check initialization hypergraphCSSCode.xCheckVector: X-check support as a binary vectorCSSCode.xCheck_in_kernel: X-checks are in ker(H_Z) by CSS orthogonalityCSSCode.xCheck_measurable: X-checks are measurable via hypergraph gaugingCSSCode.xCheck_sum_measurable: Sums of X-checks are measurable (closure)CSSInitVertex: Vertex type for initialization (qubits + dummies)cssInitVertex_card: Total vertices = n + numXChecksSteaneVertex: Vertex type for Steane measurement (data + ancilla)steaneVertex_card: Total Steane vertices = 2npairwiseXXSupport: Support of XX operator on matching qubit pairspairwiseXX_weight: Each XX operator has weight 2
Section 1: CSS Code Structure #
A CSS (Calderbank-Shor-Steane) code has two types of check generators:
- X-type checks: products of X operators (define X-stabilizers)
- Z-type checks: products of Z operators (define Z-stabilizers)
The CSS condition requires: every X-check commutes with every Z-check. In binary vector language: |supp(X_check) ∩ supp(Z_check)| ≡ 0 (mod 2).
A CSS code with separate X-type and Z-type checks satisfying orthogonality.
- numQubits : ℕ
Number of physical qubits
- numXChecks : ℕ
Number of X-type check generators
- numZChecks : ℕ
Number of Z-type check generators
At least one qubit
- xCheckSupport : Fin self.numXChecks → Finset (Fin self.numQubits)
Support of X-type check i (qubits where X acts)
- zCheckSupport : Fin self.numZChecks → Finset (Fin self.numQubits)
Support of Z-type check j (qubits where Z acts)
- xCheck_nonempty (i : Fin self.numXChecks) : (self.xCheckSupport i).Nonempty
X-checks have non-empty support
- zCheck_nonempty (j : Fin self.numZChecks) : (self.zCheckSupport j).Nonempty
Z-checks have non-empty support
- css_orthogonality (i : Fin self.numXChecks) (j : Fin self.numZChecks) : (self.xCheckSupport i ∩ self.zCheckSupport j).card % 2 = 0
CSS orthogonality: |supp(X_i) ∩ supp(Z_j)| ≡ 0 (mod 2) for all i, j
Instances For
Weight of the i-th X-type check
Equations
- C.xCheckWeight i = (C.xCheckSupport i).card
Instances For
Weight of the j-th Z-type check
Equations
- C.zCheckWeight j = (C.zCheckSupport j).card
Instances For
X-check weights are positive
Z-check weights are positive
Section 2: Initialization Hypergraph #
For CSS initialization via gauging, the Z-type checks define the hypergraph:
- Vertices = physical qubits (Fin n)
- Hyperedges = supports of Z-type checks (Fin numZChecks)
This hypergraph encodes the "gauging structure" for initialization.
The initialization hypergraph: vertices are qubits, hyperedges are Z-check supports.
Equations
- C.initHypergraph = { incidence := C.zCheckSupport }
Instances For
The initialization hypergraph has numQubits vertices
The initialization hypergraph has numZChecks hyperedges
Section 3: X-Checks in Kernel of H_Z #
The key algebraic fact: CSS orthogonality ensures that every X-type check is in the kernel of the Z-check parity-check map (H_Z).
This is why gauging with the Z-check hypergraph allows measuring X-checks: operators in ker(H_Z) commute with all Z-type hyperedge operators.
The i-th X-check as a binary vector on qubits: 1 at qubit v if v ∈ supp(X_i)
Equations
- C.xCheckVector i v = if v ∈ C.xCheckSupport i then 1 else 0
Instances For
Core Theorem: X-checks are in the kernel of the initialization hypergraph.
H_Z(x_i)j = ∑{v ∈ supp(Z_j)} x_i(v) = |supp(X_i) ∩ supp(Z_j)| (mod 2) = 0
This follows directly from CSS orthogonality.
X-checks are measurable via the hypergraph gauging procedure.
Sum (XOR) of X-checks is also in the kernel (closure under addition).
The zero vector is always in the kernel.
Section 4: Dummy Vertex Structure #
In the gauging interpretation, we start with a "trivial code" having one dummy vertex per X-type check. Each dummy corresponds to an X-check measurement. The dummy vertices are initialized in |+⟩ and have no effect on the gauging outcome (measuring X on |+⟩ always returns +1).
Vertex type for CSS initialization: physical qubits plus one dummy per X-check
- qubit {C : CSSCode} : Fin C.numQubits → CSSInitVertex C
- dummy {C : CSSCode} : Fin C.numXChecks → CSSInitVertex C
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fintype instance for CSSInitVertex
Equations
- One or more equations did not get rendered due to their size.
Total initialization vertices = physical qubits + dummies (one per X-check)
A predicate distinguishing dummy vertices
Equations
Instances For
There are exactly numXChecks dummy vertices
Section 5: Gauging Procedure for Initialization #
The three-step gauging procedure for CSS initialization:
Step 1: Start with a trivial code. The dummy vertices represent the X-check generators. The initialization state is |0⟩^⊗n on qubits and |+⟩ on dummies.
Step 2: Perform generalized gauging with Z-check hypergraph. This measures the generalized Gauss's law operators A_v = X_v ∏_{e ∋ v} X_e. Since X-checks are in ker(H_Z), they are preserved by the gauging.
Step 3: Ungauging readout: measure Z on all qubits.
The key algebraic property connecting these steps is that X-checks being in ker(H_Z) means they are measurable via the gauging procedure.
The gauging procedure for CSS initialization introduces numZChecks new qubits (one per hyperedge = one per Z-check).
The gauging procedure introduces numQubits new checks (one Gauss law operator A_v per qubit vertex).
The sum of all Gauss law vertex supports equals the all-ones vector, representing L = ∏_v X_v (the product of all X operators).
Section 6: Steane-Style Measurement via Gauging #
Steane's method for fault-tolerant measurement of a stabilizer group:
- Initialize ancilla code block via CSS gauging (as above)
- Perform gauging measurement of XX on matching qubit pairs between data and ancilla blocks
- Ungauge to read out Z on all ancilla qubits
We formalize the data/ancilla block structure and the pairwise XX operators.
Vertex type for Steane measurement: data block + ancilla block, both with n qubits
- data {n : ℕ} : Fin n → SteaneVertex n
- ancilla {n : ℕ} : Fin n → SteaneVertex n
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fintype instance for SteaneVertex
Equations
- One or more equations did not get rendered due to their size.
DecidableEq for SteaneVertex needed downstream
Total Steane vertices = 2n (data block + ancilla block)
Pairwise XX operator support: 1 on data[i] and ancilla[i], 0 elsewhere. Represents the XX operator on matching qubit pairs for Steane measurement.
Equations
Instances For
Weight of pairwise XX operator is 2: each XX acts on exactly 2 qubits.
All pairwise XX operators commute with each other (they are X-type operators).
Section 7: Steane Gauging Hypergraph #
The Steane measurement can be formulated as a gauging measurement using a hypergraph on the combined data + ancilla vertex set. The hyperedges are the pairwise XX connections between matching qubits.
The Steane gauging hypergraph: vertices are data + ancilla qubits, hyperedges correspond to pairwise XX connections.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Each hyperedge of the Steane hypergraph has exactly 2 vertices.
The Steane hypergraph is graph-like (all edges have size 2).
The all-ones vector on all Steane vertices is in the kernel (each edge has even cardinality).
Section 8: Three-Step Steane Procedure as Gauging #
The complete Steane-style measurement decomposes into three gauging steps:
State preparation: Initialize ancilla code block via CSS gauging (prepare |0⟩^⊗n, gauge with Z-check hypergraph to measure X-checks)
Entangling step: Gauge with pairwise XX between data and ancilla (this is equivalent to transversal CNOT in Steane's original)
Readout: Ungauge by measuring Z on all ancilla qubits
We formalize the key algebraic property: the composition of these steps preserves the measurability of the stabilizer group.
The three steps of Steane measurement via gauging.
- statePreparation : SteaneGaugingStep
- entanglingMeasurement : SteaneGaugingStep
- readout : SteaneGaugingStep
Instances For
Equations
- One or more equations did not get rendered due to their size.
There are exactly 3 steps in the Steane gauging procedure.
The readout step measures Z on ancilla qubits only (not data qubits).
Equations
Instances For
Readout support is nonzero only on ancilla qubits
The number of qubits measured in readout is n (all ancilla qubits).
Section 9: Unification Under Gauging Framework #
The key insight: standard fault-tolerant gadgets (CSS initialization, Steane measurement) are special cases of the hypergraph gauging framework from Rem_15.
CSS initialization is a special case of hypergraph gauging: the Z-check hypergraph has the property that all X-checks are in its kernel (measurable group).
The measurable group for CSS initialization contains all X-check combinations.
The Steane gauging hypergraph is 2-local (graph-like).
Combining CSS initialization and Steane measurement: the pairwise XX operators have even overlap with the Steane hypergraph (since each XX acts on exactly one vertex per edge).
Sum of all pairwise XX operators is the all-ones vector (product of all XX).
Summary #
This formalization captures Remark 21 about CSS code initialization as gauging:
Definitions:
CSSCode: CSS code structure with X-type and Z-type checks + orthogonalityCSSCode.initHypergraph: The Z-check initialization hypergraphCSSCode.xCheckVector: X-check support as binary vectorCSSInitVertex: Qubit + dummy vertex type for initializationSteaneVertex: Data + ancilla vertex type for Steane measurementsteaneHypergraph: The pairwise XX gauging hypergraphSteaneGaugingStep: The three steps of Steane measurement
Key Results:
xCheck_in_kernel: CSS orthogonality ⟹ X-checks ∈ ker(H_Z)xCheck_sum_in_kernel: Kernel closed under addition (XOR of X-checks)cssInitVertex_card: Total initialization vertices = n + numXCheckssteaneVertex_card: Total Steane vertices = 2npairwiseXX_weight: Each XX operator has weight 2pairwiseXX_in_steane_kernel: XX operators are in the Steane hypergraph kernelsum_pairwiseXX_is_allOnes: Product of all XX gives the logical operatorsteane_is_2local: Steane hypergraph is 2-local (graph-like)