Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1.16: Spectrum learning sample complexity

Open
QAlgorithms.Papers.Independent.Extend50.P32.spectrumLearning

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

prove2quantum

Let d≥1d\ge1d≥1 and let ρ∈Cd×d\rho\in\mathbb C^{d\times d}ρ∈Cd×d be positive semidefinite of trace one, with nonincreasing spectrum α\alphaα. On n≥1n\ge1n≥1 copies the concrete Keyl experiment draws a weak-Schur shape λ\lambdaλ and then V∼Kλ(ρ)V\sim K_\lambda(\rho)V∼Kλ​(ρ). Its rank-kkk report is ρ^k=Vdiag⁡(λ1/n,…,λk/n,0,…,0)V†\widehat\rho_k=V\operatorname{diag}(\lambda_1/n,\ldots,\lambda_k/n,0,\ldots,0)V^\daggerρ​k​=Vdiag(λ1​/n,…,λk​/n,0,…,0)V†, with no renormalization, for 1≤k≤d1\le k\le d1≤k≤d. Write Rk=EDH2(ρ^k,ρ)R_k=\mathbb E D_{H^2}(\widehat\rho_k,\rho)Rk​=EDH2​(ρ​k​,ρ), where DH2(A,B)=Tr⁡((A−B)2)D_{H^2}(A,B)=\operatorname{Tr}((\sqrt A-\sqrt B)^2)DH2​(A,B)=Tr((A​−B​)2), and α>k=∑i=k+1dαi\alpha_{>k}=\sum_{i=k+1}^d\alpha_iα>k​=∑i=k+1d​αi​. The full report has k=dk=dk=d. For every 0<ϵ<10<\epsilon<10<ϵ<1, one absolute constant C>0C>0C>0 suffices. The positive integer sample count is chosen from d,k,ϵd,k,\epsilond,k,ϵ before the unknown state or spectrum. The guarantees are expected loss at most ϵ\epsilonϵ and success probability at least 2/32/32/3, separately for each indicated metric; integer budgets are rounded upward. No runtime or arbitrary-confidence claim is made. For these spectrum statements use EYD: weak Schur sampling followed by the report α^=λ/n\widehat\alpha=\lambda/nα=λ/n. For n≥1n\ge1n≥1, put λˉ=λ/n\bar\lambda=\lambda/nλˉ=λ/n. Hellinger squared is ∑i(ai−bi)2\sum_i(\sqrt{a_i}-\sqrt{b_i})^2∑i​(ai​​−bi​​)2, chi-squared is ∑i(ai−bi)2/bi\sum_i(a_i-b_i)^2/b_i∑i​(ai​−bi​)2/bi​, and KL is ∑iailn⁡(ai/bi)\sum_i a_i\ln(a_i/b_i)∑i​ai​ln(ai​/bi​). The estimate is the first argument, zero-over-zero terms contribute zero, and positive estimated mass at zero true mass gives infinite divergence. A superscript (k)(k)(k) retains only the first kkk terms, without renormalization.

n≤⌈Cd2ϵ⌉,ED(α^,α)≤ϵ,Pr⁡{D(α^,α)≤ϵ}≥23,D∈{dH2,dKL,dχ2}.n\le\left\lceil C\frac{d^2}{\epsilon}\right\rceil,\qquad \mathbb E D(\widehat\alpha,\alpha)\le\epsilon,\quad \Pr\{D(\widehat\alpha,\alpha)\le\epsilon\}\ge\frac23,\quad D\in\{d_{H^2},d_{\mathrm{KL}},d_{\chi^2}\}.n≤⌈Cϵd2​⌉,ED(α,α)≤ϵ,Pr{D(α,α)≤ϵ}≥32​,D∈{dH2​,dKL​,dχ2​}.

This is a sample-complexity or risk guarantee for the concrete collective measurement and public decoder; it asserts no gate bound.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P32
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped BigOperators ENNReal Matrix ComplexOrder Topology

namespace QAlgorithms.Papers.Independent.Extend50.P32

open QAlgorithms.Papers.Independent.Support50.P38 (wordMass tv)

-- For the density matrices below, the characteristic-polynomial identity
-- preserves all eigenvalues with multiplicity and is equivalent to unitary
-- diagonalization with these real eigenvalues. No accuracy is assumed.

open QAlgorithms.Papers.Independent.Gap20.P17 (HasSpectrum)

/-- Theorem 1.16, PDF p.6: physical EYD learning, expected error and its
constant-success consequence. The sample count is chosen BEFORE the spectrum;
no confidence amplification or gate complexity is asserted. -/
theorem spectrumLearning : ∃ C : ℝ, 0 < C ∧
    ∀ (d : ℕ) (hd : 0 < d) (epsilon : ℝ), 0 < epsilon → epsilon < 1 →
      ∃ (n : ℕ) (hn : 0 < n), n ≤ copyBudget C ((d : ℝ) ^ 2 / epsilon) ∧
        ∀ (alpha : Fin d → ℝ) (hAlpha : Learning.IsDistribution alpha) (hSorted : Antitone alpha)
          (metric : FullMetric),
          eydRisk hd hn alpha hAlpha hSorted (fullLoss metric) ≤ ENNReal.ofReal epsilon ∧
          ENNReal.ofReal (2 / 3 : ℝ) ≤ eydSuccess hd hn alpha hAlpha hSorted (fullLoss metric) epsilon := by sorry

end QAlgorithms.Papers.Independent.Extend50.P32

end
Source
Efficient quantum tomography II, arXiv:1612.00034v1, PDF p. 6, Theorem 1.16
Read-back

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

There exists a real constant C>0C>0C>0 such that, for every integer d>0d>0d>0 and every real 0<ϵ<10<\epsilon<10<ϵ<1, there is an integer n>0n>0n>0, chosen before the distribution or loss is specified, satisfying n≤⌈Cd2/ϵ⌉+n\le\lceil Cd^2/\epsilon\rceil_+n≤⌈Cd2/ϵ⌉+​, with the following property. For every nonincreasing probability vector α∈Rd\alpha\in\mathbb R^dα∈Rd, define a measure μα,n\mu_{\alpha,n}μα,n​ on Young diagrams λ\lambdaλ having nnn cells and at most ddd rows as follows: number the cells by {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} using the chosen finite-set equivalence, let Rλ,CλR_\lambda,C_\lambdaRλ​,Cλ​ be the permutations preserving each cell’s row and column respectively, and form the permutation-indexed matrix

(Yλ)g,h=∑r∈Rλ∑c∈Cλ1{g=hrc}sgn⁡(c).(Y_\lambda)_{g,h}=\sum_{r\in R_\lambda}\sum_{c\in C_\lambda} \mathbf1_{\{g=hrc\}}\operatorname{sgn}(c).(Yλ​)g,h​=r∈Rλ​∑​c∈Cλ​∑​1{g=hrc}​sgn(c).

Let PλP_\lambdaPλ​ be the orthogonal projection onto its complex range, let LπL_\piLπ​ have entries 1{g=πh}\mathbf1_{\{g=\pi h\}}1{g=πh}​, put χλ(π)=tr⁡(LπPλ)\chi_\lambda(\pi)=\operatorname{tr}(L_\pi P_\lambda)χλ​(π)=tr(Lπ​Pλ​) and fλ=rank⁡Yλf_\lambda=\operatorname{rank}Y_\lambdafλ​=rankYλ​, and let TπT_\piTπ​ have entries 1{y=x∘π−1}\mathbf1_{\{y=x\circ\pi^{-1}\}}1{y=x∘π−1}​ on words in {0,…,d−1}n\{0,\ldots,d-1\}^n{0,…,d−1}n. Set Πλ=(fλ/n!)∑πχλ(π−1)Tπ\Pi_\lambda=(f_\lambda/n!)\sum_\pi\chi_\lambda(\pi^{-1})T_\piΠλ​=(fλ​/n!)∑π​χλ​(π−1)Tπ​. The mass of λ\lambdaλ is max⁡{0,Re⁡tr⁡(ΠλDα)}\max\{0,\operatorname{Re}\operatorname{tr}(\Pi_\lambda D_\alpha)\}max{0,Retr(Πλ​Dα​)}, where DαD_\alphaDα​ is diagonal with entry ∏iαxi\prod_i\alpha_{x_i}∏i​αxi​​ at word xxx. Report α^i=λi/n\widehat\alpha_i=\lambda_i/nαi​=λi​/n, using zero for missing rows. For each of the three losses

LH(a,b)=∑i(ai−bi)2,LKL(a,b)=∑i:ai≠0ailog⁡(ai/bi),Lχ2(a,b)=∑i(ai−bi)2bi,L_H(a,b)=\sum_i(\sqrt{a_i}-\sqrt{b_i})^2,\qquad L_{\rm KL}(a,b)=\sum_{i:a_i\ne0}a_i\log(a_i/b_i),\qquad L_{\chi^2}(a,b)=\sum_i\frac{(a_i-b_i)^2}{b_i},LH​(a,b)=i∑​(ai​​−bi​​)2,LKL​(a,b)=i:ai​=0∑​ai​log(ai​/bi​),Lχ2​(a,b)=i∑​bi​(ai​−bi​)2​,

the nonnegative extended-real risk is at most ϵ\epsilonϵ and the μα,n\mu_{\alpha,n}μα,n​-measure of the event that the loss is at most ϵ\epsilonϵ is at least 2/32/32/3. Precisely, real-valued losses are truncated below at zero; KL loss is +∞+\infty+∞ if some ai≠0a_i\ne0ai​=0 has bi=0b_i=0bi​=0, and a chi-squared summand with bi=0b_i=0bi​=0 is 000 when ai=0a_i=0ai​=0 and +∞+\infty+∞ otherwise. Risk means the integral of this loss against μα,n\mu_{\alpha,n}μα,n​. The same nnn works for every such α\alphaα and all three losses, including distributions with zero entries and d=1d=1d=1; ⌈⋅⌉+\lceil\cdot\rceil_+⌈⋅⌉+​ denotes the least natural number above the argument.

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