Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

II: effective state and conditional measurement distribution, (1)–(2)

Open
QAlgorithms.Papers.Independent.Intakethird100.P30.postselectionState

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let n≥1n\ge1n≥1, 0≤Q≤120\le Q\le\tfrac120≤Q≤21​, and let C=(Ck)k∈KC=(C_k)_{k\in K}C=(Ck​)k∈K​ be a nonempty family of distinct binary words of length nnn, where m=∣K∣m=|K|m=∣K∣. Write ρQ=(1−2Q)∣Φ+⟩⟨Φ+∣+(Q/2)I4\rho_Q=(1-2Q)|\Phi^+\rangle\langle\Phi^+|+(Q/2)I_4ρQ​=(1−2Q)∣Φ+⟩⟨Φ+∣+(Q/2)I4​, with ∣Φ+⟩=(∣00⟩+∣11⟩)/2|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt2∣Φ+⟩=(∣00⟩+∣11⟩)/2​. Regroup its independent copies as AnBnA^nB^nAnBn. Define KC=∑k∣k⟩⟨Ck∣K_C=\sum_k|k\rangle\langle C_k|KC​=∑k​∣k⟩⟨Ck​∣ and PC=(I⊗KC)ρQ⊗n(I⊗KC)†P_C=(I\otimes K_C)\rho_Q^{\otimes n}(I\otimes K_C)^\daggerPC​=(I⊗KC​)ρQ⊗n​(I⊗KC​)†. The input has trace one and is positive, and PCP_CPC​ is positive. If pQ(a,b)p_Q(a,b)pQ​(a,b) is the diagonal measurement law of the input, then

Tr⁡PC=Pr⁡(Bn∈C)=m2n>0,⟨a,k∣PC∣a,k⟩Tr⁡PC=pQ(a,Ck)Pr⁡(Bn∈C).\operatorname{Tr}P_C=\Pr(B^n\in C)=\frac{m}{2^n}>0,\qquad \frac{\langle a,k|P_C|a,k\rangle}{\operatorname{Tr}P_C} =\frac{p_Q(a,C_k)}{\Pr(B^n\in C)}.TrPC​=Pr(Bn∈C)=2nm​>0,TrPC​⟨a,k∣PC​∣a,k⟩​=Pr(Bn∈C)pQ​(a,Ck​)​.

Thus filtering preserves the complete conditional joint distribution, including Bob's codeword label. The filtered operator itself is unnormalized.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P30
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P30

open scoped BigOperators Matrix ComplexConjugate ComplexOrder

attribute [local instance] Classical.propDecidable Classical.decEq

variable {I J K L A B : Type}

variable [Fintype I] [Fintype J] [Fintype K] [Fintype L]

variable [Fintype A] [Fintype B]

/-- PDF pp.2–3, (1)–(2): actual filtering, positive acceptance mass m/2^n,
and the complete conditional joint law, rather than only a yes/no event. -/
theorem postselectionState {n : ℕ} (hn : 1 ≤ n) [Nonempty K]
    (C : K → Qubits n) (hC : Function.Injective C) (Q : ℝ)
    (hQ0 : 0 ≤ Q) (hQ1 : Q ≤ 1 / 2) :
    IsDensityMatrix (sixStateCopies (Fin n) Q) ∧ (bobState C Q).PosSemidef ∧
    (bobState C Q).trace = ((Fintype.card K : ℂ) / 2 ^ n) ∧
    acceptanceMass C Q = (Fintype.card K : ℝ) / 2 ^ n ∧
    0 < acceptanceMass C Q ∧
    ∀ (a : Qubits n) (k : K),
      diagonalLaw (bobState C Q) a k =
        (sixStateCopies (Fin n) Q (a, C k) (a, C k)).re / acceptanceMass C Q := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P30

end
Source
Numerical evidence for bound secrecy from two-way post-processing in quantum key distribution, arXiv:1612.07734v2, PDF p. 3, II: effective state and conditional measurement distribution, (1)–(2)
Read-back

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

Let n≥1n\ge1n≥1, let KKK be a finite nonempty label type with the required decidable equality, let C:K→{0,1}nC:K\to\{0,1\}^{n}C:K→{0,1}n be injective, and let 0≤Q≤1/20\le Q\le1/20≤Q≤1/2. Define

sQ(u,v;u′,v′)=1−2Q21u=v1u′=v′+Q21u=u′1v=v′,ρQ((a,b),(a′,b′))=∏i=0n−1sQ(ai,bi;ai′,bi′),s_Q(u,v;u',v') =\frac{1-2Q}{2}\mathbf1_{u=v}\mathbf1_{u'=v'} +\frac Q2\mathbf1_{u=u'}\mathbf1_{v=v'},\qquad \rho_Q((a,b),(a',b'))=\prod_{i=0}^{n-1}s_Q(a_i,b_i;a'_i,b'_i),sQ​(u,v;u′,v′)=21−2Q​1u=v​1u′=v′​+2Q​1u=u′​1v=v′​,ρQ​((a,b),(a′,b′))=i=0∏n−1​sQ​(ai​,bi​;ai′​,bi′​),

with real entries regarded as complex numbers, and define BC,Q((a,k),(a′,l))=ρQ((a,C(k)),(a′,C(l)))B_{C,Q}((a,k),(a',l))=\rho_Q((a,C(k)),(a',C(l)))BC,Q​((a,k),(a′,l))=ρQ​((a,C(k)),(a′,C(l))) and AC(Q)=∑a∑kRe⁡ρQ((a,C(k)),(a,C(k)))A_C(Q)=\sum_a\sum_k\operatorname{Re}\rho_Q((a,C(k)),(a,C(k)))AC​(Q)=∑a​∑k​ReρQ​((a,C(k)),(a,C(k))). The theorem asserts that ρQ\rho_QρQ​ is positive semidefinite with trace 111, that BC,QB_{C,Q}BC,Q​ is positive semidefinite, and that

tr⁡BC,Q=∣K∣2nin C,AC(Q)=∣K∣2nin R,AC(Q)>0.\operatorname{tr}B_{C,Q}=\frac{|K|}{2^n}\quad\text{in }\mathbb C,\qquad A_C(Q)=\frac{|K|}{2^n}\quad\text{in }\mathbb R,\qquad A_C(Q)>0.trBC,Q​=2n∣K∣​in C,AC​(Q)=2n∣K∣​in R,AC​(Q)>0.

It further asserts, for every string aaa and label kkk, that the diagonal entry normalized by the real trace satisfies

Re⁡BC,Q((a,k),(a,k))Re⁡tr⁡BC,Q=Re⁡ρQ((a,C(k)),(a,C(k)))AC(Q).\frac{\operatorname{Re}B_{C,Q}((a,k),(a,k))} {\operatorname{Re}\operatorname{tr}B_{C,Q}} = \frac{\operatorname{Re}\rho_Q((a,C(k)),(a,C(k)))}{A_C(Q)}.RetrBC,Q​ReBC,Q​((a,k),(a,k))​=AC​(Q)ReρQ​((a,C(k)),(a,C(k)))​.

Both endpoints Q=0Q=0Q=0 and Q=1/2Q=1/2Q=1/2 are included.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me