Offline · exact source
Exact Lean source

InfiniteFidelity

formalization/Cloning/InfiniteFidelity.lean

Source hash: 28a756850d972dd2ef713f00f74f7e8de29f1c24f5a9a35cadab96750f39569c

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.InfiniteTraceClassPositive
2import Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.Order
3 
4/-! Root fidelity of actual positive trace-class operators on an arbitrary complete complex
5Hilbert space. All norms and traces are the analytic trace-class quantities. -/
6 
7namespace Cloning.InfiniteFidelity
8 
9noncomputable section
10set_option backward.isDefEq.respectTransparency false
11open scoped ComplexOrder InnerProductSpace
12open InfiniteTraceClass InfiniteTraceClass.HilbertSchmidt
13 
14variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
15 
16lemma sqrt_product_traceClass {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
17    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
18    IsTraceClass (CFC.sqrt A * CFC.sqrt B) :=
19  isTraceClass_mul_of_isHilbertSchmidt (isHilbertSchmidt_sqrt hA hTA)
20    (isHilbertSchmidt_sqrt hB hTB)
21 
22/-- The root fidelity `‖√A √B‖₁`, with its trace-class domain made explicit. -/
23def fidelity (A B : H →L[ℂ] H) (hA : 0 ≤ A) (hB : 0 ≤ B)
24    (hTA : IsTraceClass A) (hTB : IsTraceClass B) : ℝ :=
25  traceNorm (CFC.sqrt A * CFC.sqrt B) (sqrt_product_traceClass hA hB hTA hTB)
26 
27lemma fidelity_nonneg {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
28    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
29    0 ≤ fidelity A B hA hB hTA hTB := traceNorm_nonneg _ _
30 
31lemma fidelity_le_sqrt_mul_sqrt {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
32    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
33    fidelity A B hA hB hTA hTB ≤
34      Real.sqrt (trace A hTA).re * Real.sqrt (trace B hTB).re := by
35  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
36  have h := traceNorm_mul_le_of_isHilbertSchmidt
37    (isHilbertSchmidt_sqrt hA hTA) (isHilbertSchmidt_sqrt hB hTB)
38    (sqrt_product_traceClass hA hB hTA hTB) b
39  rwa [tsum_sqrt_norm_sq_eq_trace_re hA hTA b,
40    tsum_sqrt_norm_sq_eq_trace_re hB hTB b] at h
41 
42lemma fidelity_sq_le_trace_mul {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
43    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
44    fidelity A B hA hB hTA hTB ^ 2 ≤ (trace A hTA).re * (trace B hTB).re := by
45  have h := (sq_le_sq₀ (fidelity_nonneg hA hB hTA hTB)
46    (mul_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _))).2
47    (fidelity_le_sqrt_mul_sqrt hA hB hTA hTB)
48  simpa only [mul_pow, Real.sq_sqrt (trace_re_nonneg hA hTA),
49    Real.sq_sqrt (trace_re_nonneg hB hTB)] using h
50 
51lemma fidelity_self {A : H →L[ℂ] H} (hA : 0 ≤ A) (hTA : IsTraceClass A) :
52    fidelity A A hA hA hTA hTA = (trace A hTA).re := by
53  simp only [fidelity, CFC.sqrt_mul_sqrt_self A hA, trace_re_eq_traceNorm hA hTA]
54 
55lemma fidelity_comm {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
56    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
57    fidelity A B hA hB hTA hTB = fidelity B A hB hA hTB hTA := by
58  have h := traceNorm_star (sqrt_product_traceClass hA hB hTA hTB)
59  have hstarA : star (CFC.sqrt A) = CFC.sqrt A :=
60    (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg A)).star_eq
61  have hstarB : star (CFC.sqrt B) = CFC.sqrt B :=
62    (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg B)).star_eq
63  simpa only [star_mul, hstarA, hstarB] using h.symm
64 
65lemma abs_sqrt_product {A B : H →L[ℂ] H} (hA : 0 ≤ A) :
66    CFC.abs (CFC.sqrt A * CFC.sqrt B) =
67      CFC.sqrt (CFC.sqrt B * A * CFC.sqrt B) := by
68  have hstarA : star (CFC.sqrt A) = CFC.sqrt A :=
69    (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg A)).star_eq
70  have hstarB : star (CFC.sqrt B) = CFC.sqrt B :=
71    (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg B)).star_eq
72  simp only [CFC.abs, star_mul, hstarA, hstarB, mul_assoc]
73  rw [← mul_assoc (CFC.sqrt A), CFC.sqrt_mul_sqrt_self A hA]
74 
75lemma sqrt_sandwich_traceClass {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
76    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
77    IsTraceClass (CFC.sqrt (CFC.sqrt B * A * CFC.sqrt B)) := by
78  rw [← abs_sqrt_product hA]
79  exact isTraceClass_abs (sqrt_product_traceClass hA hB hTA hTB)
80 
81lemma fidelity_eq_trace_sqrt_sandwich {A B : H →L[ℂ] H} (hA : 0 ≤ A) (hB : 0 ≤ B)
82    (hTA : IsTraceClass A) (hTB : IsTraceClass B) :
83    fidelity A B hA hB hTA hTB =
84      (trace (CFC.sqrt (CFC.sqrt B * A * CFC.sqrt B))
85        (sqrt_sandwich_traceClass hA hB hTA hTB)).re := by
86  rw [trace_re_eq_traceNorm (CFC.sqrt_nonneg (CFC.sqrt B * A * CFC.sqrt B))
87    (sqrt_sandwich_traceClass hA hB hTA hTB)]
88  exact (traceNorm_abs (sqrt_product_traceClass hA hB hTA hTB)).symm.trans
89    (traceNorm_transport (abs_sqrt_product hA)
90      (isTraceClass_abs (sqrt_product_traceClass hA hB hTA hTB)))
91 
92lemma fidelity_mono_left {A C B : H →L[ℂ] H} (hA : 0 ≤ A) (hC : 0 ≤ C) (hB : 0 ≤ B)
93    (hTA : IsTraceClass A) (hTC : IsTraceClass C) (hTB : IsTraceClass B) (hAC : A ≤ C) :
94    fidelity A B hA hB hTA hTB ≤ fidelity C B hC hB hTC hTB := by
95  rw [fidelity_eq_trace_sqrt_sandwich hA hB hTA hTB,
96    fidelity_eq_trace_sqrt_sandwich hC hB hTC hTB]
97  apply trace_re_mono
98  apply CFC.sqrt_le_sqrt
99  have h := star_left_conjugate_nonneg (sub_nonneg.mpr hAC) (CFC.sqrt B)
100  have hstarB : star (CFC.sqrt B) = CFC.sqrt B :=
101    (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg B)).star_eq
102  rw [hstarB, mul_sub, sub_mul] at h
103  exact sub_nonneg.mp h
104 
105/-- A dimension-independent perturbation bound in the Hilbert–Schmidt distance between
106square roots. The estimate is proved directly from the trace norm and Hilbert–Schmidt Hölder. -/
107lemma fidelity_continuity_left_roots {A C B : H →L[ℂ] H}
108    (hA : 0 ≤ A) (hC : 0 ≤ C) (hB : 0 ≤ B)
109    (hTA : IsTraceClass A) (hTC : IsTraceClass C) (hTB : IsTraceClass B)
110    {w : Set H} (b : HilbertBasis w ℂ H) :
111    |fidelity A B hA hB hTA hTB - fidelity C B hC hB hTC hTB| ≤
112      Real.sqrt (∑' i : w, ‖(CFC.sqrt A - CFC.sqrt C) (b i)‖ ^ 2) *
113        Real.sqrt (trace B hTB).re := by
114  have hroot := isHilbertSchmidt_sub (isHilbertSchmidt_sqrt hA hTA)
115    (isHilbertSchmidt_sqrt hC hTC)
116  have hBroot := isHilbertSchmidt_sqrt hB hTB
117  have hp := isTraceClass_mul_of_isHilbertSchmidt hroot hBroot
118  have hd : IsTraceClass (CFC.sqrt A * CFC.sqrt B - CFC.sqrt C * CFC.sqrt B) := by
119    simpa only [sub_mul] using hp
120  have hnorm := abs_traceNorm_sub_le (sqrt_product_traceClass hA hB hTA hTB)
121    (sqrt_product_traceClass hC hB hTC hTB) hd
122  have hbound := traceNorm_mul_le_of_isHilbertSchmidt hroot hBroot hp b
123  rw [tsum_sqrt_norm_sq_eq_trace_re hB hTB b] at hbound
124  exact hnorm.trans (by simpa only [sub_mul] using hbound)
125 
126/-- Fidelity of normalized, positive analytic density operators. -/
127def stateFidelity (ρ σ : DensityState H) : ℝ :=
128  fidelity ρ.op σ.op ρ.positive σ.positive ρ.traceClass σ.traceClass
129 
130lemma stateFidelity_nonneg (ρ σ : DensityState H) : 0 ≤ stateFidelity ρ σ :=
131  fidelity_nonneg ρ.positive σ.positive ρ.traceClass σ.traceClass
132 
133lemma stateFidelity_le_one (ρ σ : DensityState H) : stateFidelity ρ σ ≤ 1 := by
134  have h := fidelity_le_sqrt_mul_sqrt ρ.positive σ.positive ρ.traceClass σ.traceClass
135  simpa only [ρ.trace_one, σ.trace_one, Complex.one_re, Real.sqrt_one, one_mul] using h
136 
137@[simp] lemma stateFidelity_self (ρ : DensityState H) : stateFidelity ρ ρ = 1 := by
138  exact (fidelity_self ρ.positive ρ.traceClass).trans (by rw [ρ.trace_one, Complex.one_re])
139 
140lemma stateFidelity_comm (ρ σ : DensityState H) : stateFidelity ρ σ = stateFidelity σ ρ :=
141  fidelity_comm ρ.positive σ.positive ρ.traceClass σ.traceClass
142 
143end
144end Cloning.InfiniteFidelity