Documentation

QEC1.Remarks.Rem_18_LatticeSurgeryAsGauging

Rem_18: Lattice Surgery as Gauging #

Statement #

Lattice surgery is a special case of gauging measurement. The gauging measurement can be interpreted as a direct generalization of lattice surgery for surface codes.

Example: Measuring X̄₁ ⊗ X̄₂ on a pair of equally sized surface code blocks using a ladder graph G joining the edge qubits produces:

  1. A deformed code that is again a surface code on the union of the two patches
  2. The final step of measuring out individual edge qubits matches conventional lattice surgery

Non-adjacent patches: Use a graph with a grid of dummy vertices between the two edges.

Generalization: Extends to any pair of matching logical X operators using two copies of graph G with bridge edges. G is allowed to have h(G) < 1 if path-length and cycle-weight desiderata are satisfied.

Insight: h(G) ≥ 1 is overkill; expansion is only needed for subsets of qubits relevant to the logical operators being measured.

Main Results #

Ladder Graph as a GraphWithCycles #

The ladder graph on n rungs has:

We build it as a GraphWithCycles to connect to the gauging framework (Gauss's law operators from Def_2, flux operators from Def_3).

Edge type for the ladder graph: horizontal rungs and vertical rails.

  • rung {n : } : Fin nLadderEdge n

    Horizontal rung connecting (false, i) to (true, i)

  • leftRail {n : } : Fin (n - 1)LadderEdge n

    Left vertical rail connecting (false, i) to (false, i+1)

  • rightRail {n : } : Fin (n - 1)LadderEdge n

    Right vertical rail connecting (true, i) to (true, i+1)

Instances For
    @[reducible, inline]

    Cycle type for the ladder: one square face for each pair of consecutive rungs.

    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.

      The adjacency relation for the ladder graph.

      Equations
      Instances For

        The ladder graph as a SimpleGraph.

        Equations
        Instances For

          Each ladder edge connects adjacent vertices.

          The cycles of the ladder: each square face consists of rung(i), rightRail(i), rung(i+1), leftRail(i).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Build the ladder as a GraphWithCycles to connect to the gauging framework.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Gauss's Law Product = Logical Operator (Gauging Measures L) #

              By Property 3 of Gauss's law operators (Def_2), ∏_v A_v = L. In binary vectors: the sum of all vertex supports equals the all-ones vector on the ladder vertices, which represents L = X̄₁ ⊗ X̄₂.

              This is the core mechanism making lattice surgery a gauging measurement: measuring all A_v and multiplying outcomes yields the eigenvalue of L.

              The sum of all Gauss's law vertex supports on the ladder is the all-ones vector. (Instantiation of gaussLaw_product_vertexSupport_all_ones from Def_2.)

              The edge support of the Gauss's law product is zero (edges cancel pairwise).

              Combining: ∏_v A_v = L on the ladder (vertex support = all-ones, edge support = 0).

              Deformed Code Structure on the Merged Patch #

              For the ladder with n rungs:

              The ladder has 2n vertices.

              The ladder has n rungs + 2(n-1) rails = 3n - 2 edges when n ≥ 1.

              The number of independent cycles in the ladder is n - 1.

              Each cycle (square face) of the ladder consists of exactly 4 edges.

              theorem QEC1.LatticeSurgeryAsGauging.ladder_deformed_code_generators (n : ) (_hn : n 2) :
              2 * n - 1 + (n - 1) = 3 * n - 2

              The deformed code has the correct generator counts for a surface code.

              Split Step: Measuring Out Edge Qubits Matches Conventional Surgery #

              theorem QEC1.LatticeSurgeryAsGauging.split_step_removes_gauge_qubits (rows cols : ) (_hr : rows 2) (_hc : cols 2) :
              2 * (rows * cols) + (3 * rows - 2) - (3 * rows - 2) = 2 * (rows * cols)

              After the split step, gauge qubits are discarded and only original code qubits remain.

              Non-Adjacent Patches via Dummy Grid #

              For non-adjacent patches, the gauging graph includes a grid of dummy vertices. The key property is that the dummy grid provides walks of bounded length between the left and right edges.

              A dummy grid bridges non-adjacent patches.

              Instances For

                Grid graph adjacency: unit-distance neighbors on the grid.

                Equations
                Instances For

                  For each row, there exists a horizontal walk of length gap_width + 1.

                  The dummy grid has rows × (gap_width + 2) total qubits.

                  The dummy qubits decompose: 2 * rows edge qubits + rows * gap_width dummy qubits.

                  Generalization: Two Copies of G with Bridge Edges #

                  For any pair of matching logical X operators on two code blocks, use two copies of graph G with additional bridge edges connecting corresponding vertices.

                  The combined graph for generalized lattice surgery: two copies of G with bridges.

                  Equations
                  Instances For

                    The combined graph is a valid SimpleGraph.

                    Equations
                    Instances For

                      The combined graph has 2|V| vertices.

                      theorem QEC1.LatticeSurgeryAsGauging.bridge_provides_cross_path {V : Type u_1} [DecidableEq V] [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (bridges : Finset (V × V)) (u v : V) (h : (u, v) bridges) :

                      Bridge edges provide direct cross-copy connections.

                      theorem QEC1.LatticeSurgeryAsGauging.intra_copy_adj_preserved {V : Type u_1} [DecidableEq V] [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (bridges : Finset (V × V)) (b : Bool) (u v : V) (h : G.Adj u v) :

                      Intra-copy adjacency is preserved.

                      Relaxed Expansion: h(G) ≥ 1 is Overkill #

                      The full Cheeger condition h(G) ≥ 1 constrains ALL subsets S ⊆ V with |S| ≤ |V|/2. For lattice surgery, expansion is only needed for subsets that intersect the logical operator's support supp(L). Subsets disjoint from supp(L) are irrelevant.

                      Relaxed expansion: |∂S| ≥ |S| required only for S intersecting logical support.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Full Cheeger expansion h(G) ≥ 1 implies relaxed expansion for any support.

                        theorem QEC1.LatticeSurgeryAsGauging.relaxed_expansion_vacuous_for_disjoint {V : Type u_1} [DecidableEq V] [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (logicalSupport S : Finset V) (_hS_pos : 0 < S.card) (_hS_size : 2 * S.card Fintype.card V) (hdisjoint : Disjoint S logicalSupport) :
                        ¬(S logicalSupport).Nonempty

                        Relaxed expansion is strictly weaker: subsets disjoint from logical support are unconstrained.

                        When logical support = full vertex set, relaxed expansion implies full expansion (both conditions coincide since every subset intersects the full vertex set).

                        Full expansion implies relaxed expansion (converse direction).

                        theorem QEC1.LatticeSurgeryAsGauging.exists_unconstrained_subset {V : Type u_1} [DecidableEq V] [Fintype V] (_G : SimpleGraph V) [DecidableRel _G.Adj] (logicalSupport : Finset V) (h_small : logicalSupport.card < Fintype.card V) :
                        ∃ (v : V), vlogicalSupport

                        When the total vertex count exceeds the logical support, there exist vertices outside the support (i.e., unconstrained by relaxed expansion).