Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Quantum states are PAC-learnable from n·poly(1/ε, 1/γ, log(1/δ)) measurement results

Open
QAlgorithms.LearningSurvey.quantumState_pacLearnable

by Goku · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

learning-surveylecture-notesquantum-information

This is Aaronson's theorem on "pretty good tomography": an nnn-qubit state can be PAC-learned from linearly many (in nnn) measurement results.

An nnn-qubit state is a density matrix ρ∈C2n×2n\rho\in\mathbb C^{2^n\times 2^n}ρ∈C2n×2n (positive semidefinite, trace 111). A two-outcome measurement is an effect EEE, i.e. 0⪯E⪯Id0\preceq E\preceq \mathrm{Id}0⪯E⪯Id; its first outcome has probability Tr(Eρ)\mathrm{Tr}(E\rho)Tr(Eρ). Let DDD be a probability distribution (Borel) on the set of effects.

There is a polynomial ppp in three variables with nonnegative coefficients such that for every nnn and all ε,γ>0\varepsilon,\gamma>0ε,γ>0, δ∈(0,1)\delta\in(0,1)δ∈(0,1) there are a number

T ≤ n⋅p(1/ε, 1/γ, log⁡(1/δ))T\ \le\ n\cdot p\big(1/\varepsilon,\ 1/\gamma,\ \log(1/\delta)\big)T ≤ n⋅p(1/ε, 1/γ, log(1/δ))

and a (measurable) learner LLL, mapping TTT measurement results to an nnn-qubit density matrix, with the following property: for every nnn-qubit state ρ\rhoρ and every distribution DDD, if E1,…,ETE_1,\dots,E_TE1​,…,ET​ are drawn i.i.d. from DDD and, independently given the EiE_iEi​, each bib_ibi​ is a bit with Pr⁡[bi=1]=Tr(Eiρ)\Pr[b_i=1]=\mathrm{Tr}(E_i\rho)Pr[bi​=1]=Tr(Ei​ρ), then with probability at least 1−δ1-\delta1−δ the output σ=L((E1,b1),…,(ET,bT))\sigma=L((E_1,b_1),\dots,(E_T,b_T))σ=L((E1​,b1​),…,(ET​,bT​)) satisfies

Pr⁡E∼D[ ∣Tr(Eσ)−Tr(Eρ)∣>γ ] ≤ ε.\Pr_{E\sim D}\big[\,|\mathrm{Tr}(E\sigma)-\mathrm{Tr}(E\rho)|>\gamma\,\big]\ \le\ \varepsilon .E∼DPr​[∣Tr(Eσ)−Tr(Eρ)∣>γ] ≤ ε.

The learner knows neither ρ\rhoρ nor DDD. Only the number of measurement results is bounded, not the running time.

Formalization Note "T=n⋅polyT=n\cdot\mathrm{poly}T=n⋅poly" is read as an upper bound on TTT (a learner may ignore extra results). The condition δ<1\delta<1δ<1 is added: for δ≥1\delta\ge 1δ≥1 the claim is empty and log⁡(1/δ)≤0\log(1/\delta)\le 0log(1/δ)≤0. The learner is deterministic and measurable; the probability of success is written out as an integral over DTD^{T}DT of the probabilities of the bit strings.

Preamble
import Definitions.Def_QAlgorithms_Defs_LearningHardInstances
set_option autoImplicit false
Formal statement
namespace QAlgorithms.LearningSurvey

open MeasureTheory QAlgorithms.Learning




open Classical in
/-- survey p.15, Theorem 4.16 ([Aar07]): PAC learnability of quantum states. There is a
polynomial `p` such that for every number of qubits `n` and all `δ, ε, γ > 0` there is a learner
using `T ≤ n · p(1/ε, 1/γ, log(1/δ))` measurement results with the following property: for every
`n`-qubit state `ρ` and every distribution `D` on the two-outcome measurements (effects `E`,
`0 ≤ E ≤ Id`), given `(E₁, b₁), …, (E_T, b_T)` with the `Eᵢ` i.i.d. from `D` and, independently
given the `Eᵢ`, `Pr[bᵢ = 1] = Tr(Eᵢ ρ)`, with probability `≥ 1 − δ` the learner outputs (the
classical description of) a state `σ` with `Pr_{E∼D}[|Tr(Eσ) − Tr(Eρ)| > γ] ≤ ε`.

The learner is a measurable deterministic map from the `T` results to density matrices; it is
chosen before `ρ` and `D`. `δ < 1` is added (for `δ ≥ 1` the claim is empty, and `log(1/δ) ≤ 0`
would make the bound on `T` meaningless). The joint law of the results is written out: the
`Eᵢ` from the product measure `D^T`, then the bits with probability `∏ᵢ Pr[bᵢ | Eᵢ]`. -/
theorem quantumState_pacLearnable :
    ∃ p : MvPolynomial (Fin 3) ℝ, (∀ s, 0 ≤ p.coeff s) ∧
      ∀ (n : ℕ) (ε γ δ : ℝ), 0 < ε → 0 < γ → 0 < δ → δ < 1 →
      ∃ T : ℕ, (T : ℝ) ≤ (n : ℝ) * MvPolynomial.eval ![1 / ε, 1 / γ, Real.log (1 / δ)] p ∧
      ∃ L : (Fin T → EffectSet n × Bool) → Matrix (Qubits n) (Qubits n) ℂ,
        Measurable (fun s (i j : Qubits n) => L s i j) ∧ (∀ s, IsDensityMatrix (L s)) ∧
        ∀ ρ : Matrix (Qubits n) (Qubits n) ℂ, IsDensityMatrix ρ →
        ∀ (D : Measure (EffectSet n)) [IsProbabilityMeasure D],
          ∫⁻ Es, ∑ bs : Fin T → Bool,
              ENNReal.ofReal (∏ i, if bs i then effectProb (Es i).1 ρ
                else 1 - effectProb (Es i).1 ρ) *
              (if D {E | γ < |effectProb E.1 (L fun i => (Es i, bs i)) - effectProb E.1 ρ|} ≤
                  ENNReal.ofReal ε then 1 else 0)
            ∂(Measure.pi fun _ : Fin T => D) ≥ ENNReal.ofReal (1 - δ) := by sorry

end QAlgorithms.LearningSurvey
Source
Srinivasan Arunachalam and Ronald de Wolf, A Survey of Quantum Learning Theory, 2017, v3, PDF p. 15, Theorem 4.16. https://arxiv.org/pdf/1701.06806v3
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

There exists a real polynomial p(u,v,w)p(u, v, w)p(u,v,w) in three variables, with all coefficients nonnegative, with the following property. For every n∈Nn \in \mathbb{N}n∈N and all reals ε,γ,δ\varepsilon, \gamma, \deltaε,γ,δ with ε>0\varepsilon > 0ε>0, γ>0\gamma > 0γ>0 and 0<δ<10 < \delta < 10<δ<1, there exist a sample count T∈NT \in \mathbb{N}T∈N and a learner LLL satisfying the conditions below.

Sample count. TTT satisfies

T≤n⋅p ⁣(1ε,1γ,ln⁡1δ).T \le n \cdot p\!\left(\tfrac{1}{\varepsilon}, \tfrac{1}{\gamma}, \ln\tfrac{1}{\delta}\right).T≤n⋅p(ε1​,γ1​,lnδ1​).

For n=0n = 0n=0 this forces T=0T = 0T=0.

The learner. LLL maps each length-TTT sequence s=((E1,b1),…,(ET,bT))s = ((E_1,b_1),\dots,(E_T,b_T))s=((E1​,b1​),…,(ET​,bT​)) to a complex 2n×2n2^n \times 2^n2n×2n matrix L(s)L(s)L(s). Each EiE_iEi​ is an nnn-qubit effect, meaning EiE_iEi​ and I−EiI - E_iI−Ei​ are both positive semidefinite, and each bi∈{0,1}b_i \in \{0,1\}bi​∈{0,1}. The learner satisfies:

  1. Measurability. s↦(L(s)ij)i,js \mapsto (L(s)_{ij})_{i,j}s↦(L(s)ij​)i,j​ is measurable. The effects carry the Borel σ-algebra of their subspace topology, bits carry the discrete one, and complex entries carry the Borel one.
  2. Valid output. Every L(s)L(s)L(s) is a density matrix: positive semidefinite with trace 111.
  3. Accuracy. For every nnn-qubit density matrix ρ\rhoρ and every Borel probability measure DDD on the set of nnn-qubit effects,
∫∑b∈{0,1}T(∏i=1Tqi(bi))⋅1 ⁣[ D{E:∣Re⁡Tr⁡(Eσ)−Re⁡Tr⁡(Eρ)∣>γ}≤ε ] dD⊗T(E1,…,ET)  ≥  1−δ.\int \sum_{b \in \{0,1\}^T} \left(\prod_{i=1}^T q_i(b_i)\right) \cdot \mathbf{1}\!\left[\, D\{E : |\operatorname{Re}\operatorname{Tr}(E\sigma) - \operatorname{Re}\operatorname{Tr}(E\rho)| > \gamma\} \le \varepsilon \,\right] \, dD^{\otimes T}(E_1,\dots,E_T) \;\ge\; 1 - \delta .∫b∈{0,1}T∑​(i=1∏T​qi​(bi​))⋅1[D{E:∣ReTr(Eσ)−ReTr(Eρ)∣>γ}≤ε]dD⊗T(E1​,…,ET​)≥1−δ.

The symbols in the accuracy condition are:

  • qi(1)=Re⁡Tr⁡(Eiρ)q_i(1) = \operatorname{Re}\operatorname{Tr}(E_i\rho)qi​(1)=ReTr(Ei​ρ) and qi(0)=1−Re⁡Tr⁡(Eiρ)q_i(0) = 1 - \operatorname{Re}\operatorname{Tr}(E_i\rho)qi​(0)=1−ReTr(Ei​ρ).
  • σ=L((E1,b1),…,(ET,bT))\sigma = L\big((E_1,b_1),\dots,(E_T,b_T)\big)σ=L((E1​,b1​),…,(ET​,bT​)).

The integral is a lower Lebesgue integral of [0,∞][0,\infty][0,∞]-valued functions with respect to the TTT-fold product measure of DDD. Each product ∏iqi(bi)\prod_i q_i(b_i)∏i​qi​(bi​) is truncated at 000 from below, which has no effect here since these values lie in [0,1][0,1][0,1] for a density matrix ρ\rhoρ.

Order of choices. The polynomial ppp is chosen first. TTT and LLL may depend on n,ε,γ,δn, \varepsilon, \gamma, \deltan,ε,γ,δ, but are chosen before ρ\rhoρ and DDD.

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

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 13, 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