Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exact two-port initial and residual entanglement

Open
QAlgorithms.Papers.Independent.Intake100.P67.twoPort_entanglement

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

prove2quantum

Use the optimal two-port resource and the square-root instrument of §VII. Entropy is measured in bits. The initial Bob marginal is a density matrix and its entropy is exactly

Eini=−110log⁡2110−910log⁡2310.E_{\rm ini}=-\frac1{10}\log_2\frac1{10}-\frac9{10}\log_2\frac3{10}.Eini​=−101​log2​101​−109​log2​103​.

For either successful port and every normalized pure input, the branch probability is positive, the normalized unused-port marginal is a density matrix, and its entropy, equal to the entanglement of the pure residual across (AC):Bunused(AC):B_{\rm unused}(AC):Bunused​, is

Eres=1,Eini−Eres<1.E_{\rm res}=1,\qquad E_{\rm ini}-E_{\rm res}<1.Eres​=1,Eini​−Eres​<1.

The selected output port is excluded from this residual. The source's decimal values 1.901.901.90 and 0.900.900.90 are rounded; they are not exact equalities.

This gives an exact sub-ebit consumption example.

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 pp.9–10, §VIII: exact two-port entropies and consumption below one ebit.
Printed E_ini=1.90 and consumption=0.90 are rounded; the exact initial entropy is used. -/
theorem twoPort_entanglement :
    IsDensityMatrix (bobDensity (resourceOperator (probabilisticX 2))) ∧
    vnEntropy (bobDensity (resourceOperator (probabilisticX 2))) = twoPortInitialEntropy ∧
    (∀ (v : EuclideanSpace ℂ Bool), IsState v → ∀ i : Fin 2,
      0 < postBranchProbability (resourceOperator (probabilisticX 2)) (twoPortMeasurement i) v ∧
      IsDensityMatrix (residualDensity (resourceOperator (probabilisticX 2))
        (twoPortMeasurement i) v i) ∧
      vnEntropy (residualDensity (resourceOperator (probabilisticX 2))
        (twoPortMeasurement i) v i) = 1) ∧
    twoPortInitialEntropy - 1 < 1 := 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, §VIII, pp.9–10
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 set h(a,b)=1{a≠b}/2h(a,b)=\mathbf1_{\{a\ne b\}}/\sqrt2h(a,b)=1{a=b}​/2​. Let PsP_sPs​ be the rank-one matrix with entries s(a0,a1)s(a0′,a1′)‾s(a_0,a_1)\overline{s(a'_0,a'_1)}s(a0​,a1​)s(a0′​,a1′​)​, and put O=25Ps+65(I−Ps)O=\sqrt{\tfrac25P_s+\tfrac65(I-P_s)}O=52​Ps​+56​(I−Ps​)​, with the square root taken by real continuous functional calculus. Define

R(a,b)=∑x∈QOaxs(x0,b0)s(x1,b1),Bbb′=∑a∈QR(a,b)R(a,b′)‾,R(a,b)=\sum_{x\in Q}O_{ax}s(x_0,b_0)s(x_1,b_1),\qquad B_{bb'}=\sum_{a\in Q}R(a,b)\overline{R(a,b')},R(a,b)=x∈Q∑​Oax​s(x0​,b0​)s(x1​,b1​),Bbb′​=a∈Q∑​R(a,b)R(a,b′)​, 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)=23x+(a)1{c=1}−131{a=11,c=0},η−(a,c)=23x−(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}​.

Set M0=η−η−†+η+η+†M_0=\eta_-\eta_-^\dagger+\eta_+\eta_+^\daggerM0​=η−​η−†​+η+​η+†​, and obtain M1M_1M1​ by interchanging a0,a1a_0,a_1a0​,a1​ in both the row and column indices of M0M_0M0​. For every unit vector v∈C2v\in\mathbb C^2v∈C2, define

Ai(v;a,c,b)=∑a′,c′(Mi)(a,c),(a′,c′)R(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(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′)​R(a′,b)vc′​,qi​(v)=a,c,b∑​∣Ai​(v;a,c,b)∣2.

If rrr assigns a bit to the one index other than iii, let bi(r,t)b_i(r,t)bi​(r,t) be the two-bit assignment with value ttt at iii and values rrr elsewhere, and define

(Γi(v))rr′=∑a,c,tAi(v;a,c,bi(r,t)) Ai(v;a,c,bi(r′,t))‾qi(v).(\Gamma_i(v))_{rr'} =\frac{\displaystyle\sum_{a,c,t} A_i(v;a,c,b_i(r,t))\, \overline{A_i(v;a,c,b_i(r',t))}}{q_i(v)}.(Γi​(v))rr′​=qi​(v)a,c,t∑​Ai​(v;a,c,bi​(r,t))Ai​(v;a,c,bi​(r′,t))​​.

For any matrix ZZZ on the relevant finite space, write

S(Z)=−Re⁡tr⁡(cfc⁡(x↦xlog⁡2x,Z)),S(Z)=-\operatorname{Re}\operatorname{tr} \bigl(\operatorname{cfc}(x\mapsto x\log_2x,Z)\bigr),S(Z)=−Retr(cfc(x↦xlog2​x,Z)),

using the real functional calculus and the convention 0log⁡20=00\log_2 0=00log2​0=0. The assertion is that BBB is positive semidefinite with trace 111, and

S(B)=H∗,H∗=−110log⁡2110−910log⁡2310.S(B)=H_*, \qquad H_*=-\frac1{10}\log_2\frac1{10} -\frac9{10}\log_2\frac3{10}.S(B)=H∗​,H∗​=−101​log2​101​−109​log2​103​.

For every unit vvv and each i=0,1i=0,1i=0,1, qi(v)>0q_i(v)>0qi​(v)>0, Γi(v)\Gamma_i(v)Γi​(v) is positive semidefinite with trace 111, and S(Γi(v))=1S(\Gamma_i(v))=1S(Γi​(v))=1. In addition, H∗−1<1H_*-1<1H∗​−1<1.

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