Offline · exact source
Exact Lean source

InfiniteDiagonalFidelity

formalization/Cloning/InfiniteDiagonalFidelity.lean

Source hash: 0821d4912d32ee2edf4207bb0bdec4d3294e4dc62b74947a162fedcbf6f2b771

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.InfiniteFidelityBlockBound
2import Cloning.InfiniteOccupationStates
3import Cloning.MatrixFidelityScaling
4 
5/-!
6# Fidelity of actual diagonal and thermal density operators
7 
8Finite Hilbert-basis compressions identify diagonal operator fidelity with
9finite Hellinger sums. Trace-norm convergence of the compressions and fidelity
10continuity then give the countable identity. Geometric thermal density
11operators, including multimode ones, consequently have the previously proved
12scalar thermal fidelity formula.
13-/
14 
15namespace Cloning.InfiniteDiagonalFidelity
16 
17noncomputable section
18set_option backward.isDefEq.respectTransparency false
19open scoped ComplexOrder InnerProductSpace Topology BigOperators MatrixOrder
20open Filter InfiniteTraceClass InfiniteFidelity
21 
22variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
23variable {ι : Type*}
24 
25theorem matrixOf_vectorMixture_basis [DecidableEq ι] (b : HilbertBasis ι ℂ H)
26    (p : ι → ℝ) (hp : Summable p) (s : Finset ι) :
27    InfiniteFiniteCorner.matrixOf (fun i : s ↦ b i) (vectorMixture b p).1 =
28      Matrix.diagonal (fun i : s ↦ (p i : ℂ)) := by
29  classical
30  ext i j
31  change ⟪b i, (vectorMixture b p).1 (b j)⟫_ℂ = _
32  rw [InfiniteOccupationStates.vectorMixture_apply_basis b p hp j, inner_smul_right,
33    orthonormal_iff_ite.mp b.orthonormal]
34  by_cases hij : i = j
35  · subst j
36    simp
37  · have hval : (i : ι) ≠ j := fun h ↦ hij (Subtype.ext h)
38    simp [hij, hval]
39 
40/-- Actual infinite-dimensional fidelity of arbitrary nonnegative summable
41diagonal operators equals their countable Hellinger affinity. -/
42theorem fidelity_vectorMixture (b : HilbertBasis ι ℂ H) (p q : ι → ℝ)
43    (hp0 : ∀ i, 0 ≤ p i) (hq0 : ∀ i, 0 ≤ q i)
44    (hp : Summable p) (hq : Summable q) :
45    fidelity (vectorMixture b p).1 (vectorMixture b q).1
46      (vectorMixture_nonneg b b.orthonormal.norm_eq_one p hp hp0)
47      (vectorMixture_nonneg b b.orthonormal.norm_eq_one q hq hq0)
48      (vectorMixture b p).2 (vectorMixture b q).2 = CountableScheffe.affinity p q := by
49  classical
50  let A := vectorMixture b p
51  let B := vectorMixture b q
52  have hA : 0 ≤ A.1 := vectorMixture_nonneg b b.orthonormal.norm_eq_one p hp hp0
53  have hB : 0 ≤ B.1 := vectorMixture_nonneg b b.orthonormal.norm_eq_one q hq hq0
54  let compress := fun (s : Finset ι) (T : TraceClass H) ↦
55    sandwichCLM (basisProjection b s) (basisProjection b s) T
56  have hpos (s : Finset ι) (T : TraceClass H) (hT : 0 ≤ T.1) :
57      0 ≤ (compress s T).1 :=
58    sandwichCLM_nonneg (basisProjection_isStarProjection b s).isSelfAdjoint T hT
59  have hfid := tendsto_fidelity_traceClass (fun s ↦ compress s A) (fun s ↦ compress s B)
60    A B (fun s ↦ hpos s A hA) (fun s ↦ hpos s B hB) hA hB
61    (basis_sandwich_tendsto b A) (basis_sandwich_tendsto b B)
62  have hfinite (s : Finset ι) :
63      fidelity (compress s A).1 (compress s B).1 (hpos s A hA) (hpos s B hB)
64        (compress s A).2 (compress s B).2 =
65      ∑ i ∈ s, Real.sqrt (p i) * Real.sqrt (q i) := by
66    let v : s → H := fun i ↦ b i
67    have hv : Orthonormal ℂ v := InfiniteFiniteCorner.basisFamily_orthonormal b s
68    have eF : fidelity (compress s A).1 (compress s B).1 (hpos s A hA) (hpos s B hB)
69        (compress s A).2 (compress s B).2 =
70        MatrixFidelity.fidelity (InfiniteFiniteCorner.matrixOf v A.1)
71          (InfiniteFiniteCorner.matrixOf v B.1) := by
72      simpa only [v, compress, InfiniteFiniteCorner.ofMatrix_matrixOf_basis, sandwichCLM_coe] using
73        InfiniteFiniteCorner.fidelity_ofMatrix hv
74          (InfiniteFiniteCorner.matrixOf_posSemidef v hA)
75          (InfiniteFiniteCorner.matrixOf_posSemidef v hB)
76    rw [eF]
77    change MatrixFidelity.fidelity
78      (InfiniteFiniteCorner.matrixOf (fun i : s ↦ b i) (vectorMixture b p).1)
79      (InfiniteFiniteCorner.matrixOf (fun i : s ↦ b i) (vectorMixture b q).1) = _
80    rw [matrixOf_vectorMixture_basis b p hp s, matrixOf_vectorMixture_basis b q hq s,
81      MatrixFidelity.fidelity_diagonal_real _ _ (fun i : s ↦ hp0 i) (fun i : s ↦ hq0 i)]
82    exact Finset.sum_coe_sort s (fun i ↦ Real.sqrt (p i) * Real.sqrt (q i))
83  simp_rw [hfinite] at hfid
84  exact tendsto_nhds_unique hfid (CountableScheffe.affinity_summable p q hp0 hq0 hp hq).hasSum
85 
86theorem stateFidelity_vectorMixture (b : HilbertBasis ι ℂ H) (p q : ι → ℝ)
87    (hp0 : ∀ i, 0 ≤ p i) (hq0 : ∀ i, 0 ≤ q i) (hp : HasSum p 1) (hq : HasSum q 1) :
88    stateFidelity (DensityState.vectorMixture b b.orthonormal.norm_eq_one p hp0 hp)
89      (DensityState.vectorMixture b b.orthonormal.norm_eq_one q hq0 hq) =
90      CountableScheffe.affinity p q :=
91  fidelity_vectorMixture b p q hp0 hq0 hp.summable hq.summable
92 
93/-- A one-mode geometric thermal density operator in an actual occupation basis. -/
94def geometricState (b : HilbertBasis ℕ ℂ H) (q : ℝ) (hq0 : 0 ≤ q) (hq1 : q < 1) :
95    DensityState H :=
96  DensityState.vectorMixture b b.orthonormal.norm_eq_one (Thermal.geometric q)
97    (Thermal.geometric_nonneg hq0 hq1.le) (Thermal.geometric_hasSum hq0 hq1)
98 
99/-- The scalar thermal formula is the fidelity of the actual normalized
100infinite-dimensional thermal density operators. -/
101theorem stateFidelity_geometric (b : HilbertBasis ℕ ℂ H) (q x : ℝ)
102    (hq0 : 0 ≤ q) (hq1 : q < 1) (hx0 : 0 ≤ x) (hx1 : x < 1) :
103    stateFidelity (geometricState b q hq0 hq1) (geometricState b x hx0 hx1) =
104      Thermal.fidelity q x := by
105  rw [geometricState, geometricState, stateFidelity_vectorMixture]
106  unfold CountableScheffe.affinity
107  simp_rw [← Real.sqrt_mul (Thermal.geometric_nonneg hq0 hq1.le _)]
108  exact Thermal.affinity_tsum hq0 hq1 hx0 hx1
109 
110/-- The actual multimode product-geometric occupation density operator. -/
111def productGeometricState {s : ℕ} (b : HilbertBasis (Fin s → ℕ) ℂ H)
112    (q : Fin s → ℝ) (hq0 : ∀ i, 0 ≤ q i) (hq1 : ∀ i, q i < 1) : DensityState H :=
113  DensityState.vectorMixture b b.orthonormal.norm_eq_one
114    (fun k ↦ ∏ i, Thermal.geometric (q i) (k i))
115    (fun k ↦ Finset.prod_nonneg (fun i _ ↦ Thermal.geometric_nonneg (hq0 i) (hq1 i).le (k i)))
116    (Thermal.multimode_geometric_hasSum hq0 hq1)
117 
118/-- Thermal fidelity is multiplicative on actual multimode density operators. -/
119theorem stateFidelity_productGeometric {s : ℕ} (b : HilbertBasis (Fin s → ℕ) ℂ H)
120    (q x : Fin s → ℝ) (hq0 : ∀ i, 0 ≤ q i) (hq1 : ∀ i, q i < 1)
121    (hx0 : ∀ i, 0 ≤ x i) (hx1 : ∀ i, x i < 1) :
122    stateFidelity (productGeometricState b q hq0 hq1)
123      (productGeometricState b x hx0 hx1) = ∏ i, Thermal.fidelity (q i) (x i) := by
124  rw [productGeometricState, productGeometricState, stateFidelity_vectorMixture]
125  unfold CountableScheffe.affinity
126  have hp (k : Fin s → ℕ) : 0 ≤ ∏ i, Thermal.geometric (q i) (k i) :=
127    Finset.prod_nonneg (fun i _ ↦ Thermal.geometric_nonneg (hq0 i) (hq1 i).le (k i))
128  simp_rw [← Real.sqrt_mul (hp _)]
129  exact (Thermal.multimode_affinity_of_product_laws hq0 hq1 hx0 hx1).tsum_eq
130 
131end
132end Cloning.InfiniteDiagonalFidelity