Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Finite-sample Chebyshev guarantee

Open
QAlgorithms.Papers.Independent.Intakethird100.P71.finiteSample_chebyshev

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Fix a locally scrambled, tomographically complete projective experiment on NNN qudits, d≥2d\ge2d≥2, a density matrix ρ\rhoρ, and a traceless Hermitian observable OOO. Let o^\hat oo^ be its unbiased single-shot shadow prediction, Qρ(O)=Eo^2Q_\rho(O)=\mathbb E\hat o^2Qρ​(O)=Eo^2, and oˉ\bar ooˉ the arithmetic mean of M≥1M\ge1M≥1 independent snapshots of identical copies. For ϵ>0\epsilon>0ϵ>0 and 0<δ<10<\delta<10<δ<1,

Pr⁡(∣oˉ−Tr⁡(Oρ)∣≥ϵ)≤Var⁡o^ϵ2M≤Qρ(O)ϵ2M.\Pr\bigl(|\bar o-\operatorname{Tr}(O\rho)|\ge\epsilon\bigr)\le\frac{\operatorname{Var}\hat o}{\epsilon^2 M}\le\frac{Q_\rho(O)}{\epsilon^2 M}.Pr(∣oˉ−Tr(Oρ)∣≥ϵ)≤ϵ2MVaro^​≤ϵ2MQρ​(O)​.

In particular,

M≥Qρ(O)ϵ2δ⟹Pr⁡(∣oˉ−Tr⁡(Oρ)∣≥ϵ)≤δ.M\ge\frac{Q_\rho(O)}{\epsilon^2\delta}\quad\Longrightarrow\quad\Pr\bigl(|\bar o-\operatorname{Tr}(O\rho)|\ge\epsilon\bigr)\le\delta.M≥ϵ2δQρ​(O)​⟹Pr(∣oˉ−Tr(Oρ)∣≥ϵ)≤δ.

This is a sufficient copy count for the specified state and observable.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P71
Formal statement
noncomputable section

open MeasureTheory

open scoped Matrix ComplexConjugate ENNReal Matrix.Norms.Elementwise

namespace QAlgorithms.Papers.Independent.Intakethird100.P71

attribute [local instance] Classical.propDecidable

local notation "Config" n:max d:max =>
  QAlgorithms.Papers.Independent.Information100.P21.Config (P := Fin n) (fun _ => d)

local notation "Op" n:max d:max =>
  QAlgorithms.Papers.Independent.Information100.P21.Op (Config n d)

attribute [local instance] QAlgorithms.Papers.Independent.Intakethird100.P71.matrixContinuousENorm

local notation "Unitary" n:max d:max => Matrix.unitaryGroup (Config n d) ℂ

local notation "Local" n:max d:max => Fin n → Matrix.unitaryGroup (Fin d) ℂ

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

/-- PDF p.5 Eqs.(18)–(19): Chebyshev and its sufficient copy count for each
specified rho and O. No necessary bound or simultaneous-observable claim. -/
theorem finiteSample_chebyshev {n d : ℕ} (hd : 2 ≤ d) (E : ProjectiveEnsemble n d)
    (hls : LocallyScrambled (prior E)) (hc : Complete (prior E))
    (rho O : Op n d) (hrho : IsDensityMatrix rho) (hO : O.IsHermitian) (ht : O.trace = 0)
    (m : ℕ) (hm : 0 < m) (eps delta : ℝ) (heps : 0 < eps)
    (hdelta : 0 < delta ∧ delta < 1) :
    let failure := (snapshotSampleLaw (prior E) rho m)
      {s | eps ≤ |shadowSampleMean (prior E) hc O s - (O*rho).trace.re|}
    failure ≤ ENNReal.ofReal (shotVariance (prior E) hc rho O / (eps^2 * m)) ∧
    shotVariance (prior E) hc rho O / (eps^2 * m) ≤
      secondMoment (prior E) hc rho O / (eps^2 * m) ∧
    (secondMoment (prior E) hc rho O / (eps^2 * delta) ≤ m →
      failure ≤ ENNReal.ofReal delta) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P71

end
Source
Classical Shadow Tomography with Locally Scrambled Quantum Dynamics, arXiv:2107.04817v4, PDF p. 5, §II B, Eqs.(18)–(19): finite-sample Chebyshev guarantee
Read-back

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

Let n≥0n\ge0n≥0, d≥2d\ge2d≥2, X={0,…,d−1}n\mathcal X=\{0,\ldots,d-1\}^nX={0,…,d−1}n, and N=dnN=d^nN=dn. Let EEE specify a probability law λ\lambdaλ on global unitary matrices, and define ν=N−1∑b(U↦U†∣b⟩⟨b∣U)∗λ\nu=N^{-1}\sum_b(U\mapsto U^\dagger|b\rangle\langle b|U)_*\lambdaν=N−1∑b​(U↦U†∣b⟩⟨b∣U)∗​λ. Assume that ν\nuν is invariant under conjugation S↦LV†SLVS\mapsto L_V^\dagger SL_VS↦LV†​SLV​ by every tensor product LV=⨂iViL_V=\bigotimes_iV_iLV​=⨂i​Vi​ of local unitary matrices. Define M(X)ij=∑k,l(∫NSijSlk dν(S))Xkl\mathcal M(X)_{ij}=\sum_{k,l}(\int NS_{ij}S_{lk}\,d\nu(S))X_{kl}M(X)ij​=∑k,l​(∫NSij​Slk​dν(S))Xkl​, assume it is injective, and let R=M−1\mathcal R=\mathcal M^{-1}R=M−1. Let ρ\rhoρ be positive semidefinite of trace 111, let OOO be Hermitian of trace 000, let mmm be a strictly positive natural number, and let ε,δ∈R\varepsilon,\delta\in\mathbb Rε,δ∈R satisfy ε>0\varepsilon>0ε>0 and 0<δ<10<\delta<10<δ<1. Set z(S)=Re⁡tr⁡(OR(S))z(S)=\operatorname{Re}\operatorname{tr}(O\mathcal R(S))z(S)=Retr(OR(S)), define dνρ=[NRe⁡tr⁡(Sρ)]+dνd\nu_\rho=[N\operatorname{Re}\operatorname{tr}(S\rho)]_+d\nudνρ​=[NRetr(Sρ)]+​dν, and put

Q=∫z2 dνρ,V=Q−(∫z dνρ)2,z‾(S0,…,Sm−1)=1m∑a=0m−1z(Sa).Q=\int z^2\,d\nu_\rho,\qquad V=Q-\left(\int z\,d\nu_\rho\right)^2,\qquad \overline z(S_0,\ldots,S_{m-1})=\frac1m\sum_{a=0}^{m-1}z(S_a).Q=∫z2dνρ​,V=Q−(∫zdνρ​)2,z(S0​,…,Sm−1​)=m1​a=0∑m−1​z(Sa​).

Writing FFF for the νρ⊗m\nu_\rho^{\otimes m}νρ⊗m​-measure of the event {ε≤∣z‾−Re⁡tr⁡(Oρ)∣}\{\varepsilon\le|\overline z-\operatorname{Re}\operatorname{tr}(O\rho)|\}{ε≤∣z−Retr(Oρ)∣}, including equality at the threshold, the theorem asserts

F≤[Vε2m]+,Vε2m≤Qε2m,(Qε2δ≤m)⟹F≤δ.F\le\left[\frac{V}{\varepsilon^2m}\right]_+,\qquad \frac{V}{\varepsilon^2m}\le\frac{Q}{\varepsilon^2m}, \qquad \left(\frac{Q}{\varepsilon^2\delta}\le m\right)\Longrightarrow F\le\delta.F≤[ε2mV​]+​,ε2mV​≤ε2mQ​,(ε2δQ​≤m)⟹F≤δ.

The first bound is in the extended nonnegative reals, where [x]+[x]_+[x]+​ denotes the embedding of max⁡(x,0)\max(x,0)max(x,0); the middle inequality is a real inequality. The case n=0n=0n=0 is permitted, while m=0m=0m=0 is excluded.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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