Documentation

CslibFrontier.Foundations.Quantum.Pauli

The Pauli matrices X and Z #

The single-qubit Pauli matrices X = [[0, 1], [1, 0]] (the bit flip, Cslib.Quantum.pauliX) and Z = [[1, 0], [0, -1]] (the phase flip, Cslib.Quantum.pauliZ), indexed by one bit Bool as the Hadamard matrix Cslib.Quantum.Gate.hadamardMatrix is, de Wolf, Appendix A.9. They are Hermitian, square to the identity and anticommute, so they are unitary; their action on a vector is (X v)_b = v_{¬b} and (Z v)_b = (-1)^b v_b.

Teleportation and superdense coding apply them as Bob's correction and as Alice's encoding (CslibFrontier/Computability/Circuit/Quantum/Teleportation.lean, CslibFrontier/Computability/Circuit/Quantum/SuperdenseCoding.lean).

Main definitions #

Main results #

References #

The Pauli matrix X = [[0, 1], [1, 0]], the bit flip |b⟩ ↦ |¬b⟩.

The Pauli matrix Z = [[1, 0], [0, -1]], the phase flip |b⟩ ↦ (-1)^b |b⟩.

@[simp]
theorem Cslib.Quantum.pauliX_apply (b c : Bool) :
pauliX b c = if b = !c then 1 else 0
@[simp]
theorem Cslib.Quantum.pauliZ_apply (b c : Bool) :
pauliZ b c = if b = c then if b = true then -1 else 1 else 0

The Pauli matrices X and Z anticommute.

@[simp]
theorem Cslib.Quantum.pauliX_mulVec (v : Bool → ℂ) (b : Bool) :
pauliX.mulVec v b = v !b
@[simp]
theorem Cslib.Quantum.pauliZ_mulVec (v : Bool → ℂ) (b : Bool) :
pauliZ.mulVec v b = (if b = true then -1 else 1) * v b