Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eqs. (35)–(36): MP−M†=P+MP_-M^\dagger=P_+MP−​M†=P+​, so correcting by MMM after the result −1-1−1 gives P+∣ψ⟩P_+|\psi\rangleP+​∣ψ⟩

Proved
HeisenbergRep.Knill.measurement_correction

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

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

Let MMM be an element of the nnn-qubit Pauli group and AAA a 2n×2n2^n\times2^n2n×2n matrix anticommuting with MMM (MA=−AMMA=-AMMA=−AM), and let P±=12(I±A)P_\pm=\tfrac12(I\pm A)P±​=21​(I±A) be the operators performed by a measurement of AAA with result ±1\pm1±1. Then

MP−M†=P+;MP_-M^\dagger=P_+ ;MP−​M†=P+​;
  1. for every vector ∣ψ⟩|\psi\rangle∣ψ⟩ with M∣ψ⟩=∣ψ⟩M|\psi\rangle=|\psi\rangleM∣ψ⟩=∣ψ⟩:   M P−∣ψ⟩=P+∣ψ⟩\;M\,P_-|\psi\rangle=P_+|\psi\rangleMP−​∣ψ⟩=P+​∣ψ⟩.

Hence, if MMM is in the stabilizer of the state, applying MMM whenever the result is −1-1−1 always yields the state P+∣ψ⟩P_+|\psi\rangleP+​∣ψ⟩; this is the correction step of the measurement rule.

Differences from the source:

  • generalization: A ∈ P anticommuting with M → A any 2^n × 2^n matrix with MA = −AM; reason: (36) uses only the anticommutation and MM† = I
  • generalization: M ∈ S (the stabilizer of the state) → M any Pauli-group element; Mψ = ψ assumed in clause 2 only; reason: clause 1 does not use Mψ = ψ; with M ∈ S both clauses give the paper's
  • encoding: we always get the state P+|ψ⟩ (normalized) → M(P−ψ) = P+ψ for the unnormalized vectors; reason: M is unitary, so ‖P−ψ‖ = ‖P+ψ‖ and the normalized states agree
Preamble
import Mathlib
import Definitions.Def_QAlgorithms_Defs_QECC
Formal statement
namespace HeisenbergRep.Knill

open QAlgorithms
open scoped Matrix

/-- **Eqs. (35)–(36): `M P₋ M† = P₊`, so applying `M` after the result `−1` gives `P₊|ψ⟩`.**
Gottesman, *The Heisenberg Representation of Quantum Computers*, arXiv:quant-ph/9807006v1, §7,
p. 15: "Suppose we wish to measure an operator `A ∈ P` which anticommutes with some element
`M ∈ S`. The measurement performs one of the operators `P± = ½(I ± A)`, (35) depending on whether
the measurement result is `±1`. But `MP₋M† = ½M(I − A)M† = ½(I + A)MM† = P₊`. (36) Therefore, by
applying `M` whenever the measurement result is `−1`, we can ensure that we always get the state
`P₊|ψ⟩`."

Let `M` be an element of the `n`-qubit Pauli group and `A` a `2^n × 2^n` matrix with `MA = −AM`,
and let `P± = ½(I ± A)`. Then
1. `M P₋ M† = P₊`;
2. for every vector `ψ` with `Mψ = ψ`: `M (P₋ ψ) = P₊ ψ`.

**Formalization Note.** The paper has `A ∈ P`; here `A` is any matrix anticommuting with `M` (a
generalization: neither clause uses more). "`M ∈ S`" enters only through `Mψ = ψ` in clause 2.
`P±` are written `(2⁻¹ : ℂ) • (1 ± A)`. -/
theorem measurement_correction {n : ℕ} (M : Matrix.unitaryGroup (Qubits n) ℂ)
    (hM : M ∈ pauliGroup n) (A : Matrix (Qubits n) (Qubits n) ℂ)
    (hMA : (M : Matrix (Qubits n) (Qubits n) ℂ) * A = -(A * (M : Matrix (Qubits n) (Qubits n) ℂ))) :
    (M : Matrix (Qubits n) (Qubits n) ℂ) * ((2⁻¹ : ℂ) • (1 - A)) *
        (M : Matrix (Qubits n) (Qubits n) ℂ)ᴴ = (2⁻¹ : ℂ) • (1 + A) ∧
    ∀ ψ : EuclideanSpace ℂ (Qubits n), act (M : Matrix (Qubits n) (Qubits n) ℂ) ψ = ψ →
      act (M : Matrix (Qubits n) (Qubits n) ℂ) (act ((2⁻¹ : ℂ) • (1 - A)) ψ) =
        act ((2⁻¹ : ℂ) • (1 + A)) ψ := by sorry

end HeisenbergRep.Knill
Source
Gottesman, The Heisenberg Representation of Quantum Computers, arXiv:quant-ph/9807006v1, §7, Eqs. (35)–(36), p. 15
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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me