Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 9: Pauli operators commute or anticommute, square to ±1\pm1±1, and have eigenvalues ±1\pm1±1 or ±i\pm i±i

Proved
HeisenbergRep.Knill.pauli_commute_square_eigen

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

classical-simulationclifford-groupp2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-informationstabilizer-formalism

Let P=icP1⊗⋯⊗PnP=i^cP_1\otimes\cdots\otimes P_nP=icP1​⊗⋯⊗Pn​ and QQQ be nnn-qubit Pauli operators (c∈Z/4c\in\mathbb Z/4c∈Z/4, Pq∈{I,X,Y,Z}P_q\in\{I,X,Y,Z\}Pq​∈{I,X,Y,Z}). Then

  1. PQ=QPPQ=QPPQ=QP or PQ=−QPPQ=-QPPQ=−QP;
  2. if the overall phase ici^cic of PPP is ±1\pm1±1, then P2=IP^2=IP2=I;
  3. if the overall phase of PPP is ±i\pm i±i, then P2=−IP^2=-IP2=−I;
  4. if Pv=μvPv=\mu vPv=μv for a nonzero vector vvv, then μ∈{1,−1}\mu\in\{1,-1\}μ∈{1,−1} when the phase of PPP is ±1\pm1±1, and μ∈{i,−i}\mu\in\{i,-i\}μ∈{i,−i} when it is ±i\pm i±i.

These facts underlie the stabilizer formalism: they make every stabilizer Abelian and composed of Hermitian operators.

Differences from the source:

  • encoding: an element of the Pauli group P → a PauliString n (phase exponent c ∈ ZMod 4) and its matrix toMatrix; reason: P is exactly the set of these matrices
  • reading: the operators that square to −1 have imaginary eigenvalues → every eigenvalue is i or −i; reason: the eigenvalues of a matrix with square −I are ±i
  • reading: the operators that square to +1 have eigenvalues ±1 → every eigenvalue is +1 or −1; reason: I has only the eigenvalue +1, so "both occur" would be false
Preamble
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Stabilizer
Formal statement
namespace HeisenbergRep.Knill

open QAlgorithms QAlgorithms.Stabilizer
open scoped Matrix

/-- **Elements of the Pauli group commute or anticommute, square to `±1`, and have eigenvalues
`±1` or `±i`.**
Gottesman, *The Heisenberg Representation of Quantum Computers*, arXiv:quant-ph/9807006v1, §4,
p. 9: "Any two elements of `P` either commute or anticommute … In addition, all elements of `P`
square to `±1` (operators with an overall phase of `±1` square to `+1`, operators with an overall
phase of `±i` square to `−1`). The operators that square to `−1` have imaginary eigenvalues, while
the operators that square to `+1` have eigenvalues `±1`."

For all `n`-qubit Pauli operators `P = i^c P_1 ⊗ ⋯ ⊗ P_n` and `Q`:
1. `PQ = QP` or `PQ = −QP`;
2. if the phase `i^c` of `P` is `±1`, then `P² = I`;
3. if the phase of `P` is `±i`, then `P² = −I`;
4. every eigenvalue `μ` of `P` (with a nonzero eigenvector `v`, `Pv = μv`) is `±1` when the
   phase is `±1`, and `±i` when the phase is `±i`.

**Formalization Note.** An element of the Pauli group is written as a `PauliString n` (phase
exponent `c ∈ ℤ/4`, so phase `±1` is `c ∈ {0, 2}` and phase `±i` is `c ∈ {1, 3}`) with matrix
`PauliString.toMatrix`. "Imaginary eigenvalues" is read as "eigenvalues in `{i, −i}`", and
"eigenvalues `±1`" as "every eigenvalue is `+1` or `−1`" (the identity has only the eigenvalue
`+1`). -/
theorem pauli_commute_square_eigen {n : ℕ} (P Q : PauliString n) :
    (P.toMatrix * Q.toMatrix = Q.toMatrix * P.toMatrix ∨
      P.toMatrix * Q.toMatrix = -(Q.toMatrix * P.toMatrix)) ∧
    ((P.phase = 0 ∨ P.phase = 2) → P.toMatrix ^ 2 = 1) ∧
    ((P.phase = 1 ∨ P.phase = 3) → P.toMatrix ^ 2 = -1) ∧
    ∀ (v : Qubits n → ℂ) (μ : ℂ), v ≠ 0 → P.toMatrix *ᵥ v = μ • v →
      ((P.phase = 0 ∨ P.phase = 2) → μ = 1 ∨ μ = -1) ∧
      ((P.phase = 1 ∨ P.phase = 3) → μ = Complex.I ∨ μ = -Complex.I) := by sorry

end HeisenbergRep.Knill
Source
Gottesman, The Heisenberg Representation of Quantum Computers, arXiv:quant-ph/9807006v1, §4, p. 9
Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 1, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me