Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix B: linear-charge averaged Choi fidelity and purified-distance expansion

Open
QAlgorithms.Papers.Independent.Extend50.P03.average_choi_asymptotics

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

prove2quantum

A code encodes kkk logical qubits in nnn physical qubits, with 0≤k≤n0\le k\le n0≤k≤n, by appending a fixed normalized (n−k)(n-k)(n−k)-qubit eigenvector ψα\psi_\alphaψα​ of the Hamming-weight charge Q(n−k)Q^{(n-k)}Q(n−k) with eigenvalue 0≤α≤n−k0\le\alpha\le n-k0≤α≤n−k, then applying UUU. Thus EU(ρ)=U(ρ⊗∣ψα⟩⟨ψα∣)U†\mathcal E_U(\rho)=U(\rho\otimes|\psi_\alpha\rangle\langle\psi_\alpha|)U^\daggerEU​(ρ)=U(ρ⊗∣ψα​⟩⟨ψα​∣)U†. The ancilla is chosen independently of UUU. The law H×H_\timesH×​ is probability Haar on the full charge centralizer, including every sector phase. Erasure of a set SSS of t≤nt\le nt≤n wires gives its complement to the decoder. Fidelity FFF means root fidelity and P=1−F2P=\sqrt{1-F^2}P=1−F2​. The optimized Choi error uses normalized kkk EPR pairs; the optimized worst error chooses one CPTP decoder before all normalized joint logical/reference states over every finite reference dimension.

Fix a∈(0,1)a\in(0,1)a∈(0,1). Work along admissible integer sequences n→∞n\to\inftyn→∞ with k,t≥1k,t\ge1k,t≥1 and α=an\alpha=anα=an exactly. The constants below are positive and depend only on aaa, preceding the growth sequence, ancilla, and erased-wire choices; the eventual threshold may depend on the sequence. The displayed little-o ratio tends to zero. Expectations are integrable, and a probability bound allows a zero bad-event probability. Write ρRE=Tr⁡n−tΦavg\rho_{RE}=\operatorname{Tr}_{n-t}\Phi_{\rm avg}ρRE​=Trn−t​Φavg​ for the constructed averaged EPR output, ζ0=Tr⁡RρRE\zeta_0=\operatorname{Tr}_R\rho_{RE}ζ0​=TrR​ρRE​, F=F(ρRE,IR/2k⊗ζ0)F=F(\rho_{RE},I_R/2^k\otimes\zeta_0)F=F(ρRE​,IR​/2k⊗ζ0​) and P=P(ρRE,IR/2k⊗ζ0)P=P(\rho_{RE},I_R/2^k\otimes\zeta_0)P=P(ρRE​,IR​/2k⊗ζ0​). The fidelity clause assumes kt/n→0kt/n\to0kt/n→0; the relative purified-distance clause separately assumes k2t2/n→0k^2t^2/n\to0k2t2/n→0. In their respective regimes, eventually

∣F−(1−tk32a(1−a)n2)∣≤Ck3t3n3,∣Ptk/(4na(1−a))−1∣≤Ck2t2n.\left|F-\left(1-\frac{tk}{32a(1-a)n^2}\right)\right|\le C\frac{k^3t^3}{n^3},\qquad \left|\frac{P}{\sqrt{tk}/(4n\sqrt{a(1-a)})}-1\right|\le C\frac{k^2t^2}{n}.​F−(1−32a(1−a)n2tk​)​≤Cn3k3t3​,​tk​/(4na(1−a)​)P​−1​≤Cnk2t2​.

These are two-sided expansions of the specific average-state comparison, not optimized decoder errors.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P03
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped Matrix ComplexConjugate ComplexOrder ENNReal Matrix.Norms.Elementwise

namespace QAlgorithms.Papers.Independent.Extend50.P03

open QAlgorithms.Papers.Independent.Support50.P23 (minEntropy)

attribute [local instance] Classical.propDecidable

attribute [local instance] QAlgorithms.Papers.Independent.Extend50.P03.matrixContinuousENorm

/-- Appendix B, PDF pp.22–23: the fidelity expansion assumes kt=o(n).
The relative purified-distance expansion separately assumes k^2t^2=o(n).
Fidelity deficit has denominator n^2; both constants are uniform in the sequence. -/
theorem average_choi_asymptotics :
    ∀ a : ℝ, 0 < a → a < 1 → ∃ C : ℝ, 0 < C ∧
      ∀ d : ℕ → ChargeCodeParameters, LinearSequence a d →
      (Tendsto (fun i => ((d i).k : ℝ) * (d i).t / (d i).n) atTop (nhds 0) →
        ∃ N : ℕ, ∀ i ≥ N,
        let n := (d i).n; let k := (d i).k; let alpha := (d i).alpha; let t := (d i).t
        let F := rootFidelity (reducedAverage n k alpha t) (comparisonChoi n k alpha t)
        |F - (1 - (t : ℝ)*k/(32*a*(1-a)*(n : ℝ)^2))| ≤
          C*(k : ℝ)^3*(t : ℝ)^3/(n : ℝ)^3) ∧
      (Tendsto (fun i => relativeRemainder false (d i)) atTop (nhds 0) →
        ∃ N : ℕ, ∀ i ≥ N,
        let n := (d i).n; let k := (d i).k; let alpha := (d i).alpha; let t := (d i).t
        let P := purified (reducedAverage n k alpha t) (comparisonChoi n k alpha t)
        |P / leadingError false a (d i) - 1| ≤ C * relativeRemainder false (d i)) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P03

end
Source
Charge-conserving unitaries typically generate optimal covariant quantum error-correcting codes, arXiv:2102.11835v1, PDF p. 23, Appendix B: linear-charge averaged Choi fidelity and purified-distance expansion
Read-back

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

For every real aaa with 0<a<10<a<10<a<1, there exists one real constant C>0C>0C>0 such that the following two implications hold for every sequence di=(ni,ki,αi,ti)d_i=(n_i,k_i,\alpha_i,t_i)di​=(ni​,ki​,αi​,ti​) of natural parameters satisfying ni→∞n_i\to\inftyni​→∞, 1≤ni1\le n_i1≤ni​, 1≤ki≤ni1\le k_i\le n_i1≤ki​≤ni​, αi≤ni−ki\alpha_i\le n_i-k_iαi​≤ni​−ki​, 1≤ti≤ni1\le t_i\le n_i1≤ti​≤ni​, and αi=ani\alpha_i=an_iαi​=ani​ for every iii. Define Πj,q\Pi_{j,q}Πj,q​ to be the diagonal matrix on {0,1}j\{0,1\}^j{0,1}j with entry 111 at strings of weight qqq and 000 elsewhere, and define c(j,q)=(jq)c(j,q)=\binom jqc(j,q)=(qj​) for integers 0≤q≤j0\le q\le j0≤q≤j, and c(j,q)=0c(j,q)=0c(j,q)=0 otherwise. For natural n,k,α,tn,k,\alpha,tn,k,α,t, put

Rn,k,α,t=∑j=0k∑h=0t2−kc(n−t,j+α−h)c(n,j+α) Πk,j⊗Πt,h,R_{n,k,\alpha,t} =\sum_{j=0}^{k}\sum_{h=0}^{t} \frac{2^{-k}c(n-t,j+\alpha-h)}{c(n,j+\alpha)} \,\Pi_{k,j}\otimes\Pi_{t,h},Rn,k,α,t​=j=0∑k​h=0∑t​c(n,j+α)2−kc(n−t,j+α−h)​Πk,j​⊗Πt,h​, Zn,k,α,t=∑h=0t(2−k∑j=0k(kj)c(n−t,j+α−h)c(n,j+α))Πt,h,Tn,k,α,t=2−kI⊗Zn,k,α,t.Z_{n,k,\alpha,t} =\sum_{h=0}^{t}\left( 2^{-k}\sum_{j=0}^{k}\binom kj \frac{c(n-t,j+\alpha-h)}{c(n,j+\alpha)} \right)\Pi_{t,h}, \qquad T_{n,k,\alpha,t}=2^{-k}I\otimes Z_{n,k,\alpha,t}.Zn,k,α,t​=h=0∑t​(2−kj=0∑k​(jk​)c(n,j+α)c(n−t,j+α−h)​)Πt,h​,Tn,k,α,t​=2−kI⊗Zn,k,α,t​.

Let

Fi=Re⁡tr⁡Rni,ki,αi,ti Tni,ki,αi,ti Rni,ki,αi,ti,Pi=1−Fi2,F_i=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{R_{n_i,k_i,\alpha_i,t_i}}\, T_{n_i,k_i,\alpha_i,t_i}\, \sqrt{R_{n_i,k_i,\alpha_i,t_i}}}, \qquad P_i=\sqrt{1-F_i^2},Fi​=RetrRni​,ki​,αi​,ti​​​Tni​,ki​,αi​,ti​​Rni​,ki​,αi​,ti​​​​,Pi​=1−Fi2​​,

where matrix square roots are defined by functional calculus. If kiti/ni→0k_it_i/n_i\to0ki​ti​/ni​→0, then there exists a natural NNN such that, for every i≥Ni\ge Ni≥N,

∣Fi−(1−tiki32a(1−a)ni2)∣≤Cki3ti3ni3.\left|F_i-\left(1-\frac{t_ik_i}{32a(1-a)n_i^2}\right)\right| \le C\frac{k_i^3t_i^3}{n_i^3}.​Fi​−(1−32a(1−a)ni2​ti​ki​​)​≤Cni3​ki3​ti3​​.

If instead ki2ti2/ni→0k_i^2t_i^2/n_i\to0ki2​ti2​/ni​→0, then there exists a natural NNN such that, for every i≥Ni\ge Ni≥N,

∣Pitiki/(4nia(1−a))−1∣≤Cki2ti2ni.\left| \frac{P_i}{\sqrt{t_ik_i}/\bigl(4n_i\sqrt{a(1-a)}\bigr)}-1 \right| \le C\frac{k_i^2t_i^2}{n_i}.​ti​ki​​/(4ni​a(1−a)​)Pi​​−1​≤Cni​ki2​ti2​​.

The two eventual thresholds may differ, while CCC is chosen before the sequence and serves both implications. All displayed denominators are positive under the sequence hypotheses. The exact equalities αi=ani\alpha_i=an_iαi​=ani​ exclude such sequences for irrational aaa.

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