Exact Lean source
TensorLocalUnitaryPhysical
formalization/Cloning/TensorLocalUnitaryPhysical.lean
Source hash: 4ebe4e4b835afa101159225e5b2ae0ac6607946dcb9ded45cb92ab6c5297afce
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.TensorLocalUnitary.matrixExpPaththeorem Cloning.TensorLocalUnitary.matrixExpPath_entry_hasDerivAt_zerotheorem Cloning.TensorLocalUnitary.matrixExpPath_zerotheorem Cloning.TensorLocalUnitary.matrixExpPath_adddefinition Cloning.TensorLocalUnitary.collectiveMatrixtheorem Cloning.TensorLocalUnitary.tensorOperator_matrixExpPath_hasDerivAt_zerotheorem Cloning.TensorLocalUnitary.tensorOperator_matrixExpPath_hasDerivAttheorem Cloning.TensorLocalUnitary.tensorOperator_matrixExpPaththeorem Cloning.TensorLocalUnitary.tensorOperator_exp1import Cloning.TensorLocalUnitaryGenerator
2import Cloning.TensorCyclicSectorTransvection
3import Mathlib.Analysis.CStarAlgebra.Matrix
4
5/-! The exponential of the actual collective infinitesimal action equals the
6literal tensor power of the one-particle exponential. -/
7noncomputable section
8open scoped BigOperators InnerProductSpace Matrix Topology
9open NormedSpace Filter
10namespace Cloning.TensorLocalUnitary
11open Cloning.TensorLie Cloning.PCT Cloning.PCTPurificationChannel
12set_option backward.isDefEq.respectTransparency false
13set_option maxHeartbeats 1400000
14variable {n d : ℕ}
15
16open scoped Matrix.Norms.L2Operator in
17local instance : NormedAlgebra ℚ (Matrix (Fin d) (Fin d) ℂ) :=
18 NormedAlgebra.restrictScalars ℚ ℂ _
19
20local instance : NormedAlgebra ℚ (TensorRegister n (Fin d) →L[ℂ] TensorRegister n (Fin d)) :=
21 NormedAlgebra.restrictScalars ℚ ℂ _
22
23open scoped Matrix.Norms.L2Operator in
24def matrixExpPath (Y : Matrix (Fin d) (Fin d) ℂ) (z : ℂ) := exp (z • Y)
25
26open scoped Matrix.Norms.L2Operator in
27private def entryCLM (a b : Fin d) : Matrix (Fin d) (Fin d) ℂ →L[ℂ] ℂ :=
28 LinearMap.toContinuousLinearMap {
29 toFun := fun X => X a b
30 map_add' := fun _ _ => rfl
31 map_smul' := fun _ _ => rfl }
32
33open scoped Matrix.Norms.L2Operator in
34theorem matrixExpPath_entry_hasDerivAt_zero (Y : Matrix (Fin d) (Fin d) ℂ) (a b : Fin d) :
35 HasDerivAt (fun z : ℂ => matrixExpPath Y z a b) (Y a b) 0 := by
36 have h := (entryCLM a b).hasFDerivAt.comp_hasDerivAt (0 : ℂ)
37 (hasDerivAt_exp_smul_const Y (0 : ℂ))
38 simpa [matrixExpPath, entryCLM] using h
39
40@[simp] theorem matrixExpPath_zero (Y : Matrix (Fin d) (Fin d) ℂ) : matrixExpPath Y 0 = 1 := by
41 simp [matrixExpPath]
42
43open scoped Matrix.Norms.L2Operator in
44theorem matrixExpPath_add (Y : Matrix (Fin d) (Fin d) ℂ) (z s : ℂ) :
45 matrixExpPath Y (z+s) = matrixExpPath Y z * matrixExpPath Y s := by
46 rw [matrixExpPath, add_smul]
47 exact exp_add_of_commute ((Commute.refl Y).smul_left z |>.smul_right s)
48
49/-- The collective action of an arbitrary one-particle matrix, on the complete
50physical tensor register. -/
51def collectiveMatrix (Y : Matrix (Fin d) (Fin d) ℂ) :
52 TensorRegister n (Fin d) →L[ℂ] TensorRegister n (Fin d) :=
53 ∑ a, ∑ b, Y a b • collectiveGenerator n a b
54
55open scoped Matrix.Norms.Elementwise
56
57private theorem slotMatrix_product (t : Fin n) (a b : Fin d) (w v : Fin n → Fin d) :
58 (∏ j ∈ Finset.univ.erase t, (1 : Matrix (Fin d) (Fin d) ℂ) (w j) (v j)) *
59 Matrix.single a b (1 : ℂ) (w t) (v t) = slotMatrix t a b w v := by
60 by_cases h : w t = a ∧ v = Function.update w t b
61 · rcases h with ⟨ha, rfl⟩
62 rw [slotMatrix, if_pos ⟨ha, rfl⟩]
63 have hp : (∏ j ∈ Finset.univ.erase t,
64 (1 : Matrix (Fin d) (Fin d) ℂ) (w j) (Function.update w t b j)) = 1 := by
65 apply Finset.prod_eq_one
66 intro j hj
67 rw [Function.update_of_ne (Finset.mem_erase.mp hj).1]
68 simp
69 simp [hp, ha]
70 · rw [slotMatrix, if_neg h]
71 by_cases ha : w t = a
72 · by_cases hb : v t = b
73 · have hv : ∃ j, j ≠ t ∧ w j ≠ v j := by
74 by_contra hn
75 push_neg at hn
76 apply h
77 refine ⟨ha, funext (fun j => ?_)⟩
78 by_cases hj : j = t
79 · subst j
80 simpa using hb
81 · simpa [Function.update_of_ne hj] using (hn j hj).symm
82 obtain ⟨j, hj, hwv⟩ := hv
83 have hp : (∏ k ∈ Finset.univ.erase t,
84 (1 : Matrix (Fin d) (Fin d) ℂ) (w k) (v k)) = 0 :=
85 Finset.prod_eq_zero (i := j) (by simp [hj]) (by simp [Matrix.one_apply, hwv])
86 rw [hp, zero_mul]
87 · simp [Matrix.single, ha, hb, Ne.symm hb]
88 · simp [Matrix.single, ha, Ne.symm ha]
89
90private theorem slotMatrix_sum (Y : Matrix (Fin d) (Fin d) ℂ)
91 (t : Fin n) (w v : Fin n → Fin d) :
92 (∏ j ∈ Finset.univ.erase t, (1 : Matrix (Fin d) (Fin d) ℂ) (w j) (v j)) *
93 Y (w t) (v t) = ∑ a, ∑ b, Y a b * slotMatrix t a b w v := by
94 rw [show Y (w t) (v t) = ∑ a, ∑ b,
95 Y a b * Matrix.single a b (1 : ℂ) (w t) (v t) by
96 simp [Matrix.single, Matrix.of_apply, ite_and]]
97 simp only [Finset.mul_sum]
98 apply Finset.sum_congr rfl
99 intro a _
100 apply Finset.sum_congr rfl
101 intro b _
102 rw [← slotMatrix_product]
103 ring
104
105/-- Differentiating the literal tensor exponential at zero yields the actual
106sum of one-slot matrix-unit generators. -/
107theorem tensorOperator_matrixExpPath_hasDerivAt_zero (Y : Matrix (Fin d) (Fin d) ℂ) :
108 HasDerivAt (fun z : ℂ => tensorOperator n (matrixExpPath Y z))
109 (collectiveMatrix (n := n) Y) 0 := by
110 have hm : HasDerivAt (fun z : ℂ => tensorPower n (matrixExpPath Y z))
111 (∑ t : Fin n, ∑ a, ∑ b, Y a b • slotMatrix t a b) 0 := by
112 apply hasDerivAt_pi.mpr
113 intro w
114 apply hasDerivAt_pi.mpr
115 intro v
116 have hh := HasDerivAt.fun_finset_prod
117 (fun j (_ : j ∈ (Finset.univ : Finset (Fin n))) =>
118 matrixExpPath_entry_hasDerivAt_zero Y (w j) (v j))
119 convert hh using 1
120 simp only [matrixExpPath_zero, smul_eq_mul, Matrix.sum_apply, Matrix.smul_apply]
121 exact Finset.sum_congr rfl (fun t _ => (slotMatrix_sum Y t w v).symm)
122 have hh := (registerMatrixCLM (I := Fin n → Fin d)).hasFDerivAt.comp_hasDerivAt (0 : ℂ) hm
123 convert hh using 1
124 simp only [collectiveMatrix, collectiveGenerator, tensorOperator, map_sum, map_smul,
125 registerMatrixCLM_apply, slotGenerator, Finset.smul_sum]
126 exact (Finset.sum_comm.trans (Finset.sum_congr rfl (fun _ _ => Finset.sum_comm))).symm
127
128/-- The complete physical tensor path solves the collective-generator equation. -/
129theorem tensorOperator_matrixExpPath_hasDerivAt (Y : Matrix (Fin d) (Fin d) ℂ) (z : ℂ) :
130 HasDerivAt (fun s : ℂ => tensorOperator n (matrixExpPath Y s))
131 (collectiveMatrix (n := n) Y * tensorOperator n (matrixExpPath Y z)) z := by
132 have h0 := (tensorOperator_matrixExpPath_hasDerivAt_zero (n := n) Y).mul_const
133 (tensorOperator n (matrixExpPath Y z))
134 have hz := (show HasDerivAt _ _ (z-z) by simpa using h0).comp_sub_const z z
135 simpa only [← tensorOperator_mul, ← matrixExpPath_add, sub_add_cancel] using hz
136
137/-- Exact integration of the collective Lie action, on the full tensor space. -/
138theorem tensorOperator_matrixExpPath (Y : Matrix (Fin d) (Fin d) ℂ) (z : ℂ) :
139 tensorOperator n (matrixExpPath Y z) = exp (z • collectiveMatrix (n := n) Y) := by
140 let A := collectiveMatrix (n := n) Y
141 let F (s : ℂ) := exp ((-s) • A) * tensorOperator n (matrixExpPath Y s)
142 have hd (s : ℂ) : HasDerivAt F 0 s := by
143 have hbase := hasDerivAt_exp_smul_const A (-s)
144 have hminus := (show HasDerivAt _ _ (0-s) by simpa using hbase).comp_const_sub 0 s
145 simp only [zero_sub] at hminus
146 have hplus := tensorOperator_matrixExpPath_hasDerivAt (n := n) Y s
147 have hh := hminus.mul hplus
148 convert hh using 1
149 dsimp [A]
150 simp only [neg_smul]
151 noncomm_ring
152 have hc : F z = F 0 := is_const_of_deriv_eq_zero
153 (fun s => (hd s).differentiableAt) (fun s => (hd s).deriv) z 0
154 have hcancel : exp (z • A) * exp ((-z) • A) = 1 := by
155 rw [neg_smul, ← exp_add_of_commute (Commute.refl (z • A)).neg_right,
156 add_neg_cancel, exp_zero]
157 have hh := congrArg (fun S => exp (z • A) * S) hc
158 simpa only [F, neg_zero, zero_smul, exp_zero, matrixExpPath_zero,
159 tensorOperator_one, one_mul, mul_one, ← mul_assoc, hcancel] using hh
160
161open scoped Matrix.Norms.L2Operator in
162/-- The literal tensor power of a matrix exponential is the exponential of its
163actual sum of one-slot generators. No representation-integration premise. -/
164theorem tensorOperator_exp (Y : Matrix (Fin d) (Fin d) ℂ) :
165 tensorOperator n (exp Y) = exp (collectiveMatrix (n := n) Y) := by
166 simpa only [matrixExpPath, one_smul] using tensorOperator_matrixExpPath (n := n) Y 1
167
168end Cloning.TensorLocalUnitary