Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 2 — with ℓ=⌈1/(ε2δ)⌉\ell = \lceil 1/(\varepsilon^2\delta)\rceilℓ=⌈1/(ε2δ)⌉ and mim_imi​ as in (6), ∣Y~−tr(ρσ)∣≤2ε|\tilde Y - \mathrm{tr}(\rho\sigma)| \le 2\varepsilon∣Y~−tr(ρσ)∣≤2ε with probability ≥1−2δ\ge 1 - 2\delta≥1−2δ

Proved
DirectFidelity.State.dfe_guarantee

by mikedeng1 · Oct 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

chebyshevfidelity-estimationhoeffdingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1pauli-measurementsquantum-information

Direct fidelity estimation. Let ρ\rhoρ be a pure state and σ\sigmaσ an arbitrary state of nnn qubits (d=2nd = 2^nd=2n), and let ε,δ>0\varepsilon,\delta>0ε,δ>0. Run the two-stage protocol:

  1. draw ℓ=⌈1/(ε2δ)⌉\ell = \lceil 1/(\varepsilon^2\delta)\rceilℓ=⌈1/(ε2δ)⌉ Pauli labels k1,…,kℓk_1,\dots,k_\ellk1​,…,kℓ​ independently with probability Pr⁡(k)=χρ(k)2\Pr(k) = \chi_\rho(k)^2Pr(k)=χρ​(k)2, where χρ(k)=tr(ρWk/d)\chi_\rho(k) = \mathrm{tr}(\rho W_k/\sqrt d)χρ​(k)=tr(ρWk​/d​);
  2. for each iii, measure the Pauli observable WkiW_{k_i}Wki​​ on mi=⌈2dχρ(ki)2ℓε2log⁡(2/δ)⌉m_i = \lceil \frac{2}{d\chi_\rho(k_i)^2\ell\varepsilon^2}\log(2/\delta)\rceilmi​=⌈dχρ​(ki​)2ℓε22​log(2/δ)⌉ fresh copies of σ\sigmaσ, obtaining independent outcomes Aij∈{1,−1}A_{ij}\in\{1,-1\}Aij​∈{1,−1} distributed by the Born rule, and output
Y~=1ℓ∑i=1ℓ1mid χρ(ki)∑j=1miAij.\tilde Y = \frac1\ell\sum_{i=1}^\ell\frac{1}{m_i\sqrt d\,\chi_\rho(k_i)}\sum_{j=1}^{m_i}A_{ij}.Y~=ℓ1​i=1∑ℓ​mi​d​χρ​(ki​)1​j=1∑mi​​Aij​.

Then, with probability at least 1−2δ1-2\delta1−2δ over both stages,

tr(ρσ)∈[Y~−2ε, Y~+2ε].\mathrm{tr}(\rho\sigma)\in\big[\tilde Y - 2\varepsilon,\ \tilde Y + 2\varepsilon\big].tr(ρσ)∈[Y~−2ε, Y~+2ε].

Since F(ρ,σ)=tr(ρσ)F(\rho,\sigma) = \mathrm{tr}(\rho\sigma)F(ρ,σ)=tr(ρσ) for pure ρ\rhoρ (equation (1)), this certifies the fidelity of an experimentally prepared state σ\sigmaσ to a target pure state ρ\rhoρ with a number of Pauli observables, ℓ\ellℓ, independent of the number of qubits.

Formalization Note. The fidelity is written as tr(ρσ)\mathrm{tr}(\rho\sigma)tr(ρσ) (the real part of the trace), which is (1) for pure ρ\rhoρ. The probability is the finite sum over label tuples (k1,…,kℓ)(k_1,\dots,k_\ell)(k1​,…,kℓ​) of ∏iPr⁡(ki)\prod_i\Pr(k_i)∏i​Pr(ki​) times the probability, under the Born-rule product law of the outcomes, that ∣Y~−tr(ρσ)∣≤2ε|\tilde Y - \mathrm{tr}(\rho\sigma)|\le2\varepsilon∣Y~−tr(ρσ)∣≤2ε. No hypothesis beyond the page's is added: for δ≥1/2\delta\ge1/2δ≥1/2 the claim is trivially true, and the tuples with some χρ(ki)=0\chi_\rho(k_i)=0χρ​(ki​)=0 have weight 000.

Preamble
import Mathlib
import Definitions.Def_WildeQIT_IsDensityOperator
import Definitions.Def_DirectFidelity_State_Setting
Formal statement
namespace DirectFidelity.State

theorem dfe_guarantee (n : ℕ) (ρ σ : Matrix (Q n) (Q n) ℂ) (hρ : IsPure ρ)
    (hσ : WildeQIT.IsDensityOperator σ) (ε δ : ℝ) (hε : 0 < ε) (hδ : 0 < δ) :
    1 - 2 * δ ≤
      ∑ ks : Fin (ell ε δ) → P n, (∏ i, prob ρ (ks i)) *
        (outcomes σ ks (mVec ρ ε δ ks)).real
          {A | |Yt ρ ks (mVec ρ ε δ ks) A - ((ρ * σ).trace).re| ≤ 2 * ε} := by sorry

end DirectFidelity.State
Source
Flammia and Liu, Direct fidelity estimation from few Pauli measurements, arXiv:1104.4695v3, p. 2, §Fidelity Estimation, sentence after (8)
Human review
  • Endorsed by Shuze Chen · Oct 15, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 15, 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