Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 3: generalized emulation fidelity and conditional fidelity

Open
QAlgorithms.Papers.Independent.Intakethird100.P67.theorem3_generalized_fidelity

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

prove2quantum

Let Λ\LambdaΛ be a finite nonempty parameter set with probability distribution ppp, and let Win(λ)W_{\rm in}(\lambda)Win​(λ) be arbitrary system/one-qubit unitaries. Fix a unit anchor ϕ\phiϕ, an ambient unitary UUU, and T≥0T\ge0T≥0. Use independent parameters with law ppp, TTT ancillas initially in ∣−⟩\lvert-\rangle∣−⟩, output anchor UϕU\phiUϕ, and Wout(λ)=(U⊗I)Win(λ)(U†⊗I)W_{\rm out}(\lambda)=(U\otimes I)W_{\rm in}(\lambda)(U^\dagger\otimes I)Wout​(λ)=(U⊗I)Win​(λ)(U†⊗I). Let EU\mathcal E_UEU​ and ΣU\Sigma_UΣU​ be the main and joint outputs of the four Appendix-A steps, ignoring the measurement label, and let perase(ρ)=⟨ϕ∣WT(ρ)∣ϕ⟩p_{\rm erase}(\rho)=\langle\phi|\mathcal W^T(\rho)|\phi\rangleperase​(ρ)=⟨ϕ∣WT(ρ)∣ϕ⟩. For every input density operator,

F(ΣU(ρ),UρU†⊗∣−⟩⟨−∣⊗T)≥perase(ρ),F(EU(ρ),UρU†)≥perase(ρ).F(\Sigma_U(\rho),U\rho U^\dagger\otimes\lvert-\rangle\langle-\rvert^{\otimes T})\ge p_{\rm erase}(\rho),\qquad F(\mathcal E_U(\rho),U\rho U^\dagger)\ge p_{\rm erase}(\rho).F(ΣU​(ρ),UρU†⊗∣−⟩⟨−∣⊗T)≥perase​(ρ),F(EU​(ρ),UρU†)≥perase​(ρ).

For a pure input and positive erasure probability, the normalized successful output has root fidelity at least perase(ρ)\sqrt{p_{\rm erase}(\rho)}perase​(ρ)​ with UρU†U\rho U^\daggerUρU†. No supported-input or algebra-generation assumption is needed. These estimates include the working ancillas before tracing.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P67
Formal statement
noncomputable section

open scoped ComplexConjugate Matrix Matrix.Norms.L2Operator

attribute [local instance] Classical.propDecidable

open MeasureTheory Filter

namespace QAlgorithms.Papers.Independent.Intakethird100.P67

variable {I J K L A : Type*} [Fintype I] [DecidableEq I]
  [Fintype J] [DecidableEq J] [Fintype K] [DecidableEq K]
  [Fintype L] [DecidableEq L] [Fintype A] [DecidableEq A]

/-- PDF pp.13–16, Theorem 3: root fidelity for actual Fig.5, including the joint
output and positive-probability pure-input conditional output. A1's missing adjoint is
corrected by Eq.(18) and A12; no algebra or input-support promise is assumed here. -/
theorem theorem3_generalized_fidelity [Nonempty L] (p : L → ℝ)
    (hp : QAlgorithms.Learning.IsDistribution p) (W : L → Matrix.unitaryGroup (I × Bool) ℂ)
    (phi : EuclideanSpace ℂ I) (hphi : IsState phi) (U : Matrix.unitaryGroup I ℂ) (T : ℕ) :
    (∀ rho, IsDensityMatrix rho →
      let joint := jointEmulator p (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ))
        (transportedGate (U : Matrix I I ℂ) (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ)))
        phi (act (U : Matrix I I ℂ) phi) T rho
      let pe := eraseProbability p (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ)) phi T rho
      pe ≤ rootFidelity joint (Matrix.kronecker (densityConjugation (U : Matrix I I ℂ) rho)
          (pureDensity (minusRegister T))) ∧
        pe ≤ rootFidelity (traceRight joint) (densityConjugation (U : Matrix I I ℂ) rho)) ∧
    (∀ psi : EuclideanSpace ℂ I, IsState psi →
      let pe := eraseProbability p (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ)) phi T (pureDensity psi)
      0 < pe → Real.sqrt pe ≤ rootFidelity
        ((pe : ℂ)⁻¹ • traceRight (jointBranch p (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ))
          (transportedGate (U : Matrix I I ℂ) (fun l => (W l : Matrix (I × Bool) (I × Bool) ℂ)))
          phi (act (U : Matrix I I ℂ) phi) T false (pureDensity psi)))
        (densityConjugation (U : Matrix I I ℂ) (pureDensity psi))) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P67

end
Source
Universal Quantum Emulator, arXiv:1606.02734v2, PDF p. 13, Theorem 3: generalized emulation fidelity and conditional fidelity
Read-back

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

Let I,LI,LI,L be finite types with decidable equality and L≠∅L\ne\varnothingL=∅, let p:L→Rp:L\to\mathbb Rp:L→R satisfy pl≥0p_l\ge0pl​≥0 and ∑lpl=1\sum_lp_l=1∑l​pl​=1, let each WlW_lWl​ be unitary on CI⊗C2\mathbb C^I\otimes\mathbb C^2CI⊗C2, let ∥ϕ∥=1\|\phi\|=1∥ϕ∥=1, let UUU be unitary on CI\mathbb C^ICI, and let TTT be any natural number. Write Pv=∣v⟩⟨v∣P_v=|v\rangle\langle v|Pv​=∣v⟩⟨v∣, μT=P∣−⟩⊗T\mu_T=P_{|-\rangle^{\otimes T}}μT​=P∣−⟩⊗T​, where ∣−⟩=(∣0⟩−∣1⟩)/2|-\rangle=(|0\rangle-|1\rangle)/\sqrt2∣−⟩=(∣0⟩−∣1⟩)/2​, and define E(ρ)=∑lplTr⁡anc[Wl(ρ⊗P∣−⟩)Wl†]\mathcal E(\rho)=\sum_lp_l\operatorname{Tr}_{\mathrm{anc}}[W_l(\rho\otimes P_{|-\rangle})W_l^\dagger]E(ρ)=∑l​pl​Tranc​[Wl​(ρ⊗P∣−⟩​)Wl†​] and eT(ρ)=Re⁡Tr⁡[PϕET(ρ)]e_T(\rho)=\operatorname{Re}\operatorname{Tr}[P_\phi\mathcal E^T(\rho)]eT​(ρ)=ReTr[Pϕ​ET(ρ)]. For a history h:{0,…,T−1}→Lh:\{0,\ldots,T-1\}\to Lh:{0,…,T−1}→L, put ph=∏j<Tph(j)p_h=\prod_{j<T}p_{h(j)}ph​=∏j<T​ph(j)​, let HhH_hHh​ apply Wh(0),…,Wh(T−1)W_{h(0)},\ldots,W_{h(T-1)}Wh(0)​,…,Wh(T−1)​ in that order, with gate jjj acting on the system and ancilla jjj while preserving the other ancillas, and put Hh′=(U⊗1)Hh(U†⊗1)H'_h=(U\otimes1)H_h(U^\dagger\otimes1)Hh′​=(U⊗1)Hh​(U†⊗1). For b∈{false,true}b\in\{\mathrm{false},\mathrm{true}\}b∈{false,true}, set Qfalse=PϕQ_{\mathrm{false}}=P_\phiQfalse​=Pϕ​, Qtrue=1−PϕQ_{\mathrm{true}}=1-P_\phiQtrue​=1−Pϕ​, and

Jb(ρ)=∑hph Hh′†[PUϕ⊗Tr⁡I ⁣((Qb⊗1)Hh(ρ⊗μT)Hh†(Qb⊗1)†)]Hh′,J(ρ)=Jfalse(ρ)+Jtrue(ρ).J_b(\rho)=\sum_h p_h\,H_h'{}^\dagger \left[ P_{U\phi}\otimes \operatorname{Tr}_{I}\!\left( (Q_b\otimes1)H_h(\rho\otimes\mu_T)H_h^\dagger(Q_b\otimes1)^\dagger \right) \right]H'_h,\qquad J(\rho)=J_{\mathrm{false}}(\rho)+J_{\mathrm{true}}(\rho).Jb​(ρ)=h∑​ph​Hh′​†[PUϕ​⊗TrI​((Qb​⊗1)Hh​(ρ⊗μT​)Hh†​(Qb​⊗1)†)]Hh′​,J(ρ)=Jfalse​(ρ)+Jtrue​(ρ).

Define F(A,B)=Re⁡Tr⁡A B AF(A,B)=\operatorname{Re}\operatorname{Tr}\sqrt{\sqrt A\,B\,\sqrt A}F(A,B)=ReTrA​BA​​, with matrix square roots taken by real continuous functional calculus. The conclusion is the conjunction of two assertions: every positive semidefinite trace-one ρ\rhoρ satisfies

eT(ρ)≤F ⁣(J(ρ), UρU†⊗μT),eT(ρ)≤F ⁣(Tr⁡ancJ(ρ), UρU†);e_T(\rho)\le F\!\left(J(\rho),\,U\rho U^\dagger\otimes\mu_T\right), \qquad e_T(\rho)\le F\!\left(\operatorname{Tr}_{\mathrm{anc}}J(\rho),\,U\rho U^\dagger\right);eT​(ρ)≤F(J(ρ),UρU†⊗μT​),eT​(ρ)≤F(Tranc​J(ρ),UρU†);

and every norm-one vector ψ\psiψ for which e=eT(Pψ)>0e=e_T(P_\psi)>0e=eT​(Pψ​)>0 satisfies

e≤F ⁣(e−1Tr⁡ancJfalse(Pψ), UPψU†).\sqrt e\le F\!\left(e^{-1}\operatorname{Tr}_{\mathrm{anc}}J_{\mathrm{false}}(P_\psi), \,UP_\psi U^\dagger\right).e​≤F(e−1Tranc​Jfalse​(Pψ​),UPψ​U†).

No sample-support or generation hypothesis is imposed. At T=0T=0T=0, histories are empty, their weight is 111, their history matrices are identities, and E0\mathcal E^0E0 is the identity.

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