Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2, Eqs. (19)–(20): mean and typical worst-case error

Open
QAlgorithms.Papers.Independent.Extend50.P03.random_worst_error

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. Put r=kt2/n→0r=kt^2/n\to0r=kt2/n→0 and B=kt4na(1−a)(1+Cr)B=\frac{k\sqrt t}{4n\sqrt{a(1-a)}}(1+Cr)B=4na(1−a)​kt​​(1+Cr). Eventually,

EH×εworst≤B,H×{U:εworst(U)>B}≤e−cn.\mathbb E_{H_\times}\varepsilon_{\rm worst}\le B,\qquad H_\times\{U:\varepsilon_{\rm worst}(U)>B\}\le e^{-cn}.EH×​​εworst​≤B,H×​{U:εworst​(U)>B}≤e−cn.

The error is reference-assisted, with one recovery for every input. For either excluded trivial case k=0k=0k=0 or t=0t=0t=0, the optimized error is exactly zero for every unitary encoder.

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

/-- Theorem 2, PDF p.11, Eqs.(19)–(20): kt^2=o(n), with k outside sqrt(t). -/
theorem random_worst_error :
    AsymptoticGuarantee ChargeHaar true ∧ ZeroErrorGuarantee true := 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. 11, Theorem 2, Eqs. (19)–(20): mean and typical worst-case error
Read-back

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

This theorem asserts both an asymptotic bound and two exact zero-error assertions for the following error. For a map N\mathcal NN from kkk qubits, set

ewc(N)=1−Fwc(N)2,Fwc(N)=sup⁡Dinf⁡r∈Nρ⪰0, Tr⁡ρ=1f ⁣(ρ,(idr+1⊗D∘N)(ρ)),f(X,Y)=Re⁡Tr⁡X Y X,e_{\mathrm{wc}}(\mathcal N)=\sqrt{1-F_{\mathrm{wc}}(\mathcal N)^2}, \qquad F_{\mathrm{wc}}(\mathcal N)= \sup_{\mathcal D} \inf_{\substack{r\in\mathbb N\\ \rho\succeq0,\ \operatorname{Tr}\rho=1}} f\!\left(\rho,(\mathrm{id}_{r+1}\otimes\mathcal D\circ\mathcal N)(\rho)\right), \quad f(X,Y)=\operatorname{Re}\operatorname{Tr}\sqrt{\sqrt X\,Y\,\sqrt X},ewc​(N)=1−Fwc​(N)2​,Fwc​(N)=Dsup​r∈Nρ⪰0, Trρ=1​inf​f(ρ,(idr+1​⊗D∘N)(ρ)),f(X,Y)=ReTrX​YX​​,

where ρ\rhoρ is indexed by {0,…,r}×Qk\{0,\ldots,r\}\times Q_k{0,…,r}×Qk​, Qs={0,1}sQ_s=\{0,1\}^sQs​={0,1}s, and decoders D\mathcal DD range over finite Kraus maps D(X)=∑jKjXKj†\mathcal D(X)=\sum_jK_jXK_j^\daggerD(X)=∑j​Kj​XKj†​ with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. For every real a∈(0,1)a\in(0,1)a∈(0,1), there exist real C,c>0C,c>0C,c>0 such that, for every sequence of natural-number tuples di=(ni,ki,αi,ti)d_i=(n_i,k_i,\alpha_i,t_i)di​=(ni​,ki​,αi​,ti​) with ni→∞n_i\to\inftyni​→∞, satisfying

1≤ni,1≤ki≤ni,αi≤ni−ki,1≤ti≤ni,αi=ani1\leq n_i,\quad1\leq k_i\leq n_i,\quad \alpha_i\leq n_i-k_i,\quad1\leq t_i\leq n_i,\quad \alpha_i=a n_i1≤ni​,1≤ki​≤ni​,αi​≤ni​−ki​,1≤ti​≤ni​,αi​=ani​

at every index and Ri=kiti2/ni→0R_i=k_i t_i^2/n_i\to0Ri​=ki​ti2​/ni​→0, there exists a natural number NNN such that for all i≥Ni\geq Ni≥N, every unit ancilla ψ∈CQni−ki\psi\in\mathbb C^{Q_{n_i-k_i}}ψ∈CQni​−ki​​ supported on Hamming weight αi\alpha_iαi​, every probability measure μ\muμ on unitaries on QniQ_{n_i}Qni​​ that is almost surely supported on unitaries commuting with the Hamming-weight operator and is invariant under left multiplication by every such unitary, and every erased subset SSS of size tit_iti​, the function

e(U)=ewc ⁣(Tr⁡S∘[X↦U(X⊗∣ψ⟩⟨ψ∣)U†])e(U)=e_{\mathrm{wc}}\!\left( \operatorname{Tr}_{S}\circ [X\mapsto U(X\otimes|\psi\rangle\langle\psi|)U^\dagger] \right)e(U)=ewc​(TrS​∘[X↦U(X⊗∣ψ⟩⟨ψ∣)U†])

is μ\muμ-integrable and satisfies

∫e(U) dμ(U)≤Bi,μ{U:Bi<e(U)}≤e−cni,Bi=kiti4nia(1−a)(1+CRi).\int e(U)\,d\mu(U)\leq B_i,\qquad \mu\{U:B_i<e(U)\}\leq e^{-c n_i}, \qquad B_i=\frac{k_i\sqrt{t_i}}{4n_i\sqrt{a(1-a)}}(1+CR_i).∫e(U)dμ(U)≤Bi​,μ{U:Bi​<e(U)}≤e−cni​,Bi​=4ni​a(1−a)​ki​ti​​​(1+CRi​).

The partial trace retains precisely the qubits outside SSS. Independently, for every natural n,αn,\alphan,α, every unit charge-α\alphaα ancilla on nnn qubits, every erased subset SSS, and every unitary UUU, the error is exactly 000 when k=0k=0k=0; and for every admissible ancilla with arbitrary kkk, the error is exactly 000 when S=∅S=\varnothingS=∅. These exact assertions impose no charge-conservation condition on UUU. The exact equalities αi=ani\alpha_i=a n_iαi​=ani​ remain part of the asymptotic hypotheses, which can therefore be unsatisfiable for a given 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