Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section V B, Eqs.(23)–(24), Appendix B3: worst-case sampling error

Proved
QAlgorithms.Papers.Independent.Advance50.P17.worstSampling

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

prove2quantum

Let E,F\mathcal E,\mathcal FE,F be fixed CPTP maps on a positive finite register. Measuring their outputs on each computational-basis input xxx gives distributions qxq_xqx​ and pxp_xpx​, respectively. For distributions r,sr,sr,s, define TV⁡(r,s)=12∑y∣r(y)−s(y)∣\operatorname{TV}(r,s)=\frac12\sum_y|r(y)-s(y)|TV(r,s)=21​∑y​∣r(y)−s(y)∣ and the unsquared overlap BC⁡(r,s)=∑yr(y)s(y)\operatorname{BC}(r,s)=\sum_y\sqrt{r(y)s(y)}BC(r,s)=∑y​r(y)s(y)​. Then

max⁡xTV⁡(qx,px)≤Dstab(E,F),max⁡x[1−BC⁡(qx,px)]≤Cstab(E,F)2.\max_x\operatorname{TV}(q_x,p_x)\le D_{\rm stab}(\mathcal E,\mathcal F),\qquad\max_x[1-\operatorname{BC}(q_x,p_x)]\le C_{\rm stab}(\mathcal E,\mathcal F)^2.xmax​TV(qx​,px​)≤Dstab​(E,F),xmax​[1−BC(qx​,px​)]≤Cstab​(E,F)2.

Both guarantees are uniform over the full basis input set; classical overlap is not silently squared.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P17
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped Matrix ComplexConjugate Topology

namespace QAlgorithms.Papers.Independent.Advance50.P17

open QAlgorithms.Papers.Independent.Information100.P53 (fidelity)

open QAlgorithms.Papers.Independent.Information100.P08 (canonicalPurification)

open QAlgorithms.Papers.Independent.Information100.P75 (hermitianReal)

variable {I J K : Type} [Fintype I] [Fintype J] [Fintype K]
  [DecidableEq I] [DecidableEq J] [DecidableEq K]
  [Nonempty I] [Nonempty J] [Nonempty K]

/-- Section V B, PDF p.10, Eqs.(23)--(24), Appendix B3, p.14: maximum over all basis inputs.
Classical F is the UNSQUARED Bhattacharyya overlap, including in the fidelity inequality. -/
theorem worstSampling (E F : FiniteProcess I I) :
    sSup (Set.range (fun x => classicalVariation (basisOutputLaw E.val x) (basisOutputLaw F.val x))) ≤
      stabDistance (stateDistance .trace) E.val F.val ∧
    sSup (Set.range (fun x => 1 - bhattacharyya (basisOutputLaw E.val x) (basisOutputLaw F.val x))) ≤
      stabC E.val F.val ^ 2 := by sorry

end QAlgorithms.Papers.Independent.Advance50.P17

end
Source
Distance measures to compare real and ideal quantum processes, arXiv:quant-ph/0408063v2, PDF p. 10, Section V B, Eqs.(23)–(24), Appendix B3: worst-case sampling error
Read-back

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

Let III be any finite nonempty type with decidable equality, and let E,FE,FE,F be channels on complex matrices indexed by III, meaning that each G∈{E,F}G\in\{E,F\}G∈{E,F} has a finite representation G(X)=∑jKjXKj†G(X)=\sum_jK_jXK_j^\daggerG(X)=∑j​Kj​XKj†​ valid for every XXX, with ∑jKj†Kj=1\sum_jK_j^\dagger K_j=\mathbf1∑j​Kj†​Kj​=1. Write exe_xex​ for the coordinate unit vector and pG(y∣x)=Re⁡(G(exex†)y,y)p_G(y\mid x)=\operatorname{Re}(G(e_xe_x^\dagger)_{y,y})pG​(y∣x)=Re(G(ex​ex†​)y,y​). For every unit vector v∈CI×Iv\in\mathbb C^{I\times I}v∈CI×I, define σG(v)\sigma_G(v)σG​(v) blockwise by σG(v)(a,b),(a′,b′)=G(Xa,a′v)b,b′\sigma_G(v)_{(a,b),(a',b')}=G(X^{v}_{a,a'})_{b,b'}σG​(v)(a,b),(a′,b′)​=G(Xa,a′v​)b,b′​, where (Xa,a′v)i,j=va,iva′,j‾(X^{v}_{a,a'})_{i,j}=v_{a,i}\overline{v_{a',j}}(Xa,a′v​)i,j​=va,i​va′,j​​. Define ∥M∥1=Re⁡tr⁡M†M\|M\|_1=\operatorname{Re}\operatorname{tr}\sqrt{M^\dagger M}∥M∥1​=RetrM†M​ and F(A,B)=(Re⁡tr⁡A B A)2\mathcal F(A,B)=\bigl(\operatorname{Re}\operatorname{tr}\sqrt{\sqrt A\,B\,\sqrt A}\bigr)^2F(A,B)=(RetrA​BA​​)2. Then both inequalities hold:

sup⁡x∈I12∑y∈I∣pE(y∣x)−pF(y∣x)∣≤sup⁡∥v∥=112∥σE(v)−σF(v)∥1,\sup_{x\in I}\frac12\sum_{y\in I} |p_E(y\mid x)-p_F(y\mid x)| \le \sup_{\|v\|=1}\frac12\|\sigma_E(v)-\sigma_F(v)\|_1,x∈Isup​21​y∈I∑​∣pE​(y∣x)−pF​(y∣x)∣≤∥v∥=1sup​21​∥σE​(v)−σF​(v)∥1​, sup⁡x∈I(1−∑y∈IpE(y∣x)pF(y∣x))≤(1−inf⁡∥v∥=1F(σE(v),σF(v)))2.\sup_{x\in I}\left(1-\sum_{y\in I} \sqrt{p_E(y\mid x)p_F(y\mid x)}\right) \le \left(\sqrt{1-\inf_{\|v\|=1} \mathcal F(\sigma_E(v),\sigma_F(v))}\right)^2.x∈Isup​​1−y∈I∑​pE​(y∣x)pF​(y∣x)​​≤(1−∥v∥=1inf​F(σE​(v),σF​(v))​)2.

The unit vectors in both extrema range over the entire space CI×I\mathbb C^{I\times I}CI×I, and the statement includes ∣I∣=1|I|=1∣I∣=1.

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

    Confirmed by the moderator at approval.

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