Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit optimal two-port resource and both successful outputs

Open
QAlgorithms.Papers.Independent.Intake100.P67.twoPort_explicit

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

prove2quantum

Let N=2N=2N=2, A=A1A2A=A_1A_2A=A1​A2​, and ∣ψ±⟩=(∣01⟩±∣10⟩)/2|\psi^\pm\rangle=(|01\rangle\pm|10\rangle)/\sqrt2∣ψ±⟩=(∣01⟩±∣10⟩)/2​. The canonical optimized resource is

∣ψ⟩=1/10∣ψ−⟩A∣ψ−⟩B+3/10(∣00⟩A∣11⟩B+∣11⟩A∣00⟩B−∣ψ+⟩A∣ψ+⟩B).|\psi\rangle=\sqrt{1/10}|\psi^-\rangle_A|\psi^-\rangle_B+\sqrt{3/10}(|00\rangle_A|11\rangle_B+|11\rangle_A|00\rangle_B-|\psi^+\rangle_A|\psi^+\rangle_B).∣ψ⟩=1/10​∣ψ−⟩A​∣ψ−⟩B​+3/10​(∣00⟩A​∣11⟩B​+∣11⟩A​∣00⟩B​−∣ψ+⟩A​∣ψ+⟩B​).

Define ∣x±⟩=(±∣ψ+⟩+3∣ψ−⟩)/2|x^\pm\rangle=(\pm|\psi^+\rangle+\sqrt3|\psi^-\rangle)/2∣x±⟩=(±∣ψ+⟩+3​∣ψ−⟩)/2, ∣η−⟩=2/3∣x−⟩∣0⟩+1/3∣00⟩∣1⟩|\eta^-\rangle=\sqrt{2/3}|x^-\rangle|0\rangle+\sqrt{1/3}|00\rangle|1\rangle∣η−⟩=2/3​∣x−⟩∣0⟩+1/3​∣00⟩∣1⟩ and ∣η+⟩=2/3∣x+⟩∣1⟩−1/3∣11⟩∣0⟩|\eta^+\rangle=\sqrt{2/3}|x^+\rangle|1\rangle-\sqrt{1/3}|11\rangle|0\rangle∣η+⟩=2/3​∣x+⟩∣1⟩−1/3​∣11⟩∣0⟩. The η\etaη vectors are orthonormal. The successful effects are the projector Π1=∣η−⟩⟨η−∣+∣η+⟩⟨η+∣\Pi_1=|\eta^-\rangle\langle\eta^-|+|\eta^+\rangle\langle\eta^+|Π1​=∣η−⟩⟨η−∣+∣η+⟩⟨η+∣ and its A1↔A2A_1\leftrightarrow A_2A1​↔A2​ exchange Π2\Pi_2Π2​, with positive failure remainder. They equal the optimized physical effects and give total success 2/52/52/5.

For every normalized input ∣v⟩|v\rangle∣v⟩, the square-root postmeasurement vector in branch 1 is

Π1(∣ψ⟩∣v⟩C)=5−1/2∣ψres⟩ACB2∣v⟩B1,\sqrt{\Pi_1}(|\psi\rangle|v\rangle_C)=5^{-1/2}|\psi_{\rm res}\rangle_{ACB_2}|v\rangle_{B_1},Π1​​(∣ψ⟩∣v⟩C​)=5−1/2∣ψres​⟩ACB2​​∣v⟩B1​​,

where the normalized residual is

∣ψres⟩=2−1/2(∣η−⟩∣1⟩−∣η+⟩∣0⟩)=2−1/2∣ψ−⟩A∣ψ−⟩CB2+6−1/2(∣00⟩∣11⟩+∣11⟩∣00⟩−∣ψ+⟩∣ψ+⟩).|\psi_{\rm res}\rangle=2^{-1/2}(|\eta^-\rangle|1\rangle-|\eta^+\rangle|0\rangle)=2^{-1/2}|\psi^-\rangle_A|\psi^-\rangle_{CB_2}+6^{-1/2}(|00\rangle|11\rangle+|11\rangle|00\rangle-|\psi^+\rangle|\psi^+\rangle).∣ψres​⟩=2−1/2(∣η−⟩∣1⟩−∣η+⟩∣0⟩)=2−1/2∣ψ−⟩A​∣ψ−⟩CB2​​+6−1/2(∣00⟩∣11⟩+∣11⟩∣00⟩−∣ψ+⟩∣ψ+⟩).

Branch 2 has the same expression with both A1↔A2A_1\leftrightarrow A_2A1​↔A2​ and B1↔B2B_1\leftrightarrow B_2B1​↔B2​. Each branch has probability 1/51/51/5.

This pins the physical instrument and its residual state, not only the success probability.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P67
Formal statement
noncomputable section

open scoped Matrix Kronecker ComplexConjugate ComplexOrder Matrix.Norms.L2Operator

attribute [local instance] Classical.propDecidable

attribute [local instance] Classical.decEq

namespace QAlgorithms.Papers.Independent.Intake100.P67

open QAlgorithms.Papers.Independent.Information100.P71 (supportPower)

open QAlgorithms.Papers.Independent.Advance50.P49 (spinMultiplicity)

/-- PDF p.9, Eqs.(57)–(59): resource, projective effects, both faithful successful
postmeasurement vectors and their residual Bell expansion. Each branch has probability 1/5. -/
theorem twoPort_explicit :
    (∀ a b, resource (resourceOperator (probabilisticX 2)) a b = twoPortResource a b) ∧
    IsState (twoPortEta false) ∧ IsState (twoPortEta true) ∧ inner ℂ (twoPortEta false) (twoPortEta true) = 0 ∧
    (∀ i : Fin 2, probabilisticMeasurement 2 i = twoPortMeasurement i ∧
      twoPortMeasurement i * twoPortMeasurement i = twoPortMeasurement i) ∧
    IsProbabilisticPortProtocol (resourceOperator (probabilisticX 2)) twoPortMeasurement ∧
    portSuccessProbability (resourceOperator (probabilisticX 2)) twoPortMeasurement = 2 / 5 ∧
    (∀ a c t, twoPortResidual a c t = twoPortResidualExpanded a c t) ∧
    (∑ a : Qubits 2, ∑ c : Bool, ∑ t : Bool,
      Complex.normSq (twoPortResidual a c t)) = 1 ∧
    (∀ (v : EuclideanSpace ℂ Bool), IsState v →
      (∀ a c b,
        postAmplitude (resourceOperator (probabilisticX 2)) (twoPortMeasurement 0) v a c b =
          (Real.sqrt 5 : ℂ)⁻¹ * twoPortResidual a c (b 1) * v (b 0)) ∧
      (∀ a c b,
        postAmplitude (resourceOperator (probabilisticX 2)) (twoPortMeasurement 1) v a c b =
          (Real.sqrt 5 : ℂ)⁻¹ * twoPortResidual (swapTwo a) c (b 0) * v (b 1)) ∧
      (∀ i : Fin 2,
        postBranchProbability (resourceOperator (probabilisticX 2)) (twoPortMeasurement i) v = 1 / 5)) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P67

end
Source
Quantum teleportation scheme by selecting one of multiple output ports, arXiv:0901.2975v2, PDF p. 9, §VII, Eqs. (57)–(59)
Read-back

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

Let Q={0,1}2Q=\{0,1\}^2Q={0,1}2, let s(0,1)=1/2s(0,1)=1/\sqrt2s(0,1)=1/2​, s(1,0)=−1/2s(1,0)=-1/\sqrt2s(1,0)=−1/2​, and s=0s=0s=0 otherwise, and let h(a,b)=1/2h(a,b)=1/\sqrt2h(a,b)=1/2​ when a≠ba\ne ba=b and 000 otherwise. Write ∣s⟩a=s(a0,a1)|s\rangle_{a}=s(a_0,a_1)∣s⟩a​=s(a0​,a1​), Ps=∣s⟩⟨s∣P_s=|s\rangle\langle s|Ps​=∣s⟩⟨s∣, X=25Ps+65(I−Ps)X=\tfrac25P_s+\tfrac65(I-P_s)X=52​Ps​+56​(I−Ps​), and O=XO=\sqrt XO=X​, the continuous-functional-calculus square root; this is the matrix specified by the declaration as the square root of the probabilistically optimized two-port resource matrix. Define

RO(a,b)=∑x∈QOaxs(x0,b0)s(x1,b1),R_O(a,b)=\sum_{x\in Q}O_{ax}s(x_0,b_0)s(x_1,b_1),RO​(a,b)=x∈Q∑​Oax​s(x0​,b0​)s(x1​,b1​), R∗(a,b)=110s(a0,a1)s(b0,b1)+310(1{a=00,b=11}+1{a=11,b=00}−h(a0,a1)h(b0,b1)),R_*(a,b)=\sqrt{\frac1{10}}s(a_0,a_1)s(b_0,b_1) +\sqrt{\frac3{10}}\left( \mathbf1_{\{a=00,b=11\}}+\mathbf1_{\{a=11,b=00\}} -h(a_0,a_1)h(b_0,b_1)\right),R∗​(a,b)=101​​s(a0​,a1​)s(b0​,b1​)+103​​(1{a=00,b=11}​+1{a=11,b=00}​−h(a0​,a1​)h(b0​,b1​)), x±(a)=±h(a0,a1)+3 s(a0,a1)2,x_\pm(a)=\frac{\pm h(a_0,a_1)+\sqrt3\,s(a_0,a_1)}2,x±​(a)=2±h(a0​,a1​)+3​s(a0​,a1​)​, η+(a,c)=23 x+(a)1{c=1}−131{a=11,c=0},η−(a,c)=23 x−(a)1{c=0}+131{a=00,c=1}.\eta_+(a,c)=\sqrt{\frac23}\,x_+(a)\mathbf1_{\{c=1\}} -\sqrt{\frac13}\mathbf1_{\{a=11,c=0\}}, \qquad \eta_-(a,c)=\sqrt{\frac23}\,x_-(a)\mathbf1_{\{c=0\}} +\sqrt{\frac13}\mathbf1_{\{a=00,c=1\}}.η+​(a,c)=32​​x+​(a)1{c=1}​−31​​1{a=11,c=0}​,η−​(a,c)=32​​x−​(a)1{c=0}​+31​​1{a=00,c=1}​.

Let τa=(a1,a0)\tau a=(a_1,a_0)τa=(a1​,a0​), P=η−η−†+η+η+†P=\eta_-\eta_-^\dagger+\eta_+\eta_+^\daggerP=η−​η−†​+η+​η+†​, M0=PM_0=PM0​=P, and (M1)(a,c),(a′,c′)=P(τa,c),(τa′,c′)(M_1)_{(a,c),(a',c')}=P_{(\tau a,c),(\tau a',c')}(M1​)(a,c),(a′,c′)​=P(τa,c),(τa′,c′)​. For a matrix TTT on the single other port define Di(T)(a,c),(a′,c′)=s(ai,c)s(ai′,c′)‾Ta≠i,a≠i′D_i(T)_{(a,c),(a',c')}=s(a_i,c)\overline{s(a'_i,c')}T_{a_{\ne i},a'_{\ne i}}Di​(T)(a,c),(a′,c′)​=s(ai​,c)s(ai′​,c′)​Ta=i​,a=i′​​, and put M~i=(X−1/2⊗I2)Di(45I2)(X−1/2⊗I2)\widetilde M_i=(X^{-1/2}\otimes I_2)D_i(\tfrac45I_2)(X^{-1/2}\otimes I_2)Mi​=(X−1/2⊗I2​)Di​(54​I2​)(X−1/2⊗I2​), the measurement specified by the optimized construction. Define

χ(a,c,t)=η−(a,c)1{t=1}−η+(a,c)1{t=0}2,\chi(a,c,t)=\frac{\eta_-(a,c)\mathbf1_{\{t=1\}} -\eta_+(a,c)\mathbf1_{\{t=0\}}}{\sqrt2},χ(a,c,t)=2​η−​(a,c)1{t=1}​−η+​(a,c)1{t=0}​​, χexp(a,c,t)=s(a0,a1)s(c,t)2+1{a=00,c=t=1}+1{a=11,c=t=0}−h(a0,a1)h(c,t)6.\chi_{\mathrm{exp}}(a,c,t) =\frac{s(a_0,a_1)s(c,t)}{\sqrt2} +\frac{\mathbf1_{\{a=00,c=t=1\}} +\mathbf1_{\{a=11,c=t=0\}} -h(a_0,a_1)h(c,t)}{\sqrt6}.χexp​(a,c,t)=2​s(a0​,a1​)s(c,t)​+6​1{a=00,c=t=1}​+1{a=11,c=t=0}​−h(a0​,a1​)h(c,t)​.

For an input vector v∈C2v\in\mathbb C^2v∈C2, let

Ai(v;a,c,b)=∑a′,c′(Mi)(a,c),(a′,c′)RO(a′,b)vc′,qi(v)=∑a,c,b∣Ai(v;a,c,b)∣2,A_i(v;a,c,b)=\sum_{a',c'} (\sqrt{M_i})_{(a,c),(a',c')}R_O(a',b)v_{c'}, \qquad q_i(v)=\sum_{a,c,b}|A_i(v;a,c,b)|^2,Ai​(v;a,c,b)=a′,c′∑​(Mi​​)(a,c),(a′,c′)​RO​(a′,b)vc′​,qi​(v)=a,c,b∑​∣Ai​(v;a,c,b)∣2,

where the square root again means real continuous functional calculus. The assertion is that RO(a,b)=R∗(a,b)R_O(a,b)=R_*(a,b)RO​(a,b)=R∗​(a,b) for all a,ba,ba,b; ∥η−∥=∥η+∥=1\|\eta_-\|=\|\eta_+\|=1∥η−​∥=∥η+​∥=1 and ⟨η−,η+⟩=0\langle\eta_-,\eta_+\rangle=0⟨η−​,η+​⟩=0; and for i=0,1i=0,1i=0,1, M~i=Mi\widetilde M_i=M_iMi​=Mi​ and Mi2=MiM_i^2=M_iMi2​=Mi​. Moreover, tr⁡(O†O)=4\operatorname{tr}(O^\dagger O)=4tr(O†O)=4, Mi⪰0M_i\succeq0Mi​⪰0, I−M0−M1⪰0I-M_0-M_1\succeq0I−M0​−M1​⪰0, and, for every unit input vvv and each iii, the retained output is qvv†qvv^\daggerqvv† for some real q≥0q\ge0q≥0, where its (u,w)(u,w)(u,w) entry is

∑b,b′∈Qbi=u, bi′=wbj=bj′ (j≠i)∑a,a′,c,c′RO(a,b)RO(a′,b′)‾ vcvc′‾(Mi)(a′,c′),(a,c).\sum_{\substack{b,b'\in Q\\b_i=u,\ b'_i=w\\b_j=b'_j\ (j\ne i)}} \sum_{a,a',c,c'} R_O(a,b)\overline{R_O(a',b')}\, v_c\overline{v_{c'}}(M_i)_{(a',c'),(a,c)}.b,b′∈Qbi​=u, bi′​=wbj​=bj′​ (j=i)​∑​a,a′,c,c′∑​RO​(a,b)RO​(a′,b′)​vc​vc′​​(Mi​)(a′,c′),(a,c)​.

The success quantity satisfies

18∑i=01Re⁡tr⁡[(O†⊗I2)Mi(O⊗I2)]=25.\frac18\sum_{i=0}^1 \operatorname{Re}\operatorname{tr} [(O^\dagger\otimes I_2)M_i(O\otimes I_2)]=\frac25.81​i=0∑1​Retr[(O†⊗I2​)Mi​(O⊗I2​)]=52​.

Finally, χ=χexp\chi=\chi_{\mathrm{exp}}χ=χexp​ at every a,c,ta,c,ta,c,t, ∑a,c,t∣χ(a,c,t)∣2=1\sum_{a,c,t}|\chi(a,c,t)|^2=1∑a,c,t​∣χ(a,c,t)∣2=1, and every unit vvv satisfies, for all a,c,ba,c,ba,c,b,

A0(v;a,c,b)=χ(a,c,b1)vb05,A1(v;a,c,b)=χ(τa,c,b0)vb15,q0(v)=q1(v)=15.A_0(v;a,c,b)=\frac{\chi(a,c,b_1)v_{b_0}}{\sqrt5}, \qquad A_1(v;a,c,b)=\frac{\chi(\tau a,c,b_0)v_{b_1}}{\sqrt5}, \qquad q_0(v)=q_1(v)=\frac15.A0​(v;a,c,b)=5​χ(a,c,b1​)vb0​​​,A1​(v;a,c,b)=5​χ(τa,c,b0​)vb1​​​,q0​(v)=q1​(v)=51​.
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