Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3: Pauli propagation and adaptive rotation signs

Proved
QAlgorithms.Papers.Independent.Intakenext100.P52.pauli_propagation

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let Rx(θ)=e−iθXR_x(\theta)=e^{-i\theta X}Rx​(θ)=e−iθX, Rz(θ)=e−iθZR_z(\theta)=e^{-i\theta Z}Rz​(θ)=e−iθZ and W(θ)=Hdiag⁡(1,eiθ)W(\theta)=H\operatorname{diag}(1,e^{i\theta})W(θ)=Hdiag(1,eiθ). For every real θ\thetaθ,

Rx(θ)X=XRx(θ),Rx(θ)Z=ZRx(−θ),Rz(θ)X=XRz(−θ),Rz(θ)Z=ZRz(θ),W(θ)Z=XW(θ),W(θ)X=eiθZW(−θ).\begin{aligned}R_x(\theta)X&=XR_x(\theta),&R_x(\theta)Z&=ZR_x(-\theta),\\R_z(\theta)X&=XR_z(-\theta),&R_z(\theta)Z&=ZR_z(\theta),\\W(\theta)Z&=XW(\theta),&W(\theta)X&=e^{i\theta}ZW(-\theta).\end{aligned}Rx​(θ)XRz​(θ)XW(θ)Z​=XRx​(θ),=XRz​(−θ),=XW(θ),​Rx​(θ)ZRz​(θ)ZW(θ)X​=ZRx​(−θ),=ZRz​(θ),=eiθZW(−θ).​

Moreover CZ(Z⊗I)=(Z⊗I)CZCZ(Z\otimes I)=(Z\otimes I)CZCZ(Z⊗I)=(Z⊗I)CZ and CZ(X⊗I)=(X⊗Z)CZCZ(X\otimes I)=(X\otimes Z)CZCZ(X⊗I)=(X⊗Z)CZ, together with both swapped-wire identities. These relations determine adaptive rotation signs and Pauli propagation. The scalar omitted in the printed W(θ)XW(\theta)XW(θ)X relation is retained here.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P52
Formal statement
noncomputable section

open scoped Matrix ComplexConjugate

namespace QAlgorithms.Papers.Independent.Intakenext100.P52

open QAlgorithms.Papers.Independent.Information100.P21 (Vec)

open QAlgorithms.Papers.Independent.Gap20.P01 (applyRect)

/-- Pauli propagation, PDF pp.5–6. The printed W(theta)X=ZW(-theta)
omits exp(i theta); that scalar is retained here. All four CZ wire cases appear. -/
theorem pauli_propagation (theta : ℝ) :
    rx theta * pauliX = pauliX * rx theta ∧
    rx theta * pauliZ = pauliZ * rx (-theta) ∧
    rz theta * pauliX = pauliX * rz (-theta) ∧
    rz theta * pauliZ = pauliZ * rz theta ∧
    wGate theta * pauliZ = pauliX * wGate theta ∧
    wGate theta * pauliX = Complex.exp (Complex.I * theta) • (pauliZ * wGate (-theta)) ∧
    controlled pauliZ * Matrix.kronecker pauliZ 1 = Matrix.kronecker pauliZ 1 * controlled pauliZ ∧
    controlled pauliZ * Matrix.kronecker pauliX 1 = Matrix.kronecker pauliX pauliZ * controlled pauliZ ∧
    controlled pauliZ * Matrix.kronecker 1 pauliZ = Matrix.kronecker 1 pauliZ * controlled pauliZ ∧
    controlled pauliZ * Matrix.kronecker 1 pauliX = Matrix.kronecker pauliZ pauliX * controlled pauliZ := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P52

end
Source
An introduction to measurement based quantum computation, arXiv:quant-ph/0508124v2, PDF p. 5, §3: Pauli propagation and adaptive rotation signs
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For every real number θ\thetaθ, index single-qubit matrices by (false,true)(\mathrm{false},\mathrm{true})(false,true) and put

X=(0110),Z=(100−1),H=12(111−1),Wθ=H(100eiθ),X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\quad H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad W_\theta=H\begin{pmatrix}1&0\\0&e^{i\theta}\end{pmatrix},X=(01​10​),Z=(10​0−1​),H=2​1​(11​1−1​),Wθ​=H(10​0eiθ​), Rx(θ)=cos⁡θ I2−isin⁡θ X,Rz(θ)=(e−iθ00eiθ).R_x(\theta)=\cos\theta\,I_2-i\sin\theta\,X,\qquad R_z(\theta)=\begin{pmatrix}e^{-i\theta}&0\\0&e^{i\theta}\end{pmatrix}.Rx​(θ)=cosθI2​−isinθX,Rz​(θ)=(e−iθ0​0eiθ​).

Let C=diag⁡(1,1,1,−1)C=\operatorname{diag}(1,1,1,-1)C=diag(1,1,1,−1) on Boolean pairs ordered as (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true). All ten identities hold simultaneously:

Rx(θ)X=XRx(θ),Rx(θ)Z=ZRx(−θ),Rz(θ)X=XRz(−θ),Rz(θ)Z=ZRz(θ),WθZ=XWθ,WθX=eiθZW−θ,C(Z⊗I2)=(Z⊗I2)C,C(X⊗I2)=(X⊗Z)C,C(I2⊗Z)=(I2⊗Z)C,C(I2⊗X)=(Z⊗X)C.\begin{aligned} R_x(\theta)X&=XR_x(\theta),& R_x(\theta)Z&=ZR_x(-\theta),\\ R_z(\theta)X&=XR_z(-\theta),& R_z(\theta)Z&=ZR_z(\theta),\\ W_\theta Z&=XW_\theta,& W_\theta X&=e^{i\theta}ZW_{-\theta},\\ C(Z\otimes I_2)&=(Z\otimes I_2)C,& C(X\otimes I_2)&=(X\otimes Z)C,\\ C(I_2\otimes Z)&=(I_2\otimes Z)C,& C(I_2\otimes X)&=(Z\otimes X)C. \end{aligned}Rx​(θ)XRz​(θ)XWθ​ZC(Z⊗I2​)C(I2​⊗Z)​=XRx​(θ),=XRz​(−θ),=XWθ​,=(Z⊗I2​)C,=(I2​⊗Z)C,​Rx​(θ)ZRz​(θ)ZWθ​XC(X⊗I2​)C(I2​⊗X)​=ZRx​(−θ),=ZRz​(θ),=eiθZW−θ​,=(X⊗Z)C,=(Z⊗X)C.​
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 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