Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Prepare-and-measure and entanglement-based realizations agree

Open
QAlgorithms.Papers.Independent.Intake100.P90.prepareMeasure_equivalence

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

prove2quantum

Fix a public encoding choice for nnn qubits. At position iii, Alice has normalized signals ϕi0,ϕi1\phi_i^0,\phi_i^1ϕi0​,ϕi1​, and Bob uses the source decoder Bi=si(∣0⟩⟨ϕ^i1∣+∣1⟩⟨ϕ^i0∣)B_i=s_i(|0\rangle\langle\widehat\phi_i^1|+|1\rangle\langle\widehat\phi_i^0|)Bi​=si​(∣0⟩⟨ϕ​i1​∣+∣1⟩⟨ϕ​i0​∣), where the hatted vectors are normalized orthogonal complements, si>0s_i>0si​>0, and Bi†Bi≤IB_i^\dagger B_i\le IBi†​Bi​≤I. Let Eve apply an arbitrary joint unitary to all signals and a normalized pure ancilla. Construct Alice's encoding filter from the signals, and use the same Eve unitary and decoder in the entanglement-based realization with the normalized nnn-pair Φ+\Phi^+Φ+ resource. For Alice word aaa and Bob outcome kkk, let va,kv_{a,k}va,k​ and wa,kw_{a,k}wa,k​ be the respective unnormalized prepare-and-measure and entanglement-based Eve vectors. Then

wa,k=2−n/2va,k,∣wa,k⟩⟨wa,k∣=2−n∣va,k⟩⟨va,k∣.w_{a,k}=2^{-n/2}v_{a,k},\qquad |w_{a,k}\rangle\langle w_{a,k}|=2^{-n}|v_{a,k}\rangle\langle v_{a,k}|.wa,k​=2−n/2va,k​,∣wa,k​⟩⟨wa,k​∣=2−n∣va,k​⟩⟨va,k​∣.

Their traces give the same physical joint outcome probabilities when Alice's uniform preparation probability 2−n2^{-n}2−n is included. Wherever the branch mass is positive, the normalized conditional Eve density matrices agree. Thus the classical outcomes and all retained quantum information agree, including after any common positive-probability sifting condition. This is an operational equivalence with the fixed public choices, not just a transpose identity.

Formalization Note The source omits the factor 2−n/22^{-n/2}2−n/2 in its branch equation. Physical filter scaling is explicit and identical on both sides; the raw nonorthogonal-signal decoder need not itself be a contraction. Alice's physical encoding uses positive factors aia_iai​ making aiAia_i A_iai​Ai​ a contraction. Its success probability, evaluated before Bob's filtering, is pA=(∏iai)2>0p_A=(\prod_i a_i)^2>0pA​=(∏i​ai​)2>0. Dividing each physical entanglement-based output block by pAp_ApA​ gives exactly 2−n∣va,k⟩⟨va,k∣2^{-n}|v_{a,k}\rangle\langle v_{a,k}|2−n∣va,k​⟩⟨va,k​∣. This conditions on a realizable encoding-success event rather than treating an unscaled nonunitary filter as deterministic.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P90
Formal statement
noncomputable section

open scoped ComplexConjugate ComplexOrder

attribute [local instance] Classical.propDecidable Classical.decEq

namespace QAlgorithms.Papers.Independent.Intake100.P90

/-- PDF pp.1--2, prepare-and-measure equivalence; corrected scalar in the
printed branch identity: the EB branch is 2^(-n/2) times the PM branch.
The complete cq blocks, probabilities, and positive-mass conditional Eve
states agree, with uniform Alice probability 2^(-n) on the PM side.
B is the physical contraction obtained by scaling the source's decoder. The unscaled B92
decoder need not be a contraction; physical scaling is necessary before
its squared amplitudes are interpreted as absolute probabilities.
Alice's encoding filter also has explicit positive physical scaling. Its
success mass is evaluated before Bob's filter, and conditioning on that
success gives exactly the uniform PM cq blocks. Everything uses the same
public encoding/sifting choice. -/
theorem prepareMeasure_equivalence {n : ℕ} {E : Type*} [Fintype E] [Nonempty E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (hphi : ∀ i b, IsState (phi i b))
    (hat : Fin n → Bool → EuclideanSpace ℂ Bool)
    (hhat : ∀ i b, IsState (hat i b) ∧ inner ℂ (phi i b) (hat i b) = 0)
    (s : Fin n → ℝ) (hs : ∀ i, 0 < s i)
    (hB : ∀ i, (1 - (sourceDecoder (hat i) (s i)).conjTranspose *
      sourceDecoder (hat i) (s i)).PosSemidef)
    (aScale : Fin n → ℝ) (haScale : ∀ i, 0 < aScale i)
    (hA : ∀ i, (1 - ((aScale i : ℂ) • localEncoding (phi i)).conjTranspose *
      ((aScale i : ℂ) • localEncoding (phi i))).PosSemidef)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ)
    (eta : EuclideanSpace ℂ E) (heta : IsState eta) :
    let B := fun i => sourceDecoder (hat i) (s i)
    encodingSuccessMass phi U eta aScale = (∏ i, aScale i) ^ 2 ∧
    0 < encodingSuccessMass phi U eta aScale ∧
    ∀ a k : Qubits n,
      ebBranch phi B U eta a k =
        (((Real.sqrt 2)⁻¹ : ℂ) ^ n) • pmBranch phi B U eta a k ∧
      pureDensity (ebBranch phi B U eta a k) =
        (((2 : ℝ) ^ n)⁻¹ : ℂ) • pureDensity (pmBranch phi B U eta a k) ∧
      (pureDensity (ebBranch phi B U eta a k)).trace.re =
        ((2 : ℝ) ^ n)⁻¹ * (pureDensity (pmBranch phi B U eta a k)).trace.re ∧
      ((encodingSuccessMass phi U eta aScale)⁻¹ : ℂ) •
        pureDensity (physicalEbBranch phi B U eta aScale a k) =
        (((2 : ℝ) ^ n)⁻¹ : ℂ) • pureDensity (pmBranch phi B U eta a k) ∧
      (0 < (pureDensity (pmBranch phi B U eta a k)).trace.re →
        sourceConditionalEve (ebBranch phi B U eta a k) =
          sourceConditionalEve (pmBranch phi B U eta a k) ∧
        sourceConditionalEve (physicalEbBranch phi B U eta aScale a k) =
          sourceConditionalEve (pmBranch phi B U eta a k)) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P90

end
Source
Lower and upper bounds on the secret key rate for QKD protocols using one--way classical communication, arXiv:quant-ph/0410215v2, PDF p. 2, Unnumbered prepare-and-measure / entanglement-based equivalence
Read-back

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

For every natural number nnn, every finite nonempty type EEE, and QnQ_nQn​ the set of Boolean strings of length nnn, suppose ϕi(t),ϕ^i(t)∈C{false,true}\phi_i(t),\widehat\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t),ϕ​i​(t)∈C{false,true} are given for every i<ni<ni<n and Boolean ttt, with ∥ϕi(t)∥=1\|\phi_i(t)\|=1∥ϕi​(t)∥=1, ∥ϕ^i(t)∥=1\|\widehat\phi_i(t)\|=1∥ϕ​i​(t)∥=1, and ⟨ϕi(t),ϕ^i(t)⟩=0\langle\phi_i(t),\widehat\phi_i(t)\rangle=0⟨ϕi​(t),ϕ​i​(t)⟩=0. Suppose real numbers si>0s_i>0si​>0 and αi>0\alpha_i>0αi​>0 are given, and define Boolean-indexed matrices

(Bi)u,v=si ϕ^i(¬u)(v)‾,(Li)u,v=ϕi(u)(v).(B_i)_{u,v}=s_i\,\overline{\widehat\phi_i(\neg u)(v)}, \qquad (L_i)_{u,v}=\phi_i(u)(v).(Bi​)u,v​=si​ϕ​i​(¬u)(v)​,(Li​)u,v​=ϕi​(u)(v).

Assume I2−Bi∗BiI_2-B_i^*B_iI2​−Bi∗​Bi​ and I2−(αiLi)∗(αiLi)I_2-(\alpha_iL_i)^*(\alpha_iL_i)I2​−(αi​Li​)∗(αi​Li​) are positive semidefinite for every i<ni<ni<n. Let UUU be any unitary matrix indexed by Qn×EQ_n\times EQn​×E, and let η∈CE\eta\in\mathbb C^Eη∈CE satisfy ∥η∥=1\|\eta\|=1∥η∥=1. Put A=∏i<nαiA=\prod_{i<n}\alpha_iA=∏i<n​αi​, cn=(1/2)nc_n=(1/\sqrt2)^ncn​=(1/2​)n, and define vectors in CE\mathbb C^ECE, for a,k∈Qna,k\in Q_na,k∈Qn​, by

Pa,k(e)=∑b,c∈Qn∑f∈E(∏i<n(Bi)ki,bi)U(b,e),(c,f)(∏i<nϕi(ai)(ci))ηf,P_{a,k}(e)= \sum_{b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left(\prod_{i<n}\phi_i(a_i)(c_i)\right)\eta_f,Pa,k​(e)=b,c∈Qn​∑​f∈E∑​(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​(i<n∏​ϕi​(ai​)(ci​))ηf​, Qa,k(e)=cn∑d,b,c∈Qn∑f∈E(∏i<nϕi(ai)(di))(∏i<n(Bi)ki,bi)U(b,e),(c,f)1{d=c}ηf,Ra,k=A Qa,k.Q_{a,k}(e)= c_n\sum_{d,b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(d_i)\right) \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)}\mathbf1_{\{d=c\}}\eta_f, \qquad R_{a,k}=A\,Q_{a,k}.Qa,k​(e)=cn​d,b,c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(di​))(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​1{d=c}​ηf​,Ra,k​=AQa,k​.

Define the real number

M=A2cn2∑a,k∈Qn∑e∈E∣∑c∈Qn∑f∈E(∏i<nϕi(ai)(ci))U(k,e),(c,f)ηf∣2.M=A^2c_n^2 \sum_{a,k\in Q_n}\sum_{e\in E} \left| \sum_{c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(c_i)\right) U_{(k,e),(c,f)}\eta_f \right|^2.M=A2cn2​a,k∈Qn​∑​e∈E∑​​c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(ci​))U(k,e),(c,f)​ηf​​2.

For a vector v∈CEv\in\mathbb C^Ev∈CE, write D(v)e,f=vevf‾D(v)_{e,f}=v_e\overline{v_f}D(v)e,f​=ve​vf​​, t(v)=∑e∈E∣ve∣2t(v)=\sum_{e\in E}|v_e|^2t(v)=∑e∈E​∣ve​∣2, and C(v)=t(v)−1D(v)C(v)=t(v)^{-1}D(v)C(v)=t(v)−1D(v), with real scalars viewed as complex scalars and 0−1=00^{-1}=00−1=0. The theorem asserts simultaneously that

M=A2,M>0,M=A^2,\qquad M>0,M=A2,M>0,

and, for every a,k∈Qna,k\in Q_na,k∈Qn​,

Qa,k=cnPa,k,D(Qa,k)=2−nD(Pa,k),t(Qa,k)=2−nt(Pa,k),M−1D(Ra,k)=2−nD(Pa,k),Q_{a,k}=c_nP_{a,k},\qquad D(Q_{a,k})=2^{-n}D(P_{a,k}),\qquad t(Q_{a,k})=2^{-n}t(P_{a,k}),\qquad M^{-1}D(R_{a,k})=2^{-n}D(P_{a,k}),Qa,k​=cn​Pa,k​,D(Qa,k​)=2−nD(Pa,k​),t(Qa,k​)=2−nt(Pa,k​),M−1D(Ra,k​)=2−nD(Pa,k​),

together with the implication

t(Pa,k)>0 ⟹ (C(Qa,k)=C(Pa,k) and C(Ra,k)=C(Pa,k)).t(P_{a,k})>0 \ \Longrightarrow\ \bigl(C(Q_{a,k})=C(P_{a,k}) \ \text{and}\ C(R_{a,k})=C(P_{a,k})\bigr).t(Pa,k​)>0 ⟹ (C(Qa,k​)=C(Pa,k​) and C(Ra,k​)=C(Pa,k​)).

Here ∗^{*}∗ denotes conjugate transpose. The statement includes n=0n=0n=0, when all assumptions indexed by i<ni<ni<n are vacuous and empty products equal 111; it does not require each branch Pa,kP_{a,k}Pa,k​ to be nonzero.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

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