Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 2 — EX=tr(ρσ)\mathbb E X = \mathrm{tr}(\rho\sigma)EX=tr(ρσ) under Pr⁡(k)=χρ(k)2\Pr(k) = \chi_\rho(k)^2Pr(k)=χρ​(k)2

Proved
DirectFidelity.State.expectation_X

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

importance-samplingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-informationunbiased-estimator

Let ρ\rhoρ be a pure state and σ\sigmaσ a state on nnn qubits. Draw a Pauli label kkk with probability Pr⁡(k)=χρ(k)2\Pr(k) = \chi_\rho(k)^2Pr(k)=χρ​(k)2 and set X=χσ(k)/χρ(k)X = \chi_\sigma(k)/\chi_\rho(k)X=χσ​(k)/χρ​(k). Then XXX is an unbiased estimator of tr(ρσ)\mathrm{tr}(\rho\sigma)tr(ρσ):

EX=∑kχρ(k)2 χσ(k)χρ(k)=tr(ρσ).\mathbb E X = \sum_k \chi_\rho(k)^2\,\frac{\chi_\sigma(k)}{\chi_\rho(k)} = \mathrm{tr}(\rho\sigma).EX=k∑​χρ​(k)2χρ​(k)χσ​(k)​=tr(ρσ).

Formalization Note. The expectation is the finite weighted sum over all d2d^2d2 labels. Labels with χρ(k)=0\chi_\rho(k) = 0χρ​(k)=0 have weight 000, so the junk value of XXX there does not enter.

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

theorem expectation_X (n : ℕ) (ρ σ : Matrix (Q n) (Q n) ℂ) (hρ : IsPure ρ)
    (hσ : WildeQIT.IsDensityOperator σ) :
    ∑ k : P n, prob ρ k * X ρ σ k = ((ρ * σ).trace).re := 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 (4)
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