Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Uhlmann fidelity: max⁡U∣⟨ϕρ∣UR⊗IA∣ϕσ⟩∣2\max_U |\langle\phi^\rho| U_R \otimes I_A |\phi^\sigma\rangle|^2maxU​∣⟨ϕρ∣UR​⊗IA​∣ϕσ⟩∣2 over canonical purifications

Definition
WildeQIT_uhlmannFidelity

by aadarwal · Sep 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

density-operatorfidelitymatrix-analysisquantum-informationwilde-qit

Definition 9.2.3 (Uhlmann Fidelity). The Uhlmann fidelity F(ρA,σA)F(\rho_A, \sigma_A)F(ρA​,σA​) between two mixed states ρA\rho_AρA​ and σA\sigma_AσA​ is the maximum overlap between their respective purifications, where the maximization is with respect to all unitaries UUU acting on the purification system RRR:

F(ρA,σA)=max⁡U∣⟨ϕρ∣RA UR⊗IA ∣ϕσ⟩RA∣2.F(\rho_A, \sigma_A) = \max_{U} \left| \langle \phi^\rho |_{RA}\, U_R \otimes I_A\, | \phi^\sigma \rangle_{RA} \right|^2 .F(ρA​,σA​)=Umax​∣⟨ϕρ∣RA​UR​⊗IA​∣ϕσ⟩RA​∣2.

The purifications are the canonical ones of §5.1.1, ∣ϕρ⟩RA=(IR⊗ρA)∣Γ⟩RA|\phi^\rho\rangle_{RA} = (I_R \otimes \sqrt{\rho_A})|\Gamma\rangle_{RA}∣ϕρ⟩RA​=(IR​⊗ρA​​)∣Γ⟩RA​ with ∣Γ⟩=∑i∣i⟩R∣i⟩A|\Gamma\rangle = \sum_i |i\rangle_R |i\rangle_A∣Γ⟩=∑i​∣i⟩R​∣i⟩A​, so dim⁡HR=dim⁡HA\dim \mathcal{H}_R = \dim \mathcal{H}_AdimHR​=dimHA​.

Formalization Note. WildeQIT.canonicalPurification ρ : n × n → ℂ has component (ρ)xr(\sqrt{\rho})_{x r}(ρ​)xr​ at (r,x)(r, x)(r,x) (reference index first). WildeQIT.uhlmannFidelity ρ σ is the real supremum sSup of the squared overlaps ‖star φ^ρ ⬝ᵥ ((U ⊗ₖ 1) *ᵥ φ^σ)‖ ^ 2 over U ∈ Matrix.unitaryGroup n ℂ; the set is nonempty and bounded (Theorem 9.2.1 shows the supremum is attained and equals ∥ρσ∥12\|\sqrt\rho\sqrt\sigma\|_1^2∥ρ​σ​∥12​), so it is the book's maximum.

Definition code
import Definitions.Def_WildeQIT_traceNorm
import Mathlib.LinearAlgebra.Matrix.Kronecker
import Mathlib.LinearAlgebra.UnitaryGroup

/-!
Wilde, *Quantum Information Theory* (2nd ed.), §9.2.3, Definition 9.2.3 (Uhlmann Fidelity).

The Uhlmann fidelity `F(ρ_A, σ_A)` between two mixed states is the maximum overlap between their
respective purifications, the maximization being over all unitaries `U` on the purification
system `R`: `F(ρ_A, σ_A) = max_U |⟨φ^ρ|_{RA} (U_R ⊗ I_A) |φ^σ⟩_{RA}|²`.

The purifications used are the canonical ones of §5.1.1, `|φ^ρ⟩_{RA} = (I_R ⊗ √ρ_A)|Γ⟩_{RA}`
with `|Γ⟩ = ∑ᵢ |i⟩_R |i⟩_A`, so that `dim ℋ_R = dim ℋ_A`.
-/

open Matrix
open Kronecker
open scoped MatrixOrder

namespace WildeQIT

/-- The **canonical purification** `|φ^ρ⟩_{RA} = (I_R ⊗ √ρ_A)|Γ⟩_{RA}` of `ρ : Matrix n n ℂ`,
a vector on `R × A` with `R` a copy of the index type `n`: its `(r, x)` component is `(√ρ)ₓᵣ`. -/
noncomputable def canonicalPurification {n : Type} [Fintype n] [DecidableEq n]
    (ρ : Matrix n n ℂ) : n × n → ℂ :=
  fun p => CFC.sqrt ρ p.2 p.1

/-- **Definition 9.2.3 (Uhlmann Fidelity).** The supremum over unitaries `U` on the reference
system of the squared overlap `|⟨φ^ρ| (U ⊗ I) |φ^σ⟩|²` of the canonical purifications; the
supremum is attained (Theorem 9.2.1), so this is the book's maximum. -/
noncomputable def uhlmannFidelity {n : Type} [Fintype n] [DecidableEq n] (ρ σ : Matrix n n ℂ) : ℝ :=
  sSup {x : ℝ | ∃ U ∈ Matrix.unitaryGroup n ℂ,
    x = ‖star (canonicalPurification ρ) ⬝ᵥ (((U : Matrix n n ℂ) ⊗ₖ (1 : Matrix n n ℂ)) *ᵥ
      canonicalPurification σ)‖ ^ 2}

end WildeQIT
Source
Wilde, *Quantum Information Theory*, 2nd ed. (Cambridge University Press, 2017; arXiv:1106.1445v8), §9.2.3 "Uhlmann Fidelity", Definition 9.2.3 (Uhlmann Fidelity).

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