Offline · exact source
Exact Lean source

PCTGlobalWerner

formalization/Cloning/PCTGlobalWerner.lean

Source hash: 6f964a0bbe123ccd942b7c07e8d5cc318e1e695a82b764502bac67cbded19203

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.PCTCoordinateFrame
2import Cloning.PCTGlobalMatrixBridge
3 
4/-! Unrestricted computational transport of the physical Werner sandwich. -/
5noncomputable section
6open scoped BigOperators InnerProductSpace Matrix Kronecker ComplexOrder
7open Cloning.InfiniteTraceClass Cloning.PCT Cloning.InfiniteFiniteCorner
8open Cloning.GeneralSymmetricOccupation Cloning.PCTPurificationChannel
9namespace Cloning.PCTGlobal
10set_option maxHeartbeats 1200000
11set_option backward.isDefEq.respectTransparency false
12set_option linter.unusedSectionVars false
13local instance registerFiniteDimensionalWerner (I : Type*) [Fintype I] [DecidableEq I] :
14    FiniteDimensional ℂ (Register I) :=
15  (registerBasis I).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
16 
17variable {C : Type*} [Fintype C] [DecidableEq C] {d : ℕ}
18 
19def coordinateWords (e : Fin d ≃ C) (L : ℕ) : Word L d ≃ (Fin L → C) where
20  toFun w := fun i => e (w i)
21  invFun w := fun i => e.symm (w i)
22  left_inv w := by funext i; exact e.symm_apply_apply (w i)
23  right_inv w := by funext i; exact e.apply_symm_apply (w i)
24 
25def coordinatePairWords (e : Fin d ≃ C) (n r : ℕ) :
26    Word n d × Word r d ≃ (Fin (n+r) → C) :=
27  (wordPairEquiv n r d).trans (coordinateWords e (n+r))
28 
29def physicalPairMatrix (e : Fin d ≃ C) (n r : ℕ)
30    (T : Register (Fin (n+r) → C) →L[ℂ] Register (Fin (n+r) → C)) :
31    Matrix (Word n d × Word r d) (Word n d × Word r d) ℂ :=
32  fun a b => T (lp.single 2 (coordinatePairWords e n r b) 1) (coordinatePairWords e n r a)
33 
34private theorem register_operator_expansion {I : Type*} [Fintype I] [DecidableEq I]
35    (T : Register I →L[ℂ] Register I) (x : Register I) (a : I) :
36    T x a = ∑ b, T (lp.single 2 b 1) a * x b := by
37  have hx : x = ∑ b, x b • (lp.single 2 b 1 : Register I) := by
38    ext b
39    simp [lp.single_apply, Pi.single_apply]
40  conv_lhs => rw [hx]
41  simp [map_sum, map_smul, lp.coeFn_smul, mul_comm]
42 
43theorem physicalPairMatrix_injective (e : Fin d ≃ C) (n r : ℕ) :
44    Function.Injective (physicalPairMatrix e n r) := by
45  intro T S h
46  apply register_operator_ext
47  intro a b
48  obtain ⟨u,rfl⟩ := (coordinatePairWords e n r).surjective a
49  obtain ⟨v,rfl⟩ := (coordinatePairWords e n r).surjective b
50  exact congrArg (fun M => M u v) h
51 
52theorem physicalPairMatrix_mul (e : Fin d ≃ C) (n r : ℕ)
53    (T S : Register (Fin (n+r) → C) →L[ℂ] Register (Fin (n+r) → C)) :
54    physicalPairMatrix e n r (T*S) = physicalPairMatrix e n r T * physicalPairMatrix e n r S := by
55  ext a b
56  simp only [physicalPairMatrix, ContinuousLinearMap.mul_apply, Matrix.mul_apply]
57  rw [register_operator_expansion]
58  exact ((coordinatePairWords e n r).sum_comp (fun w =>
59    T (lp.single 2 w 1) (coordinatePairWords e n r a) *
60      S (lp.single 2 (coordinatePairWords e n r b) 1) w)).symm
61 
62theorem physicalPairMatrix_smul (e : Fin d ≃ C) (n r : ℕ) (c : ℂ)
63    (T : Register (Fin (n+r) → C) →L[ℂ] Register (Fin (n+r) → C)) :
64    physicalPairMatrix e n r (c • T) = c • physicalPairMatrix e n r T := rfl
65 
66theorem physicalPairMatrix_frame (e : Fin d ≃ C) (n r : ℕ)
67    (T : TensorSpace (n+r) d →L[ℂ] TensorSpace (n+r) d) :
68    physicalPairMatrix e n r
69      (operatorConjugation (tensorFrame (coordinateFrame e).orthonormal (n+r)).toContinuousLinearMap T) =
70      pairOperatorMatrix (n:=n) (r:=r) T := by
71  ext a b
72  rw [physicalPairMatrix, coordinate_operator_coefficient]
73  simp only [coordinatePairWords, coordinateWords, Equiv.trans_apply, Equiv.coe_fn_mk,
74    Equiv.symm_apply_apply, pairOperatorMatrix]
75 
76theorem tensorFrame_projector_conjugation
77    (u : OrthonormalBasis (Fin d) ℂ (Register C)) (L : ℕ) :
78    operatorConjugation (tensorFrame u.orthonormal L).toContinuousLinearMap (projector L d) =
79      physicalProjector L := by
80  apply ContinuousLinearMap.ext
81  intro x
82  obtain ⟨y,rfl⟩ := tensorFrame_surjective (L:=L) u x
83  change tensorFrame u.orthonormal L (projector L d
84    ((tensorFrame u.orthonormal L).toContinuousLinearMap.adjoint (tensorFrame u.orthonormal L y))) = _
85  rw [isometry_adjoint_apply_self, tensorFrame_physicalProjector]
86 
87theorem physicalPairMatrix_projector (e : Fin d ≃ C) (n r : ℕ) :
88    physicalPairMatrix e n r (physicalProjector (n+r)) = splitSymmetricProjector n r d := by
89  rw [← tensorFrame_projector_conjugation (coordinateFrame e),
90    physicalPairMatrix_frame, pairOperatorMatrix_projector]
91 
92theorem column_operator_coefficient {L d : ℕ}
93    (X : Matrix (Occupation L d) (Occupation L d) ℂ) (a b : Word L d) :
94    ofMatrix (@column L d) X (lp.single 2 b 1) a =
95      (columnMatrix L d * X * (columnMatrix L d).conjTranspose) a b := by
96  simp only [ofMatrix_apply, lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply,
97    smul_eq_mul, lp.inner_single_right, RCLike.inner_apply, starRingEnd_apply, one_mul,
98    Matrix.mul_apply, Matrix.conjTranspose_apply, columnMatrix, Finset.sum_mul]
99  rw [Finset.sum_comm]
100  apply Finset.sum_congr rfl
101  intro i _
102  apply Finset.sum_congr rfl
103  intro j _
104  ring
105 
106 
107variable {A : Type*} [Fintype A] [DecidableEq A] [Nonempty A]
108 
109theorem physicalEmbedding_conjugation_matrix {s : ℕ}
110    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A×A))) (L : ℕ)
111    (X : Matrix (Occupation L (s+1)) (Occupation L (s+1)) ℂ) :
112    operatorConjugation (physicalEmbedding u L).toContinuousLinearMap (registerLiftCLM X).1 =
113      operatorConjugation (tensorFrame u.orthonormal L).toContinuousLinearMap
114        (ofMatrix (@column L (s+1)) X) := by
115  have he : conjugationLinearMap (isometry L (s+1)).toContinuousLinearMap (registerLiftCLM X) =
116      matrixLift (@column L (s+1)) X := by
117    rw [conjugation_registerLiftCLM]
118    congr 1
119    funext q
120    exact isometry_single L (s+1) q
121  change operatorConjugation ((tensorFrame u.orthonormal L).toContinuousLinearMap.comp
122    (isometry L (s+1)).toContinuousLinearMap) (registerLiftCLM X).1 = _
123  rw [← operatorConjugation_comp]
124  exact congrArg (operatorConjugation (tensorFrame u.orthonormal L).toContinuousLinearMap)
125    (congrArg Subtype.val he)
126 
127/-- Full-identity slot insertion in the fixed physical coordinates agrees with
128computational tensor insertion on every occupation matrix. -/
129theorem physicalPairMatrix_slotInsertion {s : ℕ} (e : Fin (s+1) ≃ A×A) (n r : ℕ)
130    (X : Matrix (Occupation n (s+1)) (Occupation n (s+1)) ℂ) :
131    physicalPairMatrix e n r (registerLiftCLM (slotInsertion n r
132      (matrixOf (registerBasis _) (operatorConjugation
133        (groupedEmbedding (coordinateFrame e) n).toContinuousLinearMap (registerLiftCLM X).1)))).1 =
134      (columnMatrix n (s+1) * X * (columnMatrix n (s+1)).conjTranspose) ⊗ₖ
135        (1 : Matrix (Word r (s+1)) (Word r (s+1)) ℂ) := by
136  ext a b
137  rw [physicalPairMatrix, registerLiftCLM_coefficient]
138  simp only [slotInsertion, coordinatePairWords, coordinateWords, Equiv.trans_apply,
139    Equiv.coe_fn_mk, wordPairEquiv, Fin.append_left, Fin.append_right]
140  change matrixOf (registerBasis _) (operatorConjugation
141      (groupedEmbedding (coordinateFrame e) n).toContinuousLinearMap (registerLiftCLM X).1)
142      (pairWordsEquiv n (fun i => e (a.1 i))) (pairWordsEquiv n (fun i => e (b.1 i))) *
143      (∏ j : Fin r, if e (a.2 j) = e (b.2 j) then (1:ℂ) else 0) = _
144  rw [matrixOf_groupedEmbedding, physicalEmbedding_conjugation_matrix]
145  simp only [matrixOf, registerBasis_apply, register_inner_single,
146    coordinate_operator_coefficient, Equiv.symm_apply_apply, column_operator_coefficient,
147    e.injective.eq_iff]
148  congr 1
149  rw [Fintype.prod_ite_zero]
150  simp only [Finset.prod_const_one]
151  congr 1
152  exact propext ⟨fun h => funext h, fun h i => congrFun h i⟩
153 
154/-- The actual sector CPTP channel has the literal physical symmetric
155sandwich on every complex occupation input, in one fixed computational frame. -/
156theorem sectorChannel_physical_sandwich {s : ℕ} (e : Fin (s+1) ≃ A×A) (n r : ℕ)
157    (X : Matrix (Occupation n (s+1)) (Occupation n (s+1)) ℂ) :
158    conjugationLinearMap (physicalEmbedding (coordinateFrame e) (n+r)).toContinuousLinearMap
159      ((sectorChannel n r s).toLinearMap (registerLiftCLM X)) =
160    ((((n+s).choose s : ℝ) / ((n+r+s).choose s : ℝ) : ℝ) : ℂ) •
161      conjugationLinearMap (physicalProjector (C:=A×A) (n+r))
162        (registerLiftCLM (slotInsertion n r (matrixOf (registerBasis _)
163          (operatorConjugation (groupedEmbedding (coordinateFrame e) n).toContinuousLinearMap
164            (registerLiftCLM X).1)))) := by
165  rw [sectorChannel_apply]
166  apply Subtype.ext
167  change operatorConjugation (physicalEmbedding (coordinateFrame e) (n+r)).toContinuousLinearMap
168      (registerLiftCLM ((wernerChannel n r s).toFun X)).1 = _
169  rw [physicalEmbedding_conjugation_matrix]
170  have hp : (physicalProjector (C:=A×A) (n+r)).adjoint = physicalProjector (n+r) :=
171    (isStarProjection_starProjection (U:=physicalSymmetric (C:=A×A) (n+r))).isSelfAdjoint.adjoint_eq
172  have hc (T : Register (Fin (n+r) → A×A) →L[ℂ] Register (Fin (n+r) → A×A)) :
173      operatorConjugation (physicalProjector (C:=A×A) (n+r)) T =
174        physicalProjector (n+r) * T * physicalProjector (n+r) := by
175    apply ContinuousLinearMap.ext
176    intro x
177    simp only [operatorConjugation_apply, hp, ContinuousLinearMap.mul_apply]
178  change _ = ((((n+s).choose s : ℝ) / ((n+r+s).choose s : ℝ) : ℝ) : ℂ) •
179    operatorConjugation (physicalProjector (C:=A×A) (n+r)) _
180  rw [hc]
181  apply physicalPairMatrix_injective e n r
182  rw [physicalPairMatrix_frame, pairOperatorMatrix_ofMatrix,
183    physicalPairMatrix_smul, physicalPairMatrix_mul, physicalPairMatrix_mul,
184    physicalPairMatrix_projector, physicalPairMatrix_slotInsertion]
185  simpa only [Complex.coe_smul] using wernerChannel_physical_sandwich n r s X
186 
187end Cloning.PCTGlobal