Exact Lean source
PCTPurificationChannel
formalization/Cloning/PCTPurificationChannel.lean
Source hash: ff945978e6976d245f6fdca875fc1ceab43d6d1a30250443050c8cdb32b49037
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
definition
Cloning.PCTPurificationChannel.purificationMapdefinition Cloning.PCTPurificationChannel.purificationKraustheorem Cloning.PCTPurificationChannel.purificationMap_eq_kraustheorem Cloning.PCTPurificationChannel.purificationKraus_normalizationdefinition Cloning.PCTPurificationChannel.purificationChanneltheorem Cloning.PCTPurificationChannel.purificationChannel_applydefinition Cloning.PCTPurificationChannel.tensorPowertheorem Cloning.PCTPurificationChannel.tensorPower_multheorem Cloning.PCTPurificationChannel.tensorPower_startheorem Cloning.PCTPurificationChannel.tensorPower_onedefinition Cloning.PCTPurificationChannel.entangledTensordefinition Cloning.PCTPurificationChannel.entangledMomenttheorem Cloning.PCTPurificationChannel.entangledMoment_posSemideftheorem Cloning.PCTPurificationChannel.partialTrace_entangledMomentdefinition Cloning.PCTPurificationChannel.finiteMomenttheorem Cloning.PCTPurificationChannel.finiteMoment_posSemideftheorem Cloning.PCTPurificationChannel.partialTrace_finiteMomentdefinition Cloning.PCTPurificationChannel.finitePurificationChanneltheorem Cloning.PCTPurificationChannel.purificationMap_squaredefinition Cloning.PCTPurificationChannel.integralMomenttheorem Cloning.PCTPurificationChannel.integralMoment_posSemidefdefinition Cloning.PCTPurificationChannel.partialTraceCLMtheorem Cloning.PCTPurificationChannel.partialTrace_integralMomentdefinition Cloning.PCTPurificationChannel.integralPurificationChannel1import Cloning.CartanChannel
2import Cloning.MatrixFidelityBounds
3import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Commute
4import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order
5import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap
6
7/-!
8# Finite-matrix square-root purification channels
9
10The square-root construction of Girardi--Mele--Lami is a genuine completely
11positive trace-preserving map whenever its positive moment operator has identity
12partial trace. This file builds the Kraus matrices and proves their normalization.
13The moment operators below are constructed from maximally entangled tensor
14vectors; their normalization is derived from the unitarity of the sampled
15matrices, rather than assumed as a channel axiom.
16-/
17
18noncomputable section
19open scoped BigOperators Matrix Kronecker MatrixOrder ComplexOrder Matrix.Norms.L2Operator
20open Matrix MeasureTheory
21
22namespace Cloning.PCTPurificationChannel
23
24open Cloning.Channels Cloning.CartanChannel Cloning.Compression Cloning.MatrixFidelity
25
26set_option maxHeartbeats 1000000
27set_option linter.unusedSectionVars false
28set_option backward.isDefEq.respectTransparency false
29
30variable {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
31
32local instance matrixCStar (I : Type*) [Fintype I] [DecidableEq I] :
33 CStarAlgebra (Matrix I I ℂ) where
34
35/-- Square-root sandwich on the input with an unnormalised identity ancilla. -/
36def purificationMap (R : Matrix (A × B) (A × B) ℂ) (X : Matrix A A ℂ) :=
37 CFC.sqrt R * (X ⊗ₖ (1 : Matrix B B ℂ)) * CFC.sqrt R
38
39/-- The environment-indexed Kraus matrices of the square-root sandwich. -/
40def purificationKraus (R : Matrix (A × B) (A × B) ℂ) :
41 B → Matrix (A × B) A ℂ :=
42 sliceKraus (CFC.sqrt R)
43
44theorem purificationMap_eq_kraus (R : Matrix (A × B) (A × B) ℂ)
45 (X : Matrix A A ℂ) :
46 purificationMap R X = krausMap (purificationKraus R) X := by
47 simpa only [purificationMap, purificationKraus, sqrt_conjTranspose] using
48 core_eq_kraus (CFC.sqrt R) X
49
50theorem purificationKraus_normalization {R : Matrix (A × B) (A × B) ℂ}
51 (hR : R.PosSemidef) :
52 (∑ b, (purificationKraus R b)ᴴ * purificationKraus R b) = partialTrace R := by
53 rw [purificationKraus, slice_normalization, sqrt_conjTranspose, sqrt_mul_self hR]
54
55/-- Concrete CPTP map, with Kraus positivity checked at every matrix level. -/
56def purificationChannel (R : Matrix (A × B) (A × B) ℂ)
57 (hR : R.PosSemidef) (hnorm : partialTrace R = 1) : MatrixChannel A (A × B) :=
58 ofKraus (purificationKraus R) ((purificationKraus_normalization hR).trans hnorm)
59
60theorem purificationChannel_apply (R : Matrix (A × B) (A × B) ℂ)
61 (hR : R.PosSemidef) (hnorm : partialTrace R = 1) (X : Matrix A A ℂ) :
62 (purificationChannel R hR hnorm).toFun X = purificationMap R X :=
63 (purificationMap_eq_kraus R X).symm
64
65/-- Tensor power matrix, in the actual computational word basis. -/
66def tensorPower (n : ℕ) (X : Matrix A B ℂ) :
67 Matrix (Fin n → A) (Fin n → B) ℂ :=
68 fun a b => ∏ i, X (a i) (b i)
69
70theorem tensorPower_mul {C : Type*} [Fintype C]
71 (n : ℕ) (X : Matrix A B ℂ) (Y : Matrix B C ℂ) :
72 tensorPower n (X * Y) = tensorPower n X * tensorPower n Y := by
73 ext a c
74 simp only [tensorPower, Matrix.mul_apply, ← Finset.prod_mul_distrib]
75 exact Fintype.prod_sum (fun i b => X (a i) b * Y b (c i))
76
77theorem tensorPower_star (n : ℕ) (X : Matrix A B ℂ) :
78 tensorPower n Xᴴ = (tensorPower n X)ᴴ := by
79 ext a b
80 simp [tensorPower, Matrix.conjTranspose_apply]
81
82@[simp] theorem tensorPower_one (n : ℕ) :
83 tensorPower n (1 : Matrix A A ℂ) = 1 := by
84 classical
85 ext a b
86 simp only [tensorPower, Matrix.one_apply]
87 by_cases h : a = b
88 · subst b
89 simp
90 · have hi : ∃ i, a i ≠ b i := Function.ne_iff.mp h
91 obtain ⟨i, hi⟩ := hi
92 rw [Finset.prod_eq_zero (Finset.mem_univ i) (by simp [hi])]
93 simp [h]
94
95/-- Vectorisation of a sampled unitary tensor power. -/
96def entangledTensor (n : ℕ) (U : Matrix A A ℂ) :
97 (Fin n → A) × (Fin n → A) → ℂ :=
98 fun ab => tensorPower n U ab.1 ab.2
99
100/-- Rank-one matrix of the unnormalised entangled tensor vector. -/
101def entangledMoment (n : ℕ) (U : Matrix A A ℂ) :
102 Matrix ((Fin n → A) × (Fin n → A)) ((Fin n → A) × (Fin n → A)) ℂ :=
103 fun ab cd => entangledTensor n U ab * star (entangledTensor n U cd)
104
105theorem entangledMoment_posSemidef (n : ℕ) (U : Matrix A A ℂ) :
106 (entangledMoment n U).PosSemidef := by
107 simpa only [entangledMoment, Matrix.vecMulVec_apply] using
108 Matrix.posSemidef_vecMulVec_self_star (entangledTensor n U)
109
110theorem partialTrace_entangledMoment (n : ℕ) (U : Matrix A A ℂ)
111 (hU : Uᴴ * U = 1) : partialTrace (entangledMoment n U) = 1 := by
112 have hUn : tensorPower n U * (tensorPower n U)ᴴ = 1 := by
113 rw [← tensorPower_star, ← tensorPower_mul, mul_eq_one_comm.mp hU, tensorPower_one]
114 ext a c
115 simpa [partialTrace, entangledMoment, entangledTensor, Matrix.mul_apply,
116 Matrix.conjTranspose_apply] using congrArg (fun M => M a c) hUn
117
118/-- Finite randomized entangled moment, for arbitrary sampled unitaries. -/
119def finiteMoment {ι : Type*} [Fintype ι] (n : ℕ) (w : ι → ℝ)
120 (U : ι → Matrix A A ℂ) :=
121 ∑ i, w i • entangledMoment n (U i)
122
123theorem finiteMoment_posSemidef {ι : Type*} [Fintype ι] (n : ℕ)
124 (w : ι → ℝ) (hw : ∀ i, 0 ≤ w i) (U : ι → Matrix A A ℂ) :
125 (finiteMoment n w U).PosSemidef := by
126 apply Matrix.posSemidef_sum
127 intro i _
128 exact (entangledMoment_posSemidef n (U i)).smul (hw i)
129
130theorem partialTrace_finiteMoment {ι : Type*} [Fintype ι] (n : ℕ)
131 (w : ι → ℝ) (hw : ∑ i, w i = 1) (U : ι → Matrix A A ℂ)
132 (hU : ∀ i, (U i)ᴴ * U i = 1) :
133 partialTrace (finiteMoment n w U) = 1 := by
134 have hpartial : partialTrace (finiteMoment n w U) =
135 ∑ i, w i • partialTrace (entangledMoment n (U i)) := by
136 ext a c
137 simp only [partialTrace, finiteMoment, Matrix.sum_apply, Matrix.smul_apply,
138 Finset.smul_sum]
139 exact Finset.sum_comm
140 rw [hpartial]
141 simp only [partialTrace_entangledMoment n _ (hU _), ← Finset.sum_smul, hw, one_smul]
142
143/-- A channel whose moment is constructed directly from finitely sampled
144unitaries; no positivity or trace-balance premise remains. -/
145def finitePurificationChannel {ι : Type*} [Fintype ι] (n : ℕ)
146 (w : ι → ℝ) (hw : ∀ i, 0 ≤ w i) (hsum : ∑ i, w i = 1)
147 (U : ι → Matrix A A ℂ) (hU : ∀ i, (U i)ᴴ * U i = 1) :
148 MatrixChannel (Fin n → A) ((Fin n → A) × (Fin n → A)) :=
149 purificationChannel (finiteMoment n w U) (finiteMoment_posSemidef n w hw U)
150 (partialTrace_finiteMoment n w hsum U hU)
151
152/-- If the moment commutes with a square-root input, the channel sandwich
153equals the sandwich that purifies that input. -/
154theorem purificationMap_square {R : Matrix (A × B) (A × B) ℂ}
155 (hR : R.PosSemidef) (S : Matrix A A ℂ)
156 (hcomm : Commute R (S ⊗ₖ (1 : Matrix B B ℂ))) :
157 purificationMap R (S * S) =
158 (S ⊗ₖ (1 : Matrix B B ℂ)) * R * (S ⊗ₖ (1 : Matrix B B ℂ)) := by
159 have hs : Commute (CFC.sqrt R) (S ⊗ₖ (1 : Matrix B B ℂ)) :=
160 hcomm.cfcₙ_nnreal NNReal.sqrt
161 have hten : (S * S) ⊗ₖ (1 : Matrix B B ℂ) =
162 (S ⊗ₖ (1 : Matrix B B ℂ)) * (S ⊗ₖ (1 : Matrix B B ℂ)) := by
163 rw [← Matrix.mul_kronecker_mul, Matrix.one_mul]
164 rw [purificationMap, hten, ← Matrix.mul_assoc, hs.eq]
165 calc
166 _ = (S ⊗ₖ (1 : Matrix B B ℂ)) *
167 (CFC.sqrt R * (S ⊗ₖ (1 : Matrix B B ℂ))) * CFC.sqrt R := by
168 simp only [Matrix.mul_assoc]
169 _ = (S ⊗ₖ (1 : Matrix B B ℂ)) *
170 ((S ⊗ₖ (1 : Matrix B B ℂ)) * CFC.sqrt R) * CFC.sqrt R := by rw [hs.eq]
171 _ = (S ⊗ₖ (1 : Matrix B B ℂ)) *
172 (S ⊗ₖ (1 : Matrix B B ℂ)) * R := by
173 simp only [Matrix.mul_assoc, sqrt_mul_self hR]
174 _ = _ := by
175 rw [Matrix.mul_assoc, ← hcomm.eq, ← Matrix.mul_assoc, ← hcomm.eq]
176
177/-- Bochner moment of the physical maximally entangled tensor projectors. -/
178def integralMoment {Ω : Type*} [MeasurableSpace Ω] (n : ℕ)
179 (μ : Measure Ω) (U : Ω → Matrix A A ℂ) :=
180 ∫ t, entangledMoment n (U t) ∂μ
181
182theorem integralMoment_posSemidef {Ω : Type*} [MeasurableSpace Ω]
183 (n : ℕ) (μ : Measure Ω) (U : Ω → Matrix A A ℂ) :
184 (integralMoment n μ U).PosSemidef := by
185 apply Matrix.nonneg_iff_posSemidef.mp
186 exact integral_nonneg (fun t => (entangledMoment_posSemidef n (U t)).nonneg)
187
188/-- The actual matrix partial trace, bundled as a continuous linear map. -/
189def partialTraceCLM : Matrix (A × B) (A × B) ℂ →L[ℂ] Matrix A A ℂ :=
190 LinearMap.toContinuousLinearMap
191 { toFun := partialTrace
192 map_add' := by intros; ext a c; simp [partialTrace, Finset.sum_add_distrib]
193 map_smul' := by intros; ext a c; simp [partialTrace, Finset.mul_sum] }
194
195theorem partialTrace_integralMoment {Ω : Type*} [MeasurableSpace Ω]
196 (n : ℕ) (μ : Measure Ω) [IsProbabilityMeasure μ] (U : Ω → Matrix A A ℂ)
197 (hU : ∀ t, (U t)ᴴ * U t = 1)
198 (hi : Integrable (fun t => entangledMoment n (U t)) μ) :
199 partialTrace (integralMoment n μ U) = 1 := by
200 have h := (partialTraceCLM (A := Fin n → A) (B := Fin n → A)).integral_comp_comm hi |>.symm
201 change partialTrace (integralMoment n μ U) =
202 ∫ t, partialTrace (entangledMoment n (U t)) ∂μ at h
203 rw [h]
204 simp only [partialTrace_entangledMoment n _ (hU _), integral_const, probReal_univ,
205 one_smul]
206
207/-- The Bochner version, including Haar distributions once their ordinary
208integrability is established. Its channel laws follow from actual unitary
209matrix entries and the total probability mass. -/
210def integralPurificationChannel {Ω : Type*} [MeasurableSpace Ω]
211 (n : ℕ) (μ : Measure Ω) [IsProbabilityMeasure μ] (U : Ω → Matrix A A ℂ)
212 (hU : ∀ t, (U t)ᴴ * U t = 1)
213 (hi : Integrable (fun t => entangledMoment n (U t)) μ) :
214 MatrixChannel (Fin n → A) ((Fin n → A) × (Fin n → A)) :=
215 purificationChannel (integralMoment n μ U) (integralMoment_posSemidef n μ U)
216 (partialTrace_integralMoment n μ U hU hi)
217
218end Cloning.PCTPurificationChannel