Documentation

TCSlib.CodingTheory.QuantumHamming

Quantum Hamming Bound #

This file proves the quantum Hamming bound for non-degenerate quantum error-correcting codes. It formalizes the n-qubit Pauli error model and the Knill–Laflamme error correction conditions.

Main results #

References #

inductive PauliBasis :

The four-element type indexing the single-qubit Pauli matrices: identity I, bit-flip X, bit-phase-flip Y, and phase-flip Z.

Instances For
    Equations
    def sigmaI :
    Matrix (Fin 2) (Fin 2)

    The 2×2 identity matrix over ℂ (Pauli I).

    Equations
    Instances For
      def sigmaX :
      Matrix (Fin 2) (Fin 2)

      The bit-flip Pauli matrix X = [[0,1],[1,0]] over ℂ.

      Equations
      Instances For
        def sigmaY :
        Matrix (Fin 2) (Fin 2)

        The bit-phase-flip Pauli matrix Y = [[0,−i],[i,0]] over ℂ.

        Equations
        Instances For
          def sigmaZ :
          Matrix (Fin 2) (Fin 2)

          The phase-flip Pauli matrix Z = [[1,0],[0,−1]] over ℂ.

          Equations
          Instances For

            Maps each Pauli basis element to its corresponding 2×2 matrix.

            Equations
            Instances For
              def PauliString (n : ) :

              An n-qubit Pauli string: a function assigning a Pauli basis element to each of the n qubits.

              Equations
              Instances For
                def support {n : } (p : PauliString n) :

                The support of a Pauli string: the set of qubit indices where the operator is not identity.

                Equations
                Instances For
                  def weight {n : } (p : PauliString n) :

                  The weight of a Pauli string: the number of non-identity tensor factors.

                  Equations
                  Instances For
                    def pauliMatrix {n : } (p : PauliString n) :
                    Matrix (Fin nFin 2) (Fin nFin 2)

                    The 2^n × 2^n matrix for an n-qubit Pauli string, given as a tensor product of single-qubit Pauli matrices.

                    Equations
                    Instances For

                      The finset of all n-qubit Pauli strings of weight at most t.

                      Equations
                      Instances For
                        inductive PauliNZ :

                        A 3-element type for non-identity single-qubit Pauli operators, used in counting arguments.

                        Instances For
                          Equations

                          Embeds a non-identity Pauli into the full Pauli basis.

                          Equations
                          Instances For
                            def mkWithSupport {n : } (S : Finset (Fin n)) (f : SPauliNZ) :

                            Constructs a Pauli string with support exactly S and non-identity assignments given by f.

                            Equations
                            Instances For
                              theorem support_mkWithSupport {n : } (S : Finset (Fin n)) (f : SPauliNZ) :

                              The finset of Pauli strings with support exactly equal to S.

                              Equations
                              Instances For
                                theorem card_pauliErrorsLe (n t : ) :
                                (PauliErrorsLe n t).card = jFinset.range (t + 1), n.choose j * 3 ^ j

                                Clean Quantum Hamming counting identity.

                                @[reducible, inline]
                                abbrev Hn (n : ) :

                                The n-qubit Hilbert space ℂ^(2^n), realized as a Euclidean space indexed by Fin n → Fin 2.

                                Equations
                                Instances For
                                  def Code (n : ) :

                                  An n-qubit quantum code: a subspace of the Hilbert space Hn n.

                                  Equations
                                  Instances For
                                    noncomputable def pauliOp {n : } (p : PauliString n) :

                                    The linear operator on Hn n given by acting with the Pauli string p.

                                    Equations
                                    Instances For
                                      noncomputable def pauliOpAdjoint {n : } (p : PauliString n) :

                                      The adjoint (Hermitian conjugate) of the Pauli operator for p.

                                      Equations
                                      Instances For
                                        noncomputable def codeProj {n : } (C : Submodule (Hn n)) :

                                        The orthogonal projection from Hn n onto the code subspace C, viewed as an endomorphism.

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem codeProj_apply {n : } (C : Submodule (Hn n)) (x : Hn n) :
                                          theorem codeProj_mem {n : } (C : Submodule (Hn n)) (x : Hn n) :
                                          (codeProj C) x C
                                          theorem codeProj_eq_self_of_mem {n : } {C : Submodule (Hn n)} {x : Hn n} (hx : x C) :
                                          (codeProj C) x = x
                                          theorem codeProj_idempotent {n : } (C : Submodule (Hn n)) (x : Hn n) :
                                          (codeProj C) ((codeProj C) x) = (codeProj C) x
                                          def KnillLaflamme (n : ) (C : Submodule (Hn n)) (t : ) :

                                          The Knill–Laflamme quantum error correction condition: for all Pauli errors E, F of weight ≤ t, the code projection satisfies Π_C ∘ E† ∘ F ∘ Π_C = α_{E,F} • Π_C for some scalar.

                                          Equations
                                          Instances For
                                            def IsNondegenerate (n : ) (C : Submodule (Hn n)) (t : ) :

                                            A code is non-degenerate if it satisfies the Knill–Laflamme condition with all off-diagonal terms zero: for distinct errors E ≠ F of weight ≤ t, Π_C ∘ E† ∘ F ∘ Π_C = 0.

                                            Equations
                                            Instances For
                                              noncomputable def ErrorSphere (n t : ) (C : Submodule (Hn n)) :

                                              The error sphere: the span of all images E(C) over Pauli strings E of weight ≤ t. This is the subspace that must fit inside Hn n to derive the Hamming bound.

                                              Equations
                                              Instances For
                                                theorem error_subspaces_orthogonal {n t : } {C : Submodule (Hn n)} (h_nondeg : IsNondegenerate n C t) (E F : PauliString n) (hE : weight E t) (hF : weight F t) (h_neq : E F) :
                                                theorem finrank_Hn (n : ) :

                                                The n-qubit Hilbert space Hn n has complex dimension 2^n.

                                                theorem quantum_hamming_bound_raw (n k t : ) (C : Submodule (Hn n)) (h_dim : Module.finrank C = 2 ^ k) (h_nondeg : IsNondegenerate n C t) :
                                                (∑ jFinset.range (t + 1), n.choose j * 3 ^ j) * 2 ^ k 2 ^ n

                                                Quantum Hamming bound (raw form): for a non-degenerate [[n, k]] quantum code correcting t errors, the total dimension of the error sphere does not exceed the ambient space.

                                                theorem quantum_hamming_bound (n k t : ) (C : Submodule (Hn n)) (h_dim : Module.finrank C = 2 ^ k) (h_nondeg : IsNondegenerate n C t) (hkn : k n) :
                                                jFinset.range (t + 1), n.choose j * 3 ^ j 2 ^ (n - k)

                                                Quantum Hamming bound: a non-degenerate [[n, k]] quantum code correcting t errors satisfies ∑ j ∈ Finset.range (t + 1), C(n, j) * 3^j ≤ 2^(n - k).