Documentation

QEC1.Definitions.Def_4_DeformedCode

Definition 4: Deformed Code #

Statement #

The deformed code is the stabilizer code defined on the extended qubit system V ⊕ E(G), whose generating checks are:

  1. Gauss's law operators {A_v : v ∈ V} — X-type checks from Definition 2
  2. Flux operators {B_p : p ∈ C} — Z-type checks from Definition 2
  3. Deformed checks {s̃_j} — each original stabilizer check s_j is deformed

Main Results #

Corollaries #

Deformed Check #

def DeformedCode.deformedCheck {V : Type u_1} (G : SimpleGraph V) (s : PauliOp V) (γ : G.edgeSetZMod 2) :

Given an original check s and an edge-path γ satisfying the boundary condition, the deformed check is the deformed operator extension of s by γ.

Equations
Instances For

    If s has no Z-support on V, the deformed check with γ = 0 acts as s on vertex qubits and as identity on edge qubits.

    The deformed check commutes with Gauss's law when boundary condition holds.

    theorem DeformedCode.deformedCheck_mul_self {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] (s : PauliOp V) (γ : G.edgeSetZMod 2) :
    deformedCheck G s γ * deformedCheck G s γ = 1

    The deformed check is self-inverse.

    Deformed Code Data #

    structure DeformedCode.DeformedCodeData {V : Type u_1} [DecidableEq V] (G : SimpleGraph V) [Fintype G.edgeSet] {J : Type u_3} (checks : JPauliOp V) :
    Type (max u_1 u_3)

    The deformed code data: for each original check j, an edge-path γ_j and a proof that the boundary condition ∂γ_j = S_Z(s_j)|_V holds.

    Instances For

      The Three Families of Checks #

      Gauss's law checks on the extended system: A_v for each vertex v ∈ V.

      Equations
      Instances For
        def DeformedCode.fluxChecks {V : Type u_1} (G : SimpleGraph V) {C : Type u_2} (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (p : C) :

        Flux checks on the extended system: B_p for each cycle p ∈ C.

        Equations
        Instances For
          def DeformedCode.deformedOriginalChecks {V : Type u_1} [DecidableEq V] (G : SimpleGraph V) [Fintype G.edgeSet] {J : Type u_3} (checks : JPauliOp V) (data : DeformedCodeData G checks) (j : J) :

          Deformed original checks: s̃_j for each j ∈ J, using the edge-paths from data.

          Equations
          Instances For

            Check Index Type #

            inductive DeformedCode.CheckIndex (V : Type u_4) (C : Type u_5) (J : Type u_6) :
            Type (max (max u_4 u_5) u_6)

            The type of all checks in the deformed code: V ⊕ C ⊕ J.

            Instances For
              def DeformedCode.instDecidableEqCheckIndex.decEq {V✝ : Type u_4} {C✝ : Type u_5} {J✝ : Type u_6} [DecidableEq V✝] [DecidableEq C✝] [DecidableEq J✝] (x✝ x✝¹ : CheckIndex V✝ C✝ J✝) :
              Decidable (x✝ = x✝¹)
              Equations
              Instances For
                instance DeformedCode.instFintypeCheckIndex {V : Type u_1} {C : Type u_2} {J : Type u_3} [Fintype V] [Fintype C] [Fintype J] :
                Equations
                • One or more equations did not get rendered due to their size.

                All Checks Map #

                def DeformedCode.allChecks {V : Type u_1} [DecidableEq V] (G : SimpleGraph V) [Fintype G.edgeSet] {C : Type u_2} (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} (checks : JPauliOp V) (data : DeformedCodeData G checks) :

                The full set of checks for the deformed code.

                Equations
                Instances For

                  Pairwise Commutation: Gauss-Gauss #

                  Gauss's law checks commute with each other.

                  Pairwise Commutation: Flux-Flux #

                  theorem DeformedCode.allChecks_pairwise_commute_flux_flux {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (p q : C) :
                  (fluxChecks G cycles p).PauliCommute (fluxChecks G cycles q)

                  Flux checks commute with each other.

                  Pairwise Commutation: Gauss-Flux #

                  theorem DeformedCode.allChecks_pairwise_commute_gaussLaw_flux {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (hcyc : ∀ (c : C) (v : V), Even {e : G.edgeSet | e cycles c v e}.card) (v : V) (p : C) :

                  Gauss's law and flux checks commute.

                  Pairwise Commutation: Gauss-Deformed #

                  theorem DeformedCode.allChecks_pairwise_commute_gaussLaw_deformed {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (v : V) (j : J) :

                  Gauss's law checks commute with deformed original checks.

                  Pairwise Commutation: Deformed-Flux #

                  theorem DeformedCode.allChecks_pairwise_commute_deformed_flux {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (j : J) (p : C) :
                  (deformedOriginalChecks G checks data j).PauliCommute (fluxChecks G cycles p)

                  Deformed and flux checks commute. This holds because flux operators are pure Z-type and deformed checks have no X-support on edges.

                  Pairwise Commutation: Deformed-Deformed #

                  theorem DeformedCode.allChecks_pairwise_commute_deformed_deformed {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (hcomm : ∀ (i j : J), (checks i).PauliCommute (checks j)) (i j : J) :
                  (deformedOriginalChecks G checks data i).PauliCommute (deformedOriginalChecks G checks data j)

                  Deformed checks commute if the original checks commute. On edges both are pure Z-type (Z commutes with Z); on vertices the commutation is inherited from the original checks.

                  All Checks Commute #

                  theorem DeformedCode.allChecks_commute {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (hcyc : ∀ (c : C) (v : V), Even {e : G.edgeSet | e cycles c v e}.card) (hcomm : ∀ (i j : J), (checks i).PauliCommute (checks j)) (a b : CheckIndex V C J) :
                  (allChecks G cycles checks data a).PauliCommute (allChecks G cycles checks data b)

                  All checks in the deformed code pairwise commute.

                  Self-Inverse Properties #

                  Gauss's law checks are self-inverse: A_v * A_v = 1.

                  theorem DeformedCode.fluxChecks_mul_self {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (p : C) :
                  fluxChecks G cycles p * fluxChecks G cycles p = 1

                  Flux checks are self-inverse: B_p * B_p = 1.

                  theorem DeformedCode.deformedOriginalChecks_mul_self {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (j : J) :
                  deformedOriginalChecks G checks data j * deformedOriginalChecks G checks data j = 1

                  Deformed original checks are self-inverse: s̃_j * s̃_j = 1.

                  theorem DeformedCode.allChecks_self_inverse {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (a : CheckIndex V C J) :
                  allChecks G cycles checks data a * allChecks G cycles checks data a = 1

                  All checks in the deformed code are self-inverse.

                  Type Classification #

                  Gauss's law checks are pure X-type: no Z-support.

                  theorem DeformedCode.fluxChecks_pure_Z {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (p : C) :
                  (fluxChecks G cycles p).xVec = 0

                  Flux checks are pure Z-type: no X-support.

                  theorem DeformedCode.deformedOriginalChecks_no_xSupport_on_edges {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (j : J) (e : G.edgeSet) :
                  (deformedOriginalChecks G checks data j).xVec (Sum.inr e) = 0

                  Deformed checks have no X-support on edge qubits.

                  Product of Gauss's Law Checks Equals Logical #

                  The product of all Gauss's law checks equals the logical operator L.

                  Constructors for DeformedCodeData #

                  def DeformedCode.mkDeformedCodeData {V : Type u_1} [DecidableEq V] (G : SimpleGraph V) [Fintype G.edgeSet] {J : Type u_3} (checks : JPauliOp V) (edgePaths : JG.edgeSetZMod 2) (hbc : ∀ (j : J), DeformedOperator.BoundaryCondition G (checks j) (edgePaths j)) :

                  Constructor: given edge-paths and boundary proofs, build DeformedCodeData.

                  Equations
                  Instances For
                    def DeformedCode.mkDeformedCodeData_noZSupport {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {J : Type u_3} (checks : JPauliOp V) (hnoZ : ∀ (j : J), DeformedOperator.HasNoZSupportOnV (checks j)) :

                    Constructor for when all original checks have no Z-support on V: set all edge-paths to zero.

                    Equations
                    Instances For

                      Weight of Flux Checks #

                      theorem DeformedCode.fluxChecks_weight {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] (p : C) :
                      (fluxChecks G cycles p).weight = {e : G.edgeSet | e cycles p}.card

                      The weight of flux check B_p equals the number of edges in the cycle p.

                      Anchor Definition: deformedCodeChecks #

                      def DeformedCode.deformedCodeChecks {V : Type u_1} [DecidableEq V] (G : SimpleGraph V) [Fintype G.edgeSet] {C : Type u_2} (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} (checks : JPauliOp V) (data : DeformedCodeData G checks) :

                      The generating checks for the deformed code on the extended qubit system V ⊕ E(G). This is the main definition from Definition 4 of the paper.

                      Equations
                      Instances For
                        @[simp]
                        theorem DeformedCode.deformedCodeChecks_gaussLaw {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (v : V) :
                        @[simp]
                        theorem DeformedCode.deformedCodeChecks_flux {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (p : C) :
                        deformedCodeChecks G cycles checks data (CheckIndex.flux p) = fluxChecks G cycles p
                        @[simp]
                        theorem DeformedCode.deformedCodeChecks_deformed {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Fintype G.edgeSet] {C : Type u_2} [Fintype C] [DecidableEq C] (cycles : CSet G.edgeSet) [(c : C) → DecidablePred fun (x : G.edgeSet) => x cycles c] {J : Type u_3} [Fintype J] [DecidableEq J] (checks : JPauliOp V) (data : DeformedCodeData G checks) (j : J) :
                        deformedCodeChecks G cycles checks data (CheckIndex.deformed j) = deformedOriginalChecks G checks data j