Quantum states are PAC-learnable from n·poly(1/ε, 1/γ, log(1/δ)) measurement results
OpenQAlgorithms.LearningSurvey.quantumState_pacLearnableThis is Aaronson's theorem on "pretty good tomography": an -qubit state can be PAC-learned from linearly many (in ) measurement results.
An -qubit state is a density matrix (positive semidefinite, trace ). A two-outcome measurement is an effect , i.e. ; its first outcome has probability . Let be a probability distribution (Borel) on the set of effects.
There is a polynomial in three variables with nonnegative coefficients such that for every and all , there are a number
and a (measurable) learner , mapping measurement results to an -qubit density matrix, with the following property: for every -qubit state and every distribution , if are drawn i.i.d. from and, independently given the , each is a bit with , then with probability at least the output satisfies
The learner knows neither nor . Only the number of measurement results is bounded, not the running time.
Formalization Note "" is read as an upper bound on (a learner may ignore extra results). The condition is added: for the claim is empty and . The learner is deterministic and measurable; the probability of success is written out as an integral over of the probabilities of the bit strings.
import Definitions.Def_QAlgorithms_Defs_LearningHardInstances set_option autoImplicit false
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
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
There exists a real polynomial in three variables, with all coefficients nonnegative, with the following property. For every and all reals with , and , there exist a sample count and a learner satisfying the conditions below.
Sample count. satisfies
For this forces .
The learner. maps each length- sequence to a complex matrix . Each is an -qubit effect, meaning and are both positive semidefinite, and each . The learner satisfies:
- Measurability. is measurable. The effects carry the Borel σ-algebra of their subspace topology, bits carry the discrete one, and complex entries carry the Borel one.
- Valid output. Every is a density matrix: positive semidefinite with trace .
- Accuracy. For every -qubit density matrix and every Borel probability measure on the set of -qubit effects,
The symbols in the accuracy condition are:
- and .
- .
The integral is a lower Lebesgue integral of -valued functions with respect to the -fold product measure of . Each product is truncated at from below, which has no effect here since these values lie in for a density matrix .
Order of choices. The polynomial is chosen first. and may depend on , but are chosen before and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.