Documentation

QEC1.Definitions.Def_13_BivariateBicycleCode

Def_13: Bivariate Bicycle Code #

Statement #

A Bivariate Bicycle (BB) code is a CSS code defined as follows:

Setup: Let ℓ, m be positive integers. Define:

These matrices satisfy x^ℓ = y^m = I_{ℓm} and xᵀx = yᵀy = I_{ℓm}.

Qubits: The code uses n = 2ℓm physical qubits divided into ℓm left (L) and ℓm right (R) qubits.

Parity check matrices: Given polynomials A, B ∈ F₂[x,y], the parity check matrices are: H_X = [A | B], H_Z = [Bᵀ | Aᵀ] where Aᵀ = A(x⁻¹, y⁻¹).

Labeling: X checks, Z checks, L qubits, R qubits are each in 1-1 correspondence with elements of M = {x^a y^b : a, b ∈ Z}.

Main Definitions #

Corollaries #

Section 1: The Monomial Set M #

Elements of M = {x^a y^b} are represented as pairs (a, b) ∈ ZMod ℓ × ZMod m. This is an additive abelian group where addition represents multiplication of monomials.

@[reducible, inline]
abbrev QEC1.BivariateBicycle.M (m : ) :

The monomial set M = {x^a y^b : a ∈ ZMod ℓ, b ∈ ZMod m}.

Equations
Instances For

    Section 2: Group Algebra F₂[M] #

    Polynomials in x, y over F₂ are elements of the group algebra (ZMod 2)[M]. An element is a finitely supported function M → ZMod 2.

    @[reducible, inline]

    The group algebra F₂[x, y] / (x^ℓ - 1, y^m - 1), represented as AddMonoidAlgebra.

    Equations
    Instances For

      Section 3: Generators x and y #

      x corresponds to the monomial (1, 0) in M, representing C_ℓ ⊗ I_m. y corresponds to the monomial (0, 1) in M, representing I_ℓ ⊗ C_m.

      noncomputable def QEC1.BivariateBicycle.cyclicShiftX (m : ) :
      GroupAlg m

      The generator x = C_ℓ ⊗ I_m as an element of the group algebra.

      Equations
      Instances For
        noncomputable def QEC1.BivariateBicycle.cyclicShiftY (m : ) :
        GroupAlg m

        The generator y = I_ℓ ⊗ C_m as an element of the group algebra.

        Equations
        Instances For
          noncomputable def QEC1.BivariateBicycle.monomial (m : ) (a : ZMod ) (b : ZMod m) :
          GroupAlg m

          A monomial x^a y^b as an element of the group algebra.

          Equations
          Instances For

            Section 4: Transpose Operation #

            For a BB code, the transpose operation is A^T = A(x⁻¹, y⁻¹). In the additive group M, this corresponds to negating both coordinates: (a, b) ↦ (-a, -b).

            def QEC1.BivariateBicycle.transposeMonomial (m : ) :
            M mM m

            The transpose operation on monomials: (a, b) ↦ (-a, -b).

            Equations
            Instances For
              @[simp]
              theorem QEC1.BivariateBicycle.transposeMonomial_apply (m : ) [NeZero ] [NeZero m] (a : ZMod ) (b : ZMod m) :
              noncomputable def QEC1.BivariateBicycle.transposeAlg (m : ) (p : GroupAlg m) :
              GroupAlg m

              The transpose of a group algebra element: A^T = A(x⁻¹, y⁻¹). This maps each monomial (a,b) to (-a,-b), preserving coefficients.

              Equations
              Instances For

                Section 5: Matrix Representation #

                The group algebra acts on F₂^{ℓm} by permutation. The matrix representation sends a polynomial p to the matrix whose (α, β) entry is the coefficient of α - β in p (i.e., a circulant-like structure on the product group).

                noncomputable def QEC1.BivariateBicycle.toMatrix (m : ) (p : GroupAlg m) :
                Matrix (M m) (M m) (ZMod 2)

                Matrix representation of a group algebra element: the (α, β)-entry is p(α - β).

                Equations
                Instances For
                  theorem QEC1.BivariateBicycle.toMatrix_transpose (m : ) [NeZero ] [NeZero m] (p : GroupAlg m) :
                  (toMatrix m p).transpose = toMatrix m (transposeAlg m p)

                  The matrix transpose equals the algebraic transpose.

                  Section 6: Label Types #

                  Checks and qubits are labeled by (α, T) where α ∈ M and T ∈ {X, Z, L, R}.

                  The four label types for checks and qubits.

                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[reducible, inline]

                      A labeled element: a monomial paired with a label type.

                      Equations
                      Instances For

                        Section 7: Bivariate Bicycle Code Structure #

                        A Bivariate Bicycle (BB) code specified by parameters ℓ, m and polynomials A, B.

                        • polyA : GroupAlg m

                          First polynomial A ∈ F₂[x, y]

                        • polyB : GroupAlg m

                          Second polynomial B ∈ F₂[x, y]

                        Instances For

                          The number of physical qubits: n = 2ℓm.

                          Equations
                          Instances For

                            The number of left qubits: ℓm.

                            Equations
                            Instances For

                              The number of right qubits: ℓm.

                              Equations
                              Instances For

                                The number of X checks: ℓm.

                                Equations
                                Instances For

                                  The number of Z checks: ℓm.

                                  Equations
                                  Instances For

                                    Section 8: Parity Check Matrices #

                                    H_X = [A | B] : ℓm × 2ℓm matrix (rows indexed by M, columns by M ⊕ M) H_Z = [B^T | A^T] : ℓm × 2ℓm matrix

                                    noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.matA {m : } (code : BivariateBicycleCode m) :
                                    Matrix (M m) (M m) (ZMod 2)

                                    Matrix representation of polynomial A.

                                    Equations
                                    Instances For
                                      noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.matB {m : } (code : BivariateBicycleCode m) :
                                      Matrix (M m) (M m) (ZMod 2)

                                      Matrix representation of polynomial B.

                                      Equations
                                      Instances For
                                        noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.matAT {m : } (code : BivariateBicycleCode m) :
                                        Matrix (M m) (M m) (ZMod 2)

                                        Matrix representation of A^T = A(x⁻¹, y⁻¹).

                                        Equations
                                        Instances For
                                          noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.matBT {m : } (code : BivariateBicycleCode m) :
                                          Matrix (M m) (M m) (ZMod 2)

                                          Matrix representation of B^T = B(x⁻¹, y⁻¹).

                                          Equations
                                          Instances For

                                            matAT is the matrix transpose of matA.

                                            matBT is the matrix transpose of matB.

                                            noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.parityCheckX {m : } (code : BivariateBicycleCode m) :
                                            Matrix (M m) (M m M m) (ZMod 2)

                                            The X parity check matrix H_X = [A | B]. Rows indexed by M (checks), columns by M ⊕ M (left ⊕ right qubits).

                                            Equations
                                            Instances For
                                              noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.parityCheckZ {m : } (code : BivariateBicycleCode m) :
                                              Matrix (M m) (M m M m) (ZMod 2)

                                              The Z parity check matrix H_Z = [B^T | A^T]. Rows indexed by M (checks), columns by M ⊕ M (left ⊕ right qubits).

                                              Equations
                                              Instances For

                                                Section 9: CSS Orthogonality #

                                                For a valid CSS code, H_X · H_Z^T = 0. This follows from AB^T + BA^T = 0 in F₂.

                                                CSS orthogonality condition: A * B^T + B * A^T = 0 over F₂. This ensures commutativity of X and Z stabilizers.

                                                Equations
                                                Instances For

                                                  Section 10: Pauli Notation #

                                                  X(p, q) denotes an X-type Pauli acting on left qubits with pattern p and right qubits with pattern q. Similarly Z(p, q) for Z-type.

                                                  An X-type Pauli operator X(p, q) specified by polynomials for left and right qubits.

                                                  • leftPoly : GroupAlg m

                                                    Pattern on left qubits

                                                  • rightPoly : GroupAlg m

                                                    Pattern on right qubits

                                                  Instances For

                                                    A Z-type Pauli operator Z(p, q) specified by polynomials for left and right qubits.

                                                    • leftPoly : GroupAlg m

                                                      Pattern on left qubits

                                                    • rightPoly : GroupAlg m

                                                      Pattern on right qubits

                                                    Instances For
                                                      noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.PauliX.support {m : } [NeZero ] [NeZero m] (P : PauliX m) :
                                                      M m M mZMod 2

                                                      Support of a Pauli X(p,q) as a binary vector over left ⊕ right qubits.

                                                      Equations
                                                      Instances For
                                                        noncomputable def QEC1.BivariateBicycle.BivariateBicycleCode.PauliZ.support {m : } [NeZero ] [NeZero m] (P : PauliZ m) :
                                                        M m M mZMod 2

                                                        Support of a Pauli Z(p,q) as a binary vector over left ⊕ right qubits.

                                                        Equations
                                                        Instances For

                                                          Section 11: Order Properties of x and y #

                                                          theorem QEC1.BivariateBicycle.cyclicShiftX_order (m : ) [NeZero ] [NeZero m] :
                                                          monomial m (↑) 0 = monomial m 0 0

                                                          x^ℓ = 1 in the group algebra (since ℓ · (1, 0) = (0, 0) in ZMod ℓ × ZMod m).

                                                          theorem QEC1.BivariateBicycle.cyclicShiftY_order (m : ) [NeZero ] [NeZero m] :
                                                          monomial m 0 m = monomial m 0 0

                                                          y^m = 1 in the group algebra (since m · (0, 1) = (0, 0) in ZMod ℓ × ZMod m).

                                                          Section 12: The Cyclic Permutation Matrix #

                                                          C_r is the permutation matrix for the cyclic shift i ↦ i + 1 on ZMod r. We define it using Equiv.Perm and relate it to the group algebra representation.

                                                          The cyclic permutation on ZMod r: i ↦ i + 1.

                                                          Equations
                                                          Instances For

                                                            x as a permutation on M = ZMod ℓ × ZMod m: (a, b) ↦ (a + 1, b).

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

                                                              y as a permutation on M = ZMod ℓ × ZMod m: (a, b) ↦ (a, b + 1).

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                theorem QEC1.BivariateBicycle.permX_permY_comm (m : ) [NeZero ] [NeZero m] :
                                                                Equiv.trans (permX m) (permY m) = Equiv.trans (permY m) (permX m)

                                                                x and y commute as permutations.

                                                                The permutation matrix of x is orthogonal: xᵀx = I.

                                                                The permutation matrix of y is orthogonal: yᵀy = I.