Documentation

CslibFrontier.Foundations.Quantum.PauliGroup

The Pauli group #

The Pauli group on n qubits, up to the phase i, is the group of the operators (-1)^s X^a Z^b for a sign bit s and bit strings a, b : ι → Bool (Cslib.Quantum.PauliGroup). Since Z^b X^{a'} = (-1)^{a'·b} X^{a'} Z^b, the product is

(s, a, b) · (s', a', b') = (s + s' + b·a', a + a', b + b'),

a central extension of (ℤ/2)^{2n} by ℤ/2 with the bilinear cocycle b·a' (a finite Heisenberg group). The central element -1 = (1, 0, 0) (Cslib.Quantum.PauliGroup.negOne) squares to 1; the generators X^a (Cslib.Quantum.PauliGroup.ofX) and Z^b (Cslib.Quantum.PauliGroup.ofZ) satisfy Z^b X^a = (-1)^{a·b} X^a Z^b (Cslib.Quantum.PauliGroup.ofZ_mul_ofX).

Main definitions #

Main results #

structure Cslib.Quantum.PauliGroup (ι : Type u_2) :
Type u_2

The Pauli group on ι qubits: (s, a, b) stands for (-1)^s X^a Z^b.

  • sign : Bool

    The sign bit.

  • x : ι → Bool

    The bit-flip part.

  • z : ι → Bool

    The phase-flip part.

Instances For
    theorem Cslib.Quantum.PauliGroup.ext {ι : Type u_2} {x y : PauliGroup ι} (sign : x.sign = y.sign) :
    x.x = y.x → ∀ (z : x.z = y.z), x = y
    theorem Cslib.Quantum.PauliGroup.ext_iff {ι : Type u_2} {x y : PauliGroup ι} :
    x = y ↔ x.sign = y.sign ∧ x.x = y.x ∧ x.z = y.z
    @[instance_reducible]

    (-1)^s X^a Z^b · (-1)^{s'} X^{a'} Z^{b'} = (-1)^{s + s' + b·a'} X^{a+a'} Z^{b+b'}.

    @[instance_reducible]
    @[instance_reducible]
    @[simp]
    theorem Cslib.Quantum.PauliGroup.mul_sign {ι : Type u_1} [Fintype ι] (p q : PauliGroup ι) :
    (p * q).sign = p.sign + q.sign + p.z ⬝ᵥ q.x
    @[simp]
    theorem Cslib.Quantum.PauliGroup.mul_x {ι : Type u_1} [Fintype ι] (p q : PauliGroup ι) :
    (p * q).x = p.x + q.x
    @[simp]
    theorem Cslib.Quantum.PauliGroup.mul_z {ι : Type u_1} [Fintype ι] (p q : PauliGroup ι) :
    (p * q).z = p.z + q.z
    @[simp]
    theorem Cslib.Quantum.PauliGroup.one_x {ι : Type u_1} :
    x 1 = 0
    @[simp]
    theorem Cslib.Quantum.PauliGroup.one_z {ι : Type u_1} :
    z 1 = 0
    @[simp]
    theorem Cslib.Quantum.PauliGroup.inv_sign {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    @[simp]
    theorem Cslib.Quantum.PauliGroup.inv_x {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    p⁻¹.x = p.x
    @[simp]
    theorem Cslib.Quantum.PauliGroup.inv_z {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    p⁻¹.z = p.z
    @[instance_reducible]
    def Cslib.Quantum.PauliGroup.equivProd {ι : Type u_1} :
    PauliGroup ι ≃ Bool × (ι → Bool) × (ι → Bool)

    PauliGroup ι ≃ Bool × (ι → Bool) × (ι → Bool).

    @[instance_reducible]

    The central element -1.

    theorem Cslib.Quantum.PauliGroup.negOne_mul {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    negOne * p = { sign := !p.sign, x := p.x, z := p.z }
    theorem Cslib.Quantum.PauliGroup.mul_negOne {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    p * negOne = { sign := !p.sign, x := p.x, z := p.z }
    def Cslib.Quantum.PauliGroup.ofX {ι : Type u_1} (a : ι → Bool) :

    (false, a, 0), the element X^a.

    def Cslib.Quantum.PauliGroup.ofZ {ι : Type u_1} (b : ι → Bool) :

    (false, 0, b), the element Z^b.

    theorem Cslib.Quantum.PauliGroup.ofX_mul_ofX {ι : Type u_1} [Fintype ι] (a a' : ι → Bool) :
    ofX a * ofX a' = ofX (a + a')
    theorem Cslib.Quantum.PauliGroup.ofZ_mul_ofZ {ι : Type u_1} [Fintype ι] (b b' : ι → Bool) :
    ofZ b * ofZ b' = ofZ (b + b')
    theorem Cslib.Quantum.PauliGroup.ofX_inv {ι : Type u_1} [Fintype ι] (a : ι → Bool) :
    (ofX a)⁻¹ = ofX a
    theorem Cslib.Quantum.PauliGroup.ofZ_inv {ι : Type u_1} [Fintype ι] (b : ι → Bool) :
    (ofZ b)⁻¹ = ofZ b
    theorem Cslib.Quantum.PauliGroup.ofX_mul_ofZ {ι : Type u_1} [Fintype ι] (a b : ι → Bool) :
    ofX a * ofZ b = { sign := false, x := a, z := b }
    theorem Cslib.Quantum.PauliGroup.ofZ_mul_ofX {ι : Type u_1} [Fintype ι] (a b : ι → Bool) :
    ofZ b * ofX a = (if a ⬝ᵥ b = true then negOne else 1) * (ofX a * ofZ b)

    Z^b X^a = (-1)^{a·b} X^a Z^b in the group.

    theorem Cslib.Quantum.PauliGroup.eq_sign_mul {ι : Type u_1} [Fintype ι] (p : PauliGroup ι) :
    p = (if p.sign = true then negOne else 1) * (ofX p.x * ofZ p.z)

    Every element is (-1)^s X^a Z^b.