Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§8: coherent elimination of intermediate measurements

Open
QAlgorithms.Papers.Independent.Intakenext100.P52.coherent_elimination_of_intermediate_measurements

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

prove2quantum

Fix a finite adaptive process with nnn data qubits and kkk recorded projective measurements. Before measurement ttt, its gate, measured site and orthonormal basis are fixed functions of the preceding ttt bits; a final unitary may also depend on the full history. Measurement basis vectors are columns of the supplied one-qubit unitary. Let KsK_sKs​ be the chronological gate/projector branch operator for the full history s∈{0,1}ks\in\{0,1\}^ks∈{0,1}k. There is a single unitary VVV on the data and kkk fresh pointer qubits, selected before the unknown input, such that for every normalized ∣ψ⟩|\psi\rangle∣ψ⟩,

V(∣ψ⟩⊗∣0k⟩)=∑sKs∣ψ⟩⊗∣s⟩.V(|\psi\rangle\otimes|0^k\rangle)=\sum_s K_s|\psi\rangle\otimes|s\rangle.V(∣ψ⟩⊗∣0k⟩)=s∑​Ks​∣ψ⟩⊗∣s⟩.

Final computational-basis pointer measurement therefore reproduces the entire joint history law ∥Ksψ∥2\|K_s\psi\|^2∥Ks​ψ∥2 and every subnormalized residual density. All finite history-dependent controls are included coherently. No cost bound or normalization on a zero branch is asserted.

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)

/-- Deferred measurement, PDF p.19: one input-independent unitary on data and
fresh pointer bits reproduces every subnormalized residual state and joint
history law. History-dependent classical controls are included in the coherent
unitary. No efficiency assertion, and no normalization on zero branches. -/
theorem coherent_elimination_of_intermediate_measurements {n k : ℕ} (P : AdaptiveProcess n k) :
    ∃ V : Matrix (Qubits n × Qubits k) (Qubits n × Qubits k) ℂ,
      V ∈ Matrix.unitaryGroup (Qubits n × Qubits k) ℂ ∧
      ∀ (psi : Vec (Qubits n)), IsState psi →
        act V (tensorVec psi (zeroKet k)) = pointerWave P psi ∧
        (∀ s : Qubits k,
          let v : Vec (Qubits n) := WithLp.toLp 2 fun z =>
            act V (tensorVec psi (zeroKet k)) (z,s)
          pureDensity v = pureDensity (act (processBranchOperator P s) psi) ∧
          ‖v‖ ^ 2 = ‖act (processBranchOperator P s) psi‖ ^ 2) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P52

end
Source
An introduction to measurement based quantum computation, arXiv:quant-ph/0508124v2, PDF p. 19, §8: coherent elimination of intermediate measurements
Read-back

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

For every pair of natural numbers n,kn,kn,k, including zero, write Br={0,1}rB_r=\{0,1\}^rBr​={0,1}r. Let PPP consist of the following data: for every t∈{0,…,k−1}t\in\{0,\ldots,k-1\}t∈{0,…,k−1} and history h∈Bth\in B_th∈Bt​, a unitary matrix Gt,hG_{t,h}Gt,h​ on CBn\mathbb C^{B_n}CBn​, a wire qt,h∈{0,…,n−1}q_{t,h}\in\{0,\ldots,n-1\}qt,h​∈{0,…,n−1}, and a unitary 2×22\times22×2 matrix Ct,hC_{t,h}Ct,h​; and, for every s∈Bks\in B_ks∈Bk​, a unitary matrix FsF_sFs​ on CBn\mathbb C^{B_n}CBn​. For each transcript s∈Bks\in B_ks∈Bk​, let ht=(s0,…,st−1)h_t=(s_0,\ldots,s_{t-1})ht​=(s0​,…,st−1​) and define matrices Πt,s\Pi_{t,s}Πt,s​ and KsK_sKs​ by

(Πt,s)y,z={(Ct,ht)yqt,ht,st (Ct,ht)zqt,ht,st‾,yi=zi for every i≠qt,ht,0,otherwise,Ks=Fs(Πk−1,sGk−1,hk−1)⋯(Π0,sG0,h0).(\Pi_{t,s})_{y,z}= \begin{cases} (C_{t,h_t})_{y_{q_{t,h_t}},s_t}\, \overline{(C_{t,h_t})_{z_{q_{t,h_t}},s_t}}, & y_i=z_i\text{ for every }i\ne q_{t,h_t},\\ 0,&\text{otherwise}, \end{cases} \qquad K_s=F_s(\Pi_{k-1,s}G_{k-1,h_{k-1}})\cdots(\Pi_{0,s}G_{0,h_0}).(Πt,s​)y,z​={(Ct,ht​​)yqt,ht​​​,st​​(Ct,ht​​)zqt,ht​​​,st​​​,0,​yi​=zi​ for every i=qt,ht​​,otherwise,​Ks​=Fs​(Πk−1,s​Gk−1,hk−1​​)⋯(Π0,s​G0,h0​​).

There exists a single unitary matrix VVV on CBn×Bk\mathbb C^{B_n\times B_k}CBn​×Bk​ such that, for every vector ψ∈CBn\psi\in\mathbb C^{B_n}ψ∈CBn​ with ∥ψ∥=1\|\psi\|=1∥ψ∥=1, applying VVV to the vector whose (z,s)(z,s)(z,s) coordinate is ψz\psi_zψz​ when sss is the all-zero string and is 000 otherwise gives precisely the vector with coordinates

[V(ψ⊗∣0k⟩)]z,s=(Ksψ)z(z∈Bn, s∈Bk).\bigl[V(\psi\otimes|0^k\rangle)\bigr]_{z,s}=(K_s\psi)_z \qquad(z\in B_n,\ s\in B_k).[V(ψ⊗∣0k⟩)]z,s​=(Ks​ψ)z​(z∈Bn​, s∈Bk​).

Moreover, for every s∈Bks\in B_ks∈Bk​, if vs(z)=[V(ψ⊗∣0k⟩)]z,sv_s(z)=\bigl[V(\psi\otimes|0^k\rangle)\bigr]_{z,s}vs​(z)=[V(ψ⊗∣0k⟩)]z,s​, then

vsvs†=(Ksψ)(Ksψ)†,∥vs∥2=∥Ksψ∥2,v_s v_s^\dagger=(K_s\psi)(K_s\psi)^\dagger, \qquad \|v_s\|^2=\|K_s\psi\|^2,vs​vs†​=(Ks​ψ)(Ks​ψ)†,∥vs​∥2=∥Ks​ψ∥2,

where the outer product vv†vv^\daggervv† has entries vyvz‾v_y\overline{v_z}vy​vz​​; these assertions include transcripts for which the branch vector is zero, without normalizing that vector. When k=0k=0k=0, there is one empty transcript, the product defining KsK_sKs​ is the identity, and Ks=FsK_s=F_sKs​=Fs​. When n=0<kn=0<kn=0<k, no such data PPP exist because a wire would have to be selected from an empty set.

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