23 Lem 1: Deformed Code Stabilizer Structure
The following operators form a generating set of stabilizer checks for the deformed (gauged) code:
Gauss’s law operators: \(A_v = X_v \prod _{e \ni v} X_e\) for all \(v \in V_G\).
Flux operators: \(B_p = \prod _{e \in p} Z_e\) for a generating set of cycles \(\{ p\} \) of \(G\).
Deformed checks: \(\widetilde{s}_j = s_j \prod _{e \in \gamma _j} Z_e\) for all checks \(s_j\) in the original code, where \(\gamma _j\) is an edge-path satisfying \(\partial \gamma _j = \mathcal{S}_{Z,j} \cap V_G\).
Moreover, the logical subspace of the deformed code has dimension \(2^{k-1}\), one qubit less than the original \(2^k\)-dimensional logical subspace, corresponding to the measured logical \(L\).
A gauging measurement for a graph \(G\) consists of a measurement outcome function \(\varepsilon : V \to \mathbb {Z}/2\mathbb {Z}\), recording the outcome \(\varepsilon _v \in \{ +1, -1\} \) for each Gauss law operator \(A_v\) (where \(0\) encodes \(+1\) and \(1\) encodes \(-1\)).
Given a gauging measurement \(m\), a Pauli correction \(X_v\) is needed at vertex \(v\) if and only if \(m.\mathrm{outcome}(v) = 1\) in \(\mathbb {Z}/2\mathbb {Z}\) (i.e., the measurement outcome was \(-1\)).
After applying the Pauli corrections, the corrected outcomes are the constant function \(v \mapsto 0\) for all \(v \in V\), representing that every \(A_v\) now has eigenvalue \(+1\).
Part 1: Gauss’s Law Operators Become Stabilizers
The \(A_v\) operators are explicitly measured during the gauging procedure. By the measurement postulate of quantum mechanics, after measuring \(A_v\) with outcome \(\varepsilon _v \in \{ +1, -1\} \), the state is projected into the \(\varepsilon _v\)-eigenspace of \(A_v\). By tracking outcomes (or applying conditional Pauli corrections \(X_v\) when \(\varepsilon _v = -1\)), we can ensure the code is in the \(+1\) eigenspace of all \(A_v\). Therefore, each \(A_v\) is a stabilizer of the deformed code.
After measurement and Pauli corrections, every Gauss law operator \(A_v\) has eigenvalue \(+1\). That is, for all \(v \in V\):
Let \(v \in V\) be arbitrary. By definition, \(\mathrm{correctedOutcomes}(G, m)(v) = 0\). This holds by reflexivity (definitional equality).
The \(A_v\) operators form a valid stabilizer group: all mutually commute. For X-type operators, the symplectic form is always \(0\) (no Z-support). Precisely, for all \(v, w \in V\):
Let \(v, w \in V\). This follows directly from gaussLaw_commute.
Each \(A_v\) is Hermitian with eigenvalues \(\pm 1\). In \(\mathbb {Z}/2\mathbb {Z}\): \(A_v^2 = I\) means \(2 \cdot \mathrm{support} = 0\). For all \(v, w \in V\):
Let \(v, w \in V\). This follows directly from gaussLaw_hermitian.
Given a graph \(G\) and a gauging measurement \(m\), the following three properties hold:
After measurement and corrections, all \(A_v\) have eigenvalue \(+1\): \(\forall v \in V,\; \mathrm{correctedOutcomes}(G, m)(v) = 0\).
All \(A_v\) mutually commute: \(\forall v, w \in V,\; \omega (A_v, A_w) = 0\).
Each \(A_v\) is self-inverse: \(\forall v, w \in V,\; 2 \cdot \mathrm{gaussLawOperator\_ vertexSupport}(G, v, w) = 0\).
We prove each part:
The first claim follows from gaussLaw_becomes_stabilizer_via_measurement.
The mutual commutativity follows from gaussLaw_symplectic_zero.
For the self-inverse property, let \(v, w \in V\). This follows directly from gaussLaw_hermitian.
Part 2: Flux Operators Are Stabilizers
We show \(B_p\) stabilizes the state in two steps.
Step 2a: The edge qubits start in \(|0\rangle ^{\otimes E_G}\). Since \(Z|0\rangle = (+1)|0\rangle \), we have \(B_p |0\rangle ^{\otimes E} = (+1)|0\rangle ^{\otimes E}\).
Step 2b: \(B_p\) commutes with all \(A_v\). The number of edges in cycle \(p\) incident to vertex \(v\) is always even (\(0\) if \(v \notin p\), \(2\) if \(v \in p\)), so the symplectic form is \(0 \pmod{2}\).
The initial eigenvalue of \(B_p\) is \(+1\): since \(Z|0\rangle = |0\rangle \), the eigenvalue is \(+1\) on the initial state \(|0\rangle ^{\otimes E}\). In \(\mathbb {Z}/2\mathbb {Z}\):
By simplification using the definition of \(\mathrm{initialEdgeStabilizerOutcome}\) (which is \(0\) for each edge in the \(|0\rangle \) state), the sum evaluates to \(0\).
For a valid cycle \(p\) and any vertex \(v\), the number of cycle edges incident to \(v\) is even:
(If \(v \notin p\): \(0\) edges incident; if \(v \in p\): exactly \(2\) edges incident.)
This follows directly from cycleEdgesIncidentTo_card_even applied to \(G\), \(p\), \(v\), and the validity hypothesis \(h_{\mathrm{valid}}(v)\).
For a valid cycle \(p\), \(B_p\) commutes with all \(A_v\). The symplectic form \(\omega (B_p, A_v)\) counts Z-X anticommutations, which equals the number of cycle edges incident to \(v\). This is always even:
This follows directly from flux_commutes_with_all_gaussLaw applied to \(G\), \(p\), and the validity hypothesis.
Given that \(p\) is a valid cycle (each vertex has \(0\) or \(2\) incident edges from \(p\)), the following hold:
\(B_p\) has initial eigenvalue \(+1\) on \(|0\rangle ^{\otimes E}\).
\(B_p\) commutes with all measured operators \(A_v\).
Therefore \(B_p\) remains a stabilizer after the gauging measurement.
We construct the conjunction directly: the first component follows from flux_initial_eigenvalue, and the second from flux_commutes_with_gaussLaw’ applied with the cycle validity hypothesis.
Part 3: Deformed Checks Are Stabilizers
We show that \(\widetilde{s}_j = s_j \cdot \prod _{e \in \gamma _j} Z_e\) commutes with all \(A_v\) operators.
Step 3a–3b: At vertex \(v\), the anticommutation contributions from \(s_j\) and from \(\prod _{e \in \gamma _j} Z_e\) are equal by the boundary condition \(\partial \gamma _j = \mathcal{S}_{Z,j} \cap V_G\), so the total is \(2 \times (\text{contribution}) \equiv 0 \pmod{2}\).
Step 3c: The original stabilizer \(s_j\) has eigenvalue \(+1\) on the code state (by definition), and each \(Z_e\) has eigenvalue \(+1\) on \(|0\rangle _e\), so \(\widetilde{s}_j\) has eigenvalue \(+1\).
An original code state encodes the input assumption that the original code state \(|\psi \rangle \) is in the \(+1\) eigenspace of all stabilizer generators. This is the defining property of stabilizer codes: the code space is the simultaneous \(+1\) eigenspace of all stabilizer generators.
The original stabilizer \(s_j\) has eigenvalue \(+1\) on the code state \(|\psi \rangle \). This is encoded as \(0 \in \mathbb {Z}/2\mathbb {Z}\) (representing \(+1\)).
Let \(s\) be a stabilizer check with no Z-support on edges (\(s.\mathrm{zSupportOnE} = \emptyset \)), and let \(\gamma \) be a valid deforming path with \(\partial \gamma = \mathcal{S}_{Z}(s) \cap V_G\). Then the boundary condition ensures anticommutations cancel:
This follows directly from deformedCheck_commutes_with_all_gaussLaw applied to \(G\), \(s\), \(\gamma \), the hypothesis that \(s\) has no Z-support on edges, and the path validity hypothesis.
The deformed check \(\widetilde{s}_j\) has eigenvalue \(+1\) on the initial state \(|\psi \rangle |0\rangle ^{\otimes E}\):
By simplification using the definitions of \(\mathrm{original\_ eigenvalue\_ assumption}\) (which equals \(0\)) and \(\mathrm{initialEdgeStabilizerOutcome}\) (which equals \(0\) for each edge), the sum evaluates to \(0 + 0 = 0\).
Given:
\(s_j\) is a stabilizer from the original code (no Z-support on edges),
\(\gamma \) is a valid deforming path with \(\partial \gamma = \mathcal{S}_{Z,j} \cap V_G\),
the original code state \(|\psi \rangle \) is a \(+1\) eigenstate of \(s_j\) (input assumption),
then:
\(\widetilde{s}_j\) commutes with all \(A_v\) (by the boundary condition).
\(\widetilde{s}_j\) has eigenvalue \(+1\) on \(|\psi \rangle |0\rangle ^{\otimes E}\).
Therefore \(\widetilde{s}_j\) is a stabilizer of the deformed code.
We construct the conjunction directly: the first component follows from deformedCheck_commutes_with_A applied to \(G\), \(s\), \(\gamma \), the no-edge-Z hypothesis, and path validity; the second component follows from deformedCheck_eigenvalue applied to \(G\) and \(\gamma \).
Part 4: Dimension Count
Original system: \(n\) qubits, \((n - k)\) independent stabilizers, code space dimension \(2^k\).
Deformed system:
Qubits: \(n + |E_G|\) (original qubits plus edge qubits).
Gauss law stabilizers: \(|V_G|\) operators \(A_v\), but \(\prod _v A_v = L\) (one constraint). So \((|V_G| - 1)\) independent, plus \(L\) becomes a stabilizer \(\Rightarrow \) \(|V_G|\) total.
Flux stabilizers: \(|E_G| - |V_G| + 1\) independent cycles (Euler’s formula).
Deformed checks: \((n - k)\) operators.
Total independent stabilizers \(= |V| + (|E| - |V| + 1) + (n - k) = |E| + n - k + 1\).
The parameters of an \([[n, k, d]]\) stabilizer code consist of:
\(n\): the number of physical qubits,
\(k\): the number of logical qubits,
a proof that \(n \geq k\).
The number of independent stabilizers in an \([[n, k]]\) code is \(n - k\).
The dimension of an \([[n, k]]\) code is \(2^k\).
The product constraint \(\prod _v A_v = L\) holds:
Vertex support: all \(1\)s (i.e., \(\mathrm{gaussLaw\_ product\_ vertexSupport}(G) = v \mapsto 1\), which equals the support of \(L = \prod _v X_v\)).
Edge support: all \(0\)s (each edge appears twice, \(X_e^2 = I\)), i.e., \(\mathrm{gaussLaw\_ product\_ edgeSupport}(G) = 0\).
This follows directly from gaussLaw_product_is_L.
Due to the constraint \(\prod _v A_v = L\), the number of independent \(A_v\) is \(|V| - 1\). However, \(L\) itself now becomes a stabilizer (it is the product of all \(A_v\) outcomes). Given \(|V| \geq 1\):
\(\mathrm{gaussLaw\_ independent\_ count}(G) = |V| - 1\),
\(\mathrm{gaussLaw\_ product\_ vertexSupport}(G) = v \mapsto 1\).
The result is the conjunction of gaussLaw_independent_count_eq (applied with the hypothesis \(|V| \geq 1\)) and gaussLaw_product_vertexSupport_all_ones.
For a connected graph satisfying \(|V| \leq |E|\) and \(|C| = |E| - |V| + 1\) (Euler’s formula):
This follows directly from euler_formula_cycles applied with the edge count and cycle count hypotheses.
The total qubit count in the deformed system is \(n + |E|\), where \(n\) is the number of original physical qubits and \(|E|\) is the number of edge qubits.
The total number of independent stabilizers in the deformed system is
arising from \(|V|\) Gauss law stabilizers, \(|E| - |V| + 1\) flux stabilizers, and \(n - k\) deformed checks.
Given an original \([[n, k]]\) code with \(n \geq k\) and \(k \geq 1\):
By unfolding the definitions of \(\mathrm{total\_ qubits'}\) and \(\mathrm{total\_ stabilizers'}\), the equation reduces to \((n + |E|) - (|E| + (n - k) + 1) = k - 1\), which simplifies to \(k - 1 = k - 1\). This follows by integer arithmetic (omega).
Given \(n \geq k\) and \(k \geq 1\):
Rewriting using part4_dimension_formula (which shows the exponent equals \(k - 1\)), the result follows immediately.
The dimension drops from \(2^k\) to \(2^{k-1}\), exactly halving. For \(k \geq 1\):
We first establish that \(k = (k-1) + 1\) (by integer arithmetic since \(k \geq 1\)). Rewriting the right-hand side using this, we obtain \(2^{(k-1)+1}/2 = 2^{k-1} \cdot 2 / 2 = 2^{k-1}\), using the fact that division by \(2\) cancels with multiplication by \(2\) (since \(0 {\lt} 2\)).
One logical qubit (\(L\)) has been measured. For \(k \geq 1\):
This follows by integer arithmetic (omega) from the hypothesis \(k \geq 1\).
Complete Theorem: Deformed Code Structure
A valid deformed code setup for a graph \(G\) and code parameters \(\mathrm{code}\) consists of:
The original stabilizer checks: \(\mathrm{checks} : \mathrm{Fin}(n-k) \to \mathrm{StabilizerCheck}(G)\).
Valid deforming paths for each check: \(\mathrm{paths}(j)\) is an edge path for each \(j\).
Original checks have no Z-support on edges: \(\forall j,\; \mathrm{checks}(j).\mathrm{zSupportOnE} = \emptyset \).
Paths satisfy the boundary condition: \(\forall j,\; \partial (\mathrm{paths}(j)) = \mathcal{S}_Z(\mathrm{checks}(j)) \cap V_G\).
All cycles in \(C\) are valid (geometric constraint).
\(|V| \geq 1\).
Euler’s formula holds: \(|C| = |E| - |V| + 1\).
Graph is connected: \(|V| \leq |E|\).
The original code has at least one logical qubit: \(k \geq 1\).
Given a valid deformed code setup, the following all hold:
Part 1: All \(A_v\) become stabilizers via measurement:
\(\forall v \in V,\; \mathrm{correctedOutcomes}(G, m)(v) = 0\),
\(\forall v, w \in V,\; \omega (A_v, A_w) = 0\).
Part 2: All \(B_p\) are stabilizers:
\(\forall p \in C,\; \sum _{e \in \mathrm{cycles}(p)} \mathrm{initialEdgeStabilizerOutcome}(e) = 0\),
\(\forall p \in C,\; \forall v \in V,\; \omega (B_p, A_v) \bmod 2 = 0\).
Part 3: All \(\widetilde{s}_j\) are stabilizers:
\(\forall j,\; \forall v \in V,\; \omega _{\mathrm{simple}}(\widetilde{s}_j, A_v) \bmod 2 = 0\),
\(\forall j,\; \mathrm{original\_ eigenvalue} + \sum _{e \in \gamma _j} \mathrm{initialEdgeStabilizerOutcome}(e) = 0\).
Part 4: The dimension is \(2^{k-1}\):
\[ \mathrm{total\_ qubits'} - \mathrm{total\_ stabilizers'} = k - 1. \]
We prove each of the seven conjuncts:
Part 1a (corrected outcomes are all \(+1\)): This follows from gaussLaw_becomes_stabilizer_via_measurement.
Part 1b (all \(A_v\) commute): This follows from gaussLaw_symplectic_zero.
Part 2a (\(B_p\) initial eigenvalues): For each cycle \(p\), this follows from flux_initial_eigenvalue.
Part 2b (\(B_p\) commutes with \(A_v\)): For each \(p\) and \(v\), this follows from flux_commutes_with_gaussLaw’ using the cycle validity from the setup (\(\mathrm{setup.cycles\_ valid}(p)\)).
Part 3a (\(\widetilde{s}_j\) commutes with \(A_v\)): For each \(j\) and \(v\), this follows from deformedCheck_commutes_with_A applied to \(\mathrm{setup.checks}(j)\), \(\mathrm{setup.paths}(j)\), the no-edge-Z hypothesis \(\mathrm{setup.checks\_ no\_ edge\_ Z}(j)\), and the path validity \(\mathrm{setup.paths\_ valid}(j)\).
Part 3b (\(\widetilde{s}_j\) eigenvalues): For each \(j\), this follows from deformedCheck_eigenvalue applied to \(\mathrm{setup.paths}(j)\).
Part 4 (dimension): This follows from part4_dimension_formula using \(\mathrm{code.n\_ ge\_ k}\) and \(\mathrm{setup.k\_ pos}\).
The logical operator \(L\) becomes a stabilizer (measured via \(\prod _v A_v\)):
This follows directly from gaussLaw_product_vertexSupport_all_ones.
The number of new stabilizers from gauging is:
\(|V| - 1\) independent \(A_v\) plus \(1\) for \(L\) gives \(|V|\) total from Gauss law,
\(|E| - |V| + 1\) from flux operators (Euler’s formula).
Total new stabilizers: \(|V| + (|E| - |V| + 1) = |E| + 1\).
Given \(|V| \leq |E|\), we have \(|V| + (|E| - |V| + 1) = |E| + 1\) by integer arithmetic (omega).
Corollaries
The deformed code is an \([[n + |E|, k - 1, d']]\) code. Specifically, given \(k \geq 1\):
New qubit count: \(\mathrm{total\_ qubits'} = n + |E|\).
New logical qubit count: \(k - 1\).
Dimension formula: \(2^{(\mathrm{total\_ qubits'} - \mathrm{total\_ stabilizers'})} = 2^{k-1}\).
The first two claims hold by reflexivity (definitional equality). The third follows from deformedCode_dimension_derived applied with \(\mathrm{code.n\_ ge\_ k}\) and \(k \geq 1\).
The gauging procedure transforms \([[n, k, d]] \to [[n + |E|, k - 1, d']]\). That is, for \(k \geq 1\):
confirming that exactly one logical qubit has been measured.
This follows directly from one_logical_measured applied to \(k\) and the hypothesis \(k \geq 1\).