Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§5.1: Z measurement deletes a cluster vertex

Proved
QAlgorithms.Papers.Independent.Intakenext100.P52.z_measurement_deletes_vertex

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

prove2quantum

Let G=(V,E)G=(V,E)G=(V,E) be a finite simple graph, with every edge oriented once for its coordinate representation, and let ∣CG⟩|C_G\rangle∣CG​⟩ be its normalized cluster state. For A∈VA\in VA∈V and computational outcome s∈{0,1}s\in\{0,1\}s∈{0,1}, identify the surviving wires with V∖{A}V\setminus\{A\}V∖{A}. The destructive ZAZ_AZA​ branch satisfies

(⟨s∣A⊗I)∣CG⟩=12(∏v∼AZvs)∣CG−A⟩,Pr⁡(s)=12.(\langle s|_A\otimes I)|C_G\rangle=\frac1{\sqrt2}\left(\prod_{v\sim A}Z_v^s\right)|C_{G-A}\rangle,\qquad\Pr(s)=\frac12.(⟨s∣A​⊗I)∣CG​⟩=2​1​(v∼A∏​Zvs​)∣CG−A​⟩,Pr(s)=21​.

The measured wire is removed by an explicit insertion bijection on bit strings. Isolated vertices and singleton graphs are included by the empty-product convention. The intermediate normalization factor omitted on p.12 is retained.

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)

/-- Z deletion, PDF pp.11–12: includes the missing intermediate 1/sqrt(2)
factor and explicitly removes the measured register. Singleton and isolated
vertices are allowed; their neighbour product is empty. -/
theorem z_measurement_deletes_vertex {V : Type*} [Fintype V] [DecidableEq V]
    (E : Finset (V × V)) (hloop : ∀ e ∈ E, e.1 ≠ e.2)
    (horient : ∀ e ∈ E, (e.2,e.1) ∉ E) (A : V) (s : Bool) :
    let b : Vec ({v : V // v ≠ A} → Bool) :=
      WithLp.toLp 2 fun z => graphClusterState E (insertSite A s z)
    b = ((Real.sqrt 2)⁻¹ : ℂ) •
      (WithLp.toLp 2 fun z => neighbourPhase E A s z * graphClusterState (deletedEdges E A) z) ∧
    ‖b‖ ^ 2 = (1 / 2 : ℝ) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P52

end
Source
An introduction to measurement based quantum computation, arXiv:quant-ph/0508124v2, PDF p. 12, §5.1: Z measurement deletes a cluster vertex
Read-back

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

For every finite type VVV with decidable equality, every finite set E⊆V×VE\subseteq V\times VE⊆V×V satisfying u≠vu\ne vu=v for each (u,v)∈E(u,v)\in E(u,v)∈E and (v,u)∉E(v,u)\notin E(v,u)∈/E for each (u,v)∈E(u,v)\in E(u,v)∈E, every site A∈VA\in VA∈V, and every Boolean sss, the following holds. Identify Booleans with 0,10,10,1, and define GE(x)=2−∣V∣/2∏(u,v)∈E(−1)x(u)x(v)\displaystyle G_E(x)=2^{-|V|/2}\prod_{(u,v)\in E}(-1)^{x(u)x(v)}GE​(x)=2−∣V∣/2(u,v)∈E∏​(−1)x(u)x(v). For an assignment z:V∖{A}→{0,1}z:V\setminus\{A\}\to\{0,1\}z:V∖{A}→{0,1}, let z~(A)=s\widetilde z(A)=sz(A)=s and z~(v)=z(v)\widetilde z(v)=z(v)z(v)=z(v) elsewhere, and define b(z)=GE(z~)b(z)=G_E(\widetilde z)b(z)=GE​(z). Let EAE_AEA​ be the edges of EEE whose endpoints both differ from AAA, viewed as edges on V∖{A}V\setminus\{A\}V∖{A}, and let Ns(z)=∏(u,v)∈Eu=A or v=A(−1)z~(u)z~(v)\displaystyle N_s(z)=\prod_{\substack{(u,v)\in E\\u=A\ \text{or}\ v=A}}(-1)^{\widetilde z(u)\widetilde z(v)}Ns​(z)=(u,v)∈Eu=A or v=A​∏​(−1)z(u)z(v). Then b(z)=2−1/2Ns(z) 2−(∣V∣−1)/2∏(u,v)∈EA(−1)z(u)z(v)\displaystyle b(z)=2^{-1/2}N_s(z)\,2^{-(|V|-1)/2}\prod_{(u,v)\in E_A}(-1)^{z(u)z(v)}b(z)=2−1/2Ns​(z)2−(∣V∣−1)/2(u,v)∈EA​∏​(−1)z(u)z(v) for every zzz, and ∥b∥2=1/2\|b\|^2=1/2∥b∥2=1/2. Empty edge sets and the case where AAA is the only site are included, with empty products equal to 111; the parameter AAA requires VVV to be nonempty.

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