Documentation

CsdLean4.Mathlib.QuantumInfo.Pauli

The Pauli operators and their ๐”ฝโ‚‚-symplectic algebra (GK-1) #

Category: 1-Mathlib (CSD-free).

The n-qubit Pauli operators X^a Z^b (a b : Fin n โ†’ Fin 2) as concrete coordinate operators on the register, with the algebra that makes the stabiliser formalism tick (plan specs/gottesman-knill-plan.md, brick GK-1):

Design note: every sign is signChar of an ๐”ฝโ‚‚-valued form (bdot), never an โ„• parity โ€” so sign bookkeeping reduces to Fin 2 identities in finitely many generalized atoms, closed by decide. Fin 2 carries the ZMod 2 ring structure (Fin.instCommRing), so ring is available for the form algebra; the one genuinely characteristic-2 fact, v + v = 0, is fin2_add_self.

The sign character and the ๐”ฝโ‚‚ pairing #

The sign character on ๐”ฝโ‚‚: ฯ‡(0) = 1, ฯ‡(1) = โˆ’1.

Equations
Instances For
    theorem QuantumInfo.signChar_sum {ฮบ : Type u_1} (s : Finset ฮบ) (f : ฮบ โ†’ Fin 2) :
    signChar (โˆ‘ i โˆˆ s, f i) = โˆ i โˆˆ s, signChar (f i)

    ฯ‡ turns ๐”ฝโ‚‚ sums into products.

    theorem QuantumInfo.fin2_add_self (v : Fin 2) :
    v + v = 0

    The characteristic-2 fact: every bit is its own inverse.

    def QuantumInfo.bdot {n : โ„•} (b z : Fin n โ†’ Fin 2) :
    Fin 2

    The ๐”ฝโ‚‚ pairing bยทz = โˆ‘แตข bแตขzแตข (valued in Fin 2).

    Equations
    Instances For
      theorem QuantumInfo.bdot_add_right {n : โ„•} (b z w : Fin n โ†’ Fin 2) :
      bdot b (z + w) = bdot b z + bdot b w
      theorem QuantumInfo.bdot_add_left {n : โ„•} (b b' z : Fin n โ†’ Fin 2) :
      bdot (b + b') z = bdot b z + bdot b' z
      @[simp]
      theorem QuantumInfo.bdot_zero_right {n : โ„•} (b : Fin n โ†’ Fin 2) :
      bdot b 0 = 0
      @[simp]
      theorem QuantumInfo.bdot_zero_left {n : โ„•} (z : Fin n โ†’ Fin 2) :
      bdot 0 z = 0
      theorem QuantumInfo.bdot_comm {n : โ„•} (b z : Fin n โ†’ Fin 2) :
      bdot b z = bdot z b
      theorem QuantumInfo.bdot_update {n : โ„•} (b z : Fin n โ†’ Fin 2) (k : Fin n) (v : Fin 2) :
      bdot b (Function.update z k v) = bdot b z + b k * (z k + v)

      The pairing against a point update: bยท(z[k := v]) = bยทz + bโ‚–(zโ‚– + v).

      theorem QuantumInfo.bdot_update_left {n : โ„•} (b z : Fin n โ†’ Fin 2) (k : Fin n) (v : Fin 2) :
      bdot (Function.update b k v) z = bdot b z + z k * (b k + v)

      The pairing against a point update in the first slot.

      def QuantumInfo.pauliSign {n : โ„•} (b z : Fin n โ†’ Fin 2) :

      The Pauli sign (โˆ’1)^{bยทz} as ฯ‡(bยทz).

      Equations
      Instances For
        theorem QuantumInfo.pauliSign_add_right {n : โ„•} (b z w : Fin n โ†’ Fin 2) :
        pauliSign b (z + w) = pauliSign b z * pauliSign b w
        theorem QuantumInfo.pauliSign_add_left {n : โ„•} (b b' z : Fin n โ†’ Fin 2) :
        pauliSign (b + b') z = pauliSign b z * pauliSign b' z
        theorem QuantumInfo.pauliSign_mul_self {n : โ„•} (b z : Fin n โ†’ Fin 2) :
        @[simp]
        theorem QuantumInfo.pauliSign_zero_left {n : โ„•} (z : Fin n โ†’ Fin 2) :
        pauliSign 0 z = 1
        theorem QuantumInfo.conj_pauliSign {n : โ„•} (b z : Fin n โ†’ Fin 2) :

        The Pauli operators #

        noncomputable def QuantumInfo.pauliOp {n : โ„•} (a b : Fin n โ†’ Fin 2) (ฯˆ : QReg n) :

        The Pauli operator X^a Z^b on the register: coordinate (X^a Z^b ฯˆ)(z) = (โˆ’1)^{bยท(z+a)} ฯˆ(z+a) โ€” bit-flip by a, phase by b.

        Equations
        Instances For
          @[simp]
          theorem QuantumInfo.pauliOp_apply {n : โ„•} (a b : Fin n โ†’ Fin 2) (ฯˆ : QReg n) (z : Fin n โ†’ Fin 2) :
          (pauliOp a b ฯˆ).ofLp z = pauliSign b (z + a) * ฯˆ.ofLp (z + a)
          @[simp]
          theorem QuantumInfo.pauliOp_zero {n : โ„•} (ฯˆ : QReg n) :
          pauliOp 0 0 ฯˆ = ฯˆ

          The identity-label Pauli is the identity.

          theorem QuantumInfo.pauliOp_smul {n : โ„•} (a b : Fin n โ†’ Fin 2) (c : โ„‚) (ฯˆ : QReg n) :
          pauliOp a b (c โ€ข ฯˆ) = c โ€ข pauliOp a b ฯˆ

          The Pauli operator is homogeneous.

          theorem QuantumInfo.pauliOp_add {n : โ„•} (a b : Fin n โ†’ Fin 2) (ฯˆ ฯ‡ : QReg n) :
          pauliOp a b (ฯˆ + ฯ‡) = pauliOp a b ฯˆ + pauliOp a b ฯ‡

          The Pauli operator is additive.

          theorem QuantumInfo.pauliOp_sum {n : โ„•} {ฮบ : Type u_1} (a b : Fin n โ†’ Fin 2) (s : Finset ฮบ) (f : ฮบ โ†’ QReg n) :
          pauliOp a b (โˆ‘ k โˆˆ s, f k) = โˆ‘ k โˆˆ s, pauliOp a b (f k)

          The Pauli operator commutes with finite sums.

          theorem QuantumInfo.pauliOp_basisState {n : โ„•} (a b w : Fin n โ†’ Fin 2) :

          The Pauli action on a basis state: X^a Z^b |wโŸฉ = (โˆ’1)^{bยทw} |w + aโŸฉ.

          theorem QuantumInfo.pauliOp_mul {n : โ„•} (a b a' b' : Fin n โ†’ Fin 2) (ฯˆ : QReg n) :
          pauliOp a b (pauliOp a' b' ฯˆ) = pauliSign b a' โ€ข pauliOp (a + a') (b + b') ฯˆ

          โ˜… The Pauli group law: X^a Z^b ยท X^{a'} Z^{b'} = (โˆ’1)^{bยทa'} ยท X^{a+a'} Z^{b+b'}. The family is closed under composition; the phase is the ๐”ฝโ‚‚ pairing bยทa'.

          theorem QuantumInfo.pauliOp_comm {n : โ„•} (a b a' b' : Fin n โ†’ Fin 2) (ฯˆ : QReg n) :
          pauliOp a b (pauliOp a' b' ฯˆ) = signChar (bdot a b' + bdot b a') โ€ข pauliOp a' b' (pauliOp a b ฯˆ)

          โ˜… Commutation is the symplectic form: the composition mismatch between X^a Z^b ยท X^{a'} Z^{b'} and its reverse is exactly ฯ‡(aยทb' + bยทa') โ€” the two Paulis commute iff the ๐”ฝโ‚‚ symplectic form of their labels vanishes.

          theorem QuantumInfo.pauliOp_comm_of_symp {n : โ„•} (a b a' b' : Fin n โ†’ Fin 2) (h : bdot a b' + bdot b a' = 0) (ฯˆ : QReg n) :
          pauliOp a b (pauliOp a' b' ฯˆ) = pauliOp a' b' (pauliOp a b ฯˆ)

          Two Paulis with vanishing symplectic form commute.

          Character orthogonality and tracelessness #

          theorem QuantumInfo.sum_signChar_mul (u : Fin 2) :
          โˆ‘ v : Fin 2, signChar (u * v) = if u = 0 then 2 else 0

          One-bit character orthogonality: โˆ‘_v ฯ‡(uยทv) = 2ยท[u = 0].

          theorem QuantumInfo.sum_pauliSign {n : โ„•} (b : Fin n โ†’ Fin 2) :
          โˆ‘ z : Fin n โ†’ Fin 2, pauliSign b z = if b = 0 then 2 ^ n else 0

          Character orthogonality: โˆ‘_z (โˆ’1)^{bยทz} = 2โฟยท[b = 0].

          theorem QuantumInfo.pauliOp_trace {n : โ„•} (a b : Fin n โ†’ Fin 2) :
          โˆ‘ z : Fin n โ†’ Fin 2, (pauliOp a b (basisState z)).ofLp z = if a = 0 โˆง b = 0 then 2 ^ n else 0

          โ˜… Non-identity Paulis are traceless: the diagonal sum of X^a Z^b over the computational basis is 2โฟ at the identity label and 0 otherwise. This is the seed of the stabiliser-projector trace argument (GK-3 in the plan).

          Unitarity in the coordinate sense #

          theorem QuantumInfo.inner_pauliOp {n : โ„•} (a b : Fin n โ†’ Fin 2) (ฯˆ ฯ† : QReg n) :
          inner โ„‚ (pauliOp a b ฯˆ) (pauliOp a b ฯ†) = inner โ„‚ ฯˆ ฯ†

          Paulis preserve the inner product: the reindexing z โ†ฆ z + a is a bijection and the sign is real of modulus one.