Documentation

QEC1.Remarks.Rem_1_StabilizerCodeConvention

Rem_1: Stabilizer Code Convention #

Statement #

Throughout this work, we consider an $[[n,k,d]]$ quantum low-density parity-check (qLDPC) stabilizer code on $n$ physical qubits, encoding $k$ logical qubits with distance $d$. The code is specified by a set of stabilizer checks $\{s_i\}$. A logical operator $L$ is a Pauli operator that commutes with all stabilizers but is not itself a stabilizer. By choosing an appropriate single-qubit basis for each physical qubit, we ensure that the logical operator $L$ being measured is a product of Pauli-$X$ matrices: $L = \prod_{v \in \text{supp}(L)} X_v$, where $\text{supp}(L)$ denotes the set of qubits on which $L$ acts non-trivially.

Main Definitions #

Key Properties #

Pauli Operators #

inductive StabPauliType :

The four single-qubit Pauli operators

Instances For
    @[simp]
    @[simp]
    @[simp]

    A Pauli type acts nontrivially iff it is not the identity

    Equations
    Instances For

      A Pauli is X-type if it involves X (i.e., is X or Y)

      Equations
      Instances For

        A Pauli is Z-type if it involves Z (i.e., is Z or Y)

        Equations
        Instances For

          Multi-qubit Pauli Operators #

          structure PauliOp (n : ) :

          A Pauli operator on n qubits is a function from qubit indices to Pauli types, together with a global phase (±1, ±i represented as ZMod 4)

          • paulis : Fin nStabPauliType

            The Pauli type on each qubit

          • phase : ZMod 4

            The global phase: 0 = +1, 1 = +i, 2 = -1, 3 = -i

          Instances For
            theorem PauliOp.ext {n : } {x y : PauliOp n} (paulis : x.paulis = y.paulis) (phase : x.phase = y.phase) :
            x = y
            theorem PauliOp.ext_iff {n : } {x y : PauliOp n} :
            def instDecidableEqPauliOp.decEq {n✝ : } (x✝ x✝¹ : PauliOp n✝) :
            Decidable (x✝ = x✝¹)
            Equations
            Instances For

              The identity operator on n qubits

              Equations
              Instances For
                def PauliOp.support {n : } (P : PauliOp n) :

                The support of a Pauli operator: qubits where it acts nontrivially

                Equations
                Instances For
                  def PauliOp.xSupport {n : } (P : PauliOp n) :

                  The X-type support: qubits where P acts as X or Y

                  Equations
                  Instances For
                    def PauliOp.zSupport {n : } (P : PauliOp n) :

                    The Z-type support: qubits where P acts as Z or Y

                    Equations
                    Instances For
                      def PauliOp.commutes {n : } (P Q : PauliOp n) :

                      Two Pauli operators commute (ignoring global phase) iff they have an even number of positions where their Pauli types anticommute

                      Equations
                      Instances For

                        A Pauli operator is purely X-type if it only contains I and X

                        Equations
                        Instances For
                          def PauliOp.pureX {n : } (S : Finset (Fin n)) :

                          Construct a pure X-type operator from a set of qubits

                          Equations
                          Instances For
                            @[simp]
                            theorem PauliOp.pureX_paulis_mem {n : } (S : Finset (Fin n)) (i : Fin n) (h : i S) :
                            @[simp]
                            theorem PauliOp.pureX_paulis_not_mem {n : } (S : Finset (Fin n)) (i : Fin n) (h : iS) :
                            @[simp]
                            theorem PauliOp.pureX_support {n : } (S : Finset (Fin n)) :
                            @[simp]
                            theorem PauliOp.pureX_xSupport {n : } (S : Finset (Fin n)) :
                            @[simp]
                            theorem PauliOp.pureX_zSupport {n : } (S : Finset (Fin n)) :

                            Stabilizer Codes #

                            structure StabilizerGroup (n : ) :

                            A stabilizer group on n qubits is a subgroup of the Pauli group. For simplicity, we represent it as a set of generators (the stabilizer checks).

                            Instances For
                              structure StabilizerCode :

                              An [[n, k, d]] stabilizer code specification

                              • n :

                                Number of physical qubits

                              • k :

                                Number of logical qubits encoded

                              • d :

                                Code distance

                              • stabilizers : StabilizerGroup self.n

                                The stabilizer group

                              • n_ge_k : self.n self.k

                                Basic constraint: n ≥ k

                              • d_pos : self.d > 0

                                Distance is positive

                              Instances For

                                A Pauli operator commutes with the stabilizer group iff it commutes with all generators

                                Equations
                                Instances For

                                  The centralizer: all Paulis that commute with all stabilizers

                                  Equations
                                  Instances For

                                    A Pauli is in the stabilizer group if it can be generated by products of generators

                                    Equations
                                    Instances For

                                      Logical Operators #

                                      structure LogicalOp (C : StabilizerCode) :

                                      A logical operator for a stabilizer code:

                                      • Commutes with all stabilizers
                                      • Is not itself in the stabilizer group
                                      Instances For

                                        The support of a logical operator

                                        Equations
                                        Instances For

                                          The X-type support of a logical operator

                                          Equations
                                          Instances For

                                            The Z-type support of a logical operator

                                            Equations
                                            Instances For

                                              X-Type Logical Operator Convention #

                                              structure XTypeLogical (C : StabilizerCode) extends LogicalOp C :

                                              An X-type logical operator: a logical that is purely X-type (only I and X Paulis). This captures the convention: L = ∏_{v ∈ supp(L)} X_v

                                              Instances For
                                                @[simp]

                                                For an X-type logical, supp(L) = X-type support

                                                @[simp]

                                                For an X-type logical, the Z-type support is empty

                                                Construct an X-type logical from a support set (assuming the properties hold)

                                                Equations
                                                Instances For

                                                  The representation theorem: L = ∏_{v ∈ supp(L)} X_v (ignoring global phase). The Pauli content of L on each qubit matches pureX of the support.

                                                  LDPC Property #

                                                  structure IsLDPC (C : StabilizerCode) :

                                                  A code is Low-Density Parity-Check (LDPC) if there's a constant bound on:

                                                  • The weight of each stabilizer check
                                                  • The number of checks each qubit participates in
                                                  Instances For

                                                    Summary of Convention #

                                                    The key convention established:

                                                    1. We work with [[n,k,d]] qLDPC stabilizer codes
                                                    2. Codes are specified by stabilizer checks {sᵢ}
                                                    3. Logical operators commute with stabilizers but aren't stabilizers themselves
                                                    4. The logical L being measured is always X-type: L = ∏_{v ∈ supp(L)} Xᵥ
                                                    5. supp(L) is exactly the qubits where L acts nontrivially