MerLean-example

23 Lem 1: Deformed Code Stabilizer Structure

The following operators form a generating set of stabilizer checks for the deformed (gauged) code:

  1. Gauss’s law operators: \(A_v = X_v \prod _{e \ni v} X_e\) for all \(v \in V_G\).

  2. Flux operators: \(B_p = \prod _{e \in p} Z_e\) for a generating set of cycles \(\{ p\} \) of \(G\).

  3. 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\).

Definition 735 Gauging Measurement
#

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\)).

Definition 736 Pauli Correction Needed
#

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\)).

Definition 737 Corrected Outcomes
#

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.

Theorem 738 Gauss Law Becomes Stabilizer via Measurement

After measurement and Pauli corrections, every Gauss law operator \(A_v\) has eigenvalue \(+1\). That is, for all \(v \in V\):

\[ \mathrm{correctedOutcomes}(G, m)(v) = 0. \]
Proof

Let \(v \in V\) be arbitrary. By definition, \(\mathrm{correctedOutcomes}(G, m)(v) = 0\). This holds by reflexivity (definitional equality).

Theorem 739 Gauss Law Mutual Commutativity

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\):

\[ \omega (A_v, A_w) \bmod 2 = 0. \]
Proof

Let \(v, w \in V\). This follows directly from gaussLaw_commute.

Theorem 740 Gauss Law Self-Inverse

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\):

\[ 2 \cdot (\text{gaussLawOperator\_ vertexSupport}\; G\; v\; w) = 0. \]
Proof

Let \(v, w \in V\). This follows directly from gaussLaw_hermitian.

Theorem 741 Part 1: \(A_v\) Operators Become Stabilizers

Given a graph \(G\) and a gauging measurement \(m\), the following three properties hold:

  1. After measurement and corrections, all \(A_v\) have eigenvalue \(+1\): \(\forall v \in V,\; \mathrm{correctedOutcomes}(G, m)(v) = 0\).

  2. All \(A_v\) mutually commute: \(\forall v, w \in V,\; \omega (A_v, A_w) = 0\).

  3. Each \(A_v\) is self-inverse: \(\forall v, w \in V,\; 2 \cdot \mathrm{gaussLawOperator\_ vertexSupport}(G, v, w) = 0\).

Proof

We prove each part:

  1. The first claim follows from gaussLaw_becomes_stabilizer_via_measurement.

  2. The mutual commutativity follows from gaussLaw_symplectic_zero.

  3. 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}\).

Theorem 742 Flux Initial Eigenvalue

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}\):

\[ \sum _{e \in \mathrm{cycles}(p)} \mathrm{initialEdgeStabilizerOutcome}(e) = 0. \]
Proof

By simplification using the definition of \(\mathrm{initialEdgeStabilizerOutcome}\) (which is \(0\) for each edge in the \(|0\rangle \) state), the sum evaluates to \(0\).

Theorem 743 Cycle-Vertex Incidence is Even

For a valid cycle \(p\) and any vertex \(v\), the number of cycle edges incident to \(v\) is even:

\[ |\mathrm{cycleEdgesIncidentTo}(G, p, v)| \equiv 0 \pmod{2}. \]

(If \(v \notin p\): \(0\) edges incident; if \(v \in p\): exactly \(2\) edges incident.)

Proof

This follows directly from cycleEdgesIncidentTo_card_even applied to \(G\), \(p\), \(v\), and the validity hypothesis \(h_{\mathrm{valid}}(v)\).

Theorem 744 Flux Commutes with Gauss Law

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:

\[ \forall v \in V, \quad \omega (B_p, A_v) \bmod 2 = 0. \]
Proof

This follows directly from flux_commutes_with_all_gaussLaw applied to \(G\), \(p\), and the validity hypothesis.

Theorem 745 Part 2: \(B_p\) is a Stabilizer

Given that \(p\) is a valid cycle (each vertex has \(0\) or \(2\) incident edges from \(p\)), the following hold:

  1. \(B_p\) has initial eigenvalue \(+1\) on \(|0\rangle ^{\otimes E}\).

  2. \(B_p\) commutes with all measured operators \(A_v\).

Therefore \(B_p\) remains a stabilizer after the gauging measurement.

Proof

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\).

Definition 746 Original Code State
#

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.

Definition 747 Original Eigenvalue Assumption

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\)).

Theorem 748 Deformed Check Commutes with \(A_v\)

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:

\[ \forall v \in V, \quad \omega _{\mathrm{simple}}(\widetilde{s}, A_v) \bmod 2 = 0. \]
Proof

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.

Theorem 749 Deformed Check Eigenvalue

The deformed check \(\widetilde{s}_j\) has eigenvalue \(+1\) on the initial state \(|\psi \rangle |0\rangle ^{\otimes E}\):

\[ \underbrace{0}_{\text{original stabilizer}} + \sum _{e \in \gamma } \underbrace{\mathrm{initialEdgeStabilizerOutcome}(e)}_{= 0} = 0. \]
Proof

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\).

Theorem 750 Part 3: \(\widetilde{s}_j\) is a Stabilizer

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:

  1. \(\widetilde{s}_j\) commutes with all \(A_v\) (by the boundary condition).

  2. \(\widetilde{s}_j\) has eigenvalue \(+1\) on \(|\psi \rangle |0\rangle ^{\otimes E}\).

Therefore \(\widetilde{s}_j\) is a stabilizer of the deformed code.

Proof

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\).

Definition 751 Code Parameters
#

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\).

Definition 752 Stabilizer Count

The number of independent stabilizers in an \([[n, k]]\) code is \(n - k\).

Definition 753 Code Dimension
#

The dimension of an \([[n, k]]\) code is \(2^k\).

Theorem 754 Gauss Law Product Equals \(L\)

The product constraint \(\prod _v A_v = L\) holds:

  1. 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\)).

  2. Edge support: all \(0\)s (each edge appears twice, \(X_e^2 = I\)), i.e., \(\mathrm{gaussLaw\_ product\_ edgeSupport}(G) = 0\).

Proof

This follows directly from gaussLaw_product_is_L.

Theorem 755 Gauss Law Gives \(|V|\) Stabilizers

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\):

  1. \(\mathrm{gaussLaw\_ independent\_ count}(G) = |V| - 1\),

  2. \(\mathrm{gaussLaw\_ product\_ vertexSupport}(G) = v \mapsto 1\).

Proof

The result is the conjunction of gaussLaw_independent_count_eq (applied with the hypothesis \(|V| \geq 1\)) and gaussLaw_product_vertexSupport_all_ones.

Theorem 756 Flux Generator Count (Euler’s Formula)

For a connected graph satisfying \(|V| \leq |E|\) and \(|C| = |E| - |V| + 1\) (Euler’s formula):

\[ |C| = |E| - |V| + 1. \]
Proof

This follows directly from euler_formula_cycles applied with the edge count and cycle count hypotheses.

Definition 757 Total Qubits in Deformed System
#

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.

Definition 758 Total Stabilizers in Deformed System
#

The total number of independent stabilizers in the deformed system is

\[ |E| + (n - k) + 1, \]

arising from \(|V|\) Gauss law stabilizers, \(|E| - |V| + 1\) flux stabilizers, and \(n - k\) deformed checks.

Theorem 759 Part 4: Dimension Formula

Given an original \([[n, k]]\) code with \(n \geq k\) and \(k \geq 1\):

\[ \underbrace{(n + |E|)}_{\text{total qubits}} - \underbrace{(|E| + (n-k) + 1)}_{\text{total stabilizers}} = k - 1. \]
Proof

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).

Theorem 760 Deformed Code Dimension

Given \(n \geq k\) and \(k \geq 1\):

\[ 2^{(\text{total\_ qubits'} - \text{total\_ stabilizers'})} = 2^{k-1}. \]
Proof

Rewriting using part4_dimension_formula (which shows the exponent equals \(k - 1\)), the result follows immediately.

Theorem 761 Dimension Halves
#

The dimension drops from \(2^k\) to \(2^{k-1}\), exactly halving. For \(k \geq 1\):

\[ 2^{k-1} = \frac{2^k}{2}. \]
Proof

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\)).

Theorem 762 One Logical Measured
#

One logical qubit (\(L\)) has been measured. For \(k \geq 1\):

\[ k - (k - 1) = 1. \]
Proof

This follows by integer arithmetic (omega) from the hypothesis \(k \geq 1\).

Complete Theorem: Deformed Code Structure

Definition 763 Deformed Code Setup

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:

  1. 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\).

  2. 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\).

  3. 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\).

  4. Part 4: The dimension is \(2^{k-1}\):

    \[ \mathrm{total\_ qubits'} - \mathrm{total\_ stabilizers'} = k - 1. \]
Proof

We prove each of the seven conjuncts:

  1. Part 1a (corrected outcomes are all \(+1\)): This follows from gaussLaw_becomes_stabilizer_via_measurement.

  2. Part 1b (all \(A_v\) commute): This follows from gaussLaw_symplectic_zero.

  3. Part 2a (\(B_p\) initial eigenvalues): For each cycle \(p\), this follows from flux_initial_eigenvalue.

  4. 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)\)).

  5. 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)\).

  6. Part 3b (\(\widetilde{s}_j\) eigenvalues): For each \(j\), this follows from deformedCheck_eigenvalue applied to \(\mathrm{setup.paths}(j)\).

  7. Part 4 (dimension): This follows from part4_dimension_formula using \(\mathrm{code.n\_ ge\_ k}\) and \(\mathrm{setup.k\_ pos}\).

Theorem 765 \(L\) Becomes a Stabilizer

The logical operator \(L\) becomes a stabilizer (measured via \(\prod _v A_v\)):

\[ \mathrm{gaussLaw\_ product\_ vertexSupport}(G) = v \mapsto 1. \]
Proof

This follows directly from gaussLaw_product_vertexSupport_all_ones.

Theorem 766 New Stabilizer Count
#

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\).

Proof

Given \(|V| \leq |E|\), we have \(|V| + (|E| - |V| + 1) = |E| + 1\) by integer arithmetic (omega).

Corollaries

Theorem 767 Deformed Code Parameters

The deformed code is an \([[n + |E|, k - 1, d']]\) code. Specifically, given \(k \geq 1\):

  1. New qubit count: \(\mathrm{total\_ qubits'} = n + |E|\).

  2. New logical qubit count: \(k - 1\).

  3. Dimension formula: \(2^{(\mathrm{total\_ qubits'} - \mathrm{total\_ stabilizers'})} = 2^{k-1}\).

Proof

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\).

Theorem 768 Gauging Transforms Code

The gauging procedure transforms \([[n, k, d]] \to [[n + |E|, k - 1, d']]\). That is, for \(k \geq 1\):

\[ k - (k - 1) = 1, \]

confirming that exactly one logical qubit has been measured.

Proof

This follows directly from one_logical_measured applied to \(k\) and the hypothesis \(k \geq 1\).