Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§6.1 Figure 10: two-step x rotation

Open
QAlgorithms.Papers.Independent.Intakenext100.P52.figure10_two_measurements

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

prove2quantum

Let θ\thetaθ be real and let ∣ψ⟩|\psi\rangle∣ψ⟩ have unit norm. Entangle ∣ψ⟩∣+⟩∣+⟩|\psi\rangle|+\rangle|+\rangle∣ψ⟩∣+⟩∣+⟩ as a three-site line. Measure site 111 in XXX and site 222 in M(−2θ)M(-2\theta)M(−2θ), with outcomes s1,s2s_1,s_2s1​,s2​. The branch bsb_sbs​ has probability 1/41/41/4 and

∣bs⟩⟨bs∣=14∣χs⟩⟨χs∣,∣χs⟩=Xs2Zs1Rx((−1)s1θ)∣ψ⟩.|b_s\rangle\langle b_s|=\tfrac14|\chi_s\rangle\langle\chi_s|,\qquad |\chi_s\rangle=X^{s_2}Z^{s_1}R_x((-1)^{s_1}\theta)|\psi\rangle.∣bs​⟩⟨bs​∣=41​∣χs​⟩⟨χs​∣,∣χs​⟩=Xs2​Zs1​Rx​((−1)s1​θ)∣ψ⟩.

Choosing the second basis adaptively as M(−2(−1)s1θ)M(-2(-1)^{s_1}\theta)M(−2(−1)s1​θ) instead gives ∣χs⟩=Xs2Zs1Rx(θ)∣ψ⟩|\chi_s\rangle=X^{s_2}Z^{s_1}R_x(\theta)|\psi\rangle∣χs​⟩=Xs2​Zs1​Rx​(θ)∣ψ⟩, again with probability 1/41/41/4. Source correction: the drawn M(−θ)M(-\theta)M(−θ) yields half the caption's rotation under the p.5 convention, so the measurement angle is doubled.

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)

/-- Figure 10, PDF p.13. Printed M(-theta) gives Rx(theta/2); changed to
M(-2theta) to retain the caption's Rx((-1)^s1 theta) target. The second
conjunct gives the causal sign adaptation for a prescribed Rx(theta). -/
theorem figure10_two_measurements (theta : ℝ) (psi : Vec Bool)
    (hpsi : IsState psi) (s : Fin 2 → Bool) :
    (let b := lineBranch 2 ![0,-2*theta] s psi
     pureDensity b = (1 / 4 : ℝ) •
       pureDensity (act (pauliByproduct (s 1) (s 0) * rx (angleSign (s 0) * theta)) psi) ∧
     ‖b‖ ^ 2 = (1 / 4 : ℝ)) ∧
    (let b := lineBranch 2 ![0,-2*angleSign (s 0)*theta] s psi
     pureDensity b = (1 / 4 : ℝ) • pureDensity (act (pauliByproduct (s 1) (s 0) * rx theta) psi) ∧
     ‖b‖ ^ 2 = (1 / 4 : ℝ)) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P52

end
Source
An introduction to measurement based quantum computation, arXiv:quant-ph/0508124v2, PDF p. 13, §6.1 Figure 10: two-step x rotation
Read-back

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

For every real θ\thetaθ, every vector ψ∈C{0,1}\psi\in\mathbb C^{\{0,1\}}ψ∈C{0,1} of Euclidean norm 111, and every pair of Boolean outcomes s0,s1s_0,s_1s0​,s1​, identify Booleans with 0,10,10,1 and define B(α0,α1)(y)=14∑z∈{0,1}3z2=yψ(z0)(−1)z0z1+z1z2+s0z0+s1z1e−i(α0z0+α1z1)\displaystyle B(\alpha_0,\alpha_1)(y)=\tfrac14\sum_{\substack{z\in\{0,1\}^3\\z_2=y}}\psi(z_0)(-1)^{z_0z_1+z_1z_2+s_0z_0+s_1z_1}e^{-\mathrm i(\alpha_0z_0+\alpha_1z_1)}B(α0​,α1​)(y)=41​z∈{0,1}3z2​=y​∑​ψ(z0​)(−1)z0​z1​+z1​z2​+s0​z0​+s1​z1​e−i(α0​z0​+α1​z1​). Let X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1), and Rx(t)=cos⁡(t)I−isin⁡(t)XR_x(t)=\cos(t)I-\mathrm i\sin(t)XRx​(t)=cos(t)I−isin(t)X. For b=B(0,−2θ)b=B(0,-2\theta)b=B(0,−2θ) and v=Xs1Zs0Rx((−1)s0θ)ψv=X^{s_1}Z^{s_0}R_x((-1)^{s_0}\theta)\psiv=Xs1​Zs0​Rx​((−1)s0​θ)ψ, the assertions are bb†=14vv†bb^\dagger=\tfrac14vv^\daggerbb†=41​vv† and ∥b∥2=1/4\|b\|^2=1/4∥b∥2=1/4. Also, for b=B(0,−2(−1)s0θ)b=B(0,-2(-1)^{s_0}\theta)b=B(0,−2(−1)s0​θ) and v=Xs1Zs0Rx(θ)ψv=X^{s_1}Z^{s_0}R_x(\theta)\psiv=Xs1​Zs0​Rx​(θ)ψ, the assertions are bb†=14vv†bb^\dagger=\tfrac14vv^\daggerbb†=41​vv† and ∥b∥2=1/4\|b\|^2=1/4∥b∥2=1/4. Here uu†uu^\daggeruu† means the matrix with entries u(a)u(b)‾u(a)\overline{u(b)}u(a)u(b)​.

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