Offline · exact source
Exact Lean source

InfiniteCompletelyPositive

formalization/Cloning/InfiniteCompletelyPositive.lean

Source hash: 32245e1d9a8ba1f5956156790869ec778b8f5998ca2ed9fa1d4cac131cf84346

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.

In the dependency map: Physical problem

Declarations in this module
1import Cloning.InfiniteTraceClassCutoff
2import Cloning.InfiniteTraceClassDecomposition
3 
4/-!
5# Complete positivity of actual trace-class maps
6 
7Finite-ancilla positivity is expressed directly by the quadratic form of a
8finite matrix of bounded trace-class operators. This definition tests arbitrary
9vectors in the finite Hilbert direct sum, including entangled ones.
10-/
11 
12namespace Cloning.InfiniteTraceClass
13 
14noncomputable section
15set_option backward.isDefEq.respectTransparency false
16open scoped ComplexOrder InnerProductSpace BigOperators
17 
18variable {H K J : Type*}
19  [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
20  [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
21  [NormedAddCommGroup J] [InnerProductSpace ℂ J] [CompleteSpace J]
22variable {ι : Type*} [Fintype ι]
23 
24/-- Positivity of the operator on the finite Hilbert direct sum. -/
25def BlockPositive (A : ι → ι → TraceClass H) : Prop :=
26  ∀ x : ι → H, 0 ≤ ∑ i, ∑ j, ⟪x i, (A i j).1 (x j)⟫_ℂ
27 
28/-- Complete positivity at every finite ancilla dimension. -/
29def IsCompletelyPositive (Φ : TraceClass H →ₗ[ℂ] TraceClass K) : Prop :=
30  ∀ n : ℕ, ∀ A : Fin n → Fin n → TraceClass H,
31    BlockPositive A → BlockPositive (fun i j => Φ (A i j))
32 
33omit [CompleteSpace H] in
34theorem nonneg_of_inner_nonneg (T : H →L[ℂ] H)
35    (h : ∀ x, 0 ≤ ⟪x, T x⟫_ℂ) : 0 ≤ T := by
36  apply T.nonneg_iff_isPositive.mpr
37  apply (ContinuousLinearMap.isPositive_iff_complex T).mpr
38  intro x
39  have hx := Complex.nonneg_iff.mp (h x)
40  have heq : ⟪T x, x⟫_ℂ = star ⟪x, T x⟫_ℂ := (inner_conj_symm _ _).symm
41  rw [heq]
42  constructor
43  · apply Complex.ext
44    · simp only [Complex.star_def, Complex.conj_re, Complex.ofReal_re]
45      rfl
46    · simp only [Complex.star_def, Complex.conj_im, Complex.ofReal_im, ← hx.2, neg_zero]
47  · simpa only [Complex.star_def, Complex.conj_re] using hx.1
48 
49theorem BlockPositive.scalarCompression {A : ι → ι → TraceClass H}
50    (hA : BlockPositive A) (c : ι → ℂ) :
51    0 ≤ (∑ i, ∑ j, (star (c i) * c j) • A i j : TraceClass H).1 := by
52  apply nonneg_of_inner_nonneg
53  intro y
54  have h := hA (fun i => c i • y)
55  convert h using 1
56  change ⟪y, inclusionCLM (∑ i, ∑ j, (star (c i) * c j) • A i j) y⟫_ℂ = _
57  simp only [map_sum, map_smul, ContinuousLinearMap.sum_apply,
58    ContinuousLinearMap.smul_apply, inner_sum, inner_smul_right,
59    inner_smul_left, inclusionCLM_apply]
60  apply Finset.sum_congr rfl
61  intro i hi
62  apply Finset.sum_congr rfl
63  intro j hj
64  simp only [starRingEnd_apply]
65  ring
66 
67theorem BlockPositive.traceMatrix {A : ι → ι → TraceClass H}
68    (hA : BlockPositive A) (c : ι → ℂ) :
69    0 ≤ ∑ i, ∑ j, star (c i) * c j * traceCLM (A i j) := by
70  let T : TraceClass H := ∑ i, ∑ j, (star (c i) * c j) • A i j
71  have hp := hA.scalarCompression c
72  have ht := trace_eq_traceNorm_of_nonneg hp T.2
73  have h : 0 ≤ traceCLM T := by
74    change 0 ≤ trace T.1 T.2
75    rw [ht]
76    exact_mod_cast traceNorm_nonneg T.1 T.2
77  simpa only [T, map_sum, map_smul, smul_eq_mul] using h
78 
79theorem BlockPositive.sandwich {A : ι → ι → TraceClass H}
80    (hA : BlockPositive A) (P : H →L[ℂ] H) (hP : IsSelfAdjoint P) :
81    BlockPositive (fun i j => sandwichCLM P P (A i j)) := by
82  intro x
83  convert hA (fun i => P (x i)) using 1
84  apply Finset.sum_congr rfl
85  intro i hi
86  apply Finset.sum_congr rfl
87  intro j hj
88  change ⟪x i, P ((A i j).1 (P (x j)))⟫_ℂ = _
89  exact (hP.isSymmetric (x i) ((A i j).1 (P (x j)))).symm
90 
91theorem BlockPositive.replacePure {A : ι → ι → TraceClass H}
92    (hA : BlockPositive A) (z : K) :
93    BlockPositive (fun i j => traceCLM (A i j) • vectorProjector z) := by
94  intro x
95  convert hA.traceMatrix (fun i => ⟪z, x i⟫_ℂ) using 1
96  apply Finset.sum_congr rfl
97  intro i hi
98  apply Finset.sum_congr rfl
99  intro j hj
100  change ⟪x i, (traceCLM (A i j) • InnerProductSpace.rankOne ℂ z z) (x j)⟫_ℂ = _
101  simp only [ContinuousLinearMap.smul_apply, InnerProductSpace.rankOne_apply,
102    inner_smul_right, ← inner_conj_symm (x i) z]
103  simp only [starRingEnd_apply]
104  ring
105 
106/-- A fixed finite block test is continuous in the replacement operator. -/
107def replacementExpectation (C : ι → ι → ℂ) (x : ι → K) : TraceClass K →L[ℂ] ℂ :=
108  ∑ i, ∑ j, C i j •
109    ((innerSL ℂ (x i)).comp ((ContinuousLinearMap.apply ℂ K (x j)).comp inclusionCLM))
110 
111theorem replacementExpectation_apply (C : ι → ι → ℂ) (x : ι → K) (σ : TraceClass K) :
112    replacementExpectation C x σ = ∑ i, ∑ j, C i j * ⟪x i, σ.1 (x j)⟫_ℂ := by
113  simp [replacementExpectation, inclusionCLM_apply]
114 
115theorem BlockPositive.replace {A : ι → ι → TraceClass H}
116    (hA : BlockPositive A) (σ : TraceClass K) (hσ : 0 ≤ σ.1) :
117    BlockPositive (fun i j => traceCLM (A i j) • σ) := by
118  intro x
119  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ K
120  let E := replacementExpectation (fun i j => traceCLM (A i j)) x
121  have hs := (positive_rankOne_series hσ σ.2 b).mapL E
122  have hnonneg : ∀ k : w, 0 ≤ E (vectorProjector (CFC.sqrt σ.1 (b k))) := by
123    intro k
124    have h := hA.replacePure (CFC.sqrt σ.1 (b k)) x
125    change 0 ≤ replacementExpectation (fun i j => traceCLM (A i j)) x _
126    rw [replacementExpectation_apply]
127    convert h using 1
128    apply Finset.sum_congr rfl
129    intro i hi
130    apply Finset.sum_congr rfl
131    intro j hj
132    change _ = ⟪x i, (traceCLM (A i j) •
133      (vectorProjector (CFC.sqrt σ.1 (b k))).1) (x j)⟫_ℂ
134    simp only [ContinuousLinearMap.smul_apply, inner_smul_right]
135  have hsum : 0 ≤ E (TraceClass.ofOperator σ.1 σ.2) := by
136    rw [← hs.tsum_eq]
137    exact tsum_nonneg hnonneg
138  change 0 ≤ E σ at hsum
139  rw [replacementExpectation_apply] at hsum
140  convert hsum using 1
141  apply Finset.sum_congr rfl
142  intro i hi
143  apply Finset.sum_congr rfl
144  intro j hj
145  change ⟪x i, (traceCLM (A i j) • σ.1) (x j)⟫_ℂ = _
146  simp only [ContinuousLinearMap.smul_apply, inner_smul_right]
147 
148theorem projectionReplacement_completelyPositive (P : H →L[ℂ] H)
149    (hP : IsStarProjection P) (σ : DensityState H) :
150    IsCompletelyPositive (projectionReplacement P hP σ).toLinearMap := by
151  intro n A hA x
152  have hleft := hA.sandwich P hP.isSelfAdjoint x
153  have hright := (hA.sandwich (1 - P) hP.one_sub.isSelfAdjoint).replace
154    (TraceClass.ofOperator σ.op σ.traceClass) σ.positive x
155  convert add_nonneg hleft hright using 1
156  simp only [projectionReplacement_apply, ← Finset.sum_add_distrib]
157  apply Finset.sum_congr rfl
158  intro i hi
159  apply Finset.sum_congr rfl
160  intro j hj
161  change ⟪x i, ((sandwichCLM P P (A i j)).1 +
162      traceCLM (sandwichCLM (1 - P) (1 - P) (A i j)) • σ.op) (x j)⟫_ℂ = _
163  simp only [ContinuousLinearMap.add_apply, inner_add_right]
164  rfl
165 
166/-- A genuine infinite-dimensional CPTP map on the trace-class Banach space. -/
167structure QuantumChannel (H K : Type*)
168    [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
169    [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
170    extends PositiveTracePreservingMap H K where
171  completelyPositive : IsCompletelyPositive toLinearMap
172 
173def QuantumChannel.projectionReplacement (P : H →L[ℂ] H) (hP : IsStarProjection P)
174    (σ : DensityState H) : QuantumChannel H H where
175  toPositiveTracePreservingMap := Cloning.InfiniteTraceClass.projectionReplacement P hP σ
176  completelyPositive := projectionReplacement_completelyPositive P hP σ
177 
178def QuantumChannel.id : QuantumChannel H H where
179  toPositiveTracePreservingMap := PositiveTracePreservingMap.id
180  completelyPositive := fun _ _ hA => hA
181 
182def QuantumChannel.comp (Ψ : QuantumChannel K J) (Φ : QuantumChannel H K) :
183    QuantumChannel H J where
184  toPositiveTracePreservingMap := Ψ.toPositiveTracePreservingMap.comp Φ.toPositiveTracePreservingMap
185  completelyPositive := fun n A hA => Ψ.completelyPositive n _ (Φ.completelyPositive n A hA)
186 
187end
188end Cloning.InfiniteTraceClass