Offline · exact source
Exact Lean source

PCTReducedGaussian

formalization/Cloning/PCTReducedGaussian.lean

Source hash: db6342eff63033f817c437d4ae7c1266e41791b99b5e07cded6b291f361229cf

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.PCTGaussianAssembly
2import Cloning.MatrixFidelityBounds
3import Mathlib.Tactic.Module
4import Mathlib.Tactic.FieldSimp
5import Mathlib.Tactic.FunProp
6 
7/-!
8# Physical reduced-purification differential
9 
10The Schmidt purification, its normalized tangent perturbations and their
11literal reduced density matrices are constructed in the finite computational
12basis. The differential and quadratic remainder follow from exact matrix
13identities, before invoking any LAN approximation.
14-/
15 
16noncomputable section
17open scoped BigOperators Matrix ComplexOrder InnerProductSpace Matrix.Norms.L2Operator
18open Matrix MeasureTheory Filter
19 
20namespace Cloning.PCTReducedGaussian
21 
22open Cloning.PCT
23 
24set_option maxHeartbeats 1000000
25set_option backward.isDefEq.respectTransparency false
26set_option linter.unusedSectionVars false
27 
28variable {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
29 
30/-- A coefficient matrix interpreted as a bipartite vector in the physical register. -/
31def coefficientVector (M : Matrix A B ℂ) : Register (A × B) :=
32  ⟨fun ab => M ab.1 ab.2, memℓp_gen (by
33    simp only [ENNReal.toReal_ofNat]; exact (hasSum_fintype _).summable)⟩
34 
35@[simp] theorem coefficientVector_apply (M : Matrix A B ℂ) (a : A) (b : B) :
36    coefficientVector M (a, b) = M a b := rfl
37 
38theorem reducedDensityMatrix_coefficientVector (M : Matrix A B ℂ) :
39    reducedDensityMatrix (coefficientVector M) = M * Mᴴ := rfl
40 
41theorem reducedDensityMatrix_smul (c : ℂ) (ψ : Register (A × B)) :
42    reducedDensityMatrix (c • ψ) = (c * star c) • reducedDensityMatrix ψ := by
43  ext a d
44  simp only [reducedDensityMatrix, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul,
45    StarMul.star_mul, Matrix.smul_apply, Finset.mul_sum]
46  apply Finset.sum_congr rfl
47  intro b _
48  ring
49 
50/-- The positive diagonal Schmidt coefficient matrix. -/
51def schmidtCoefficients (p : A → ℝ) : Matrix A A ℂ :=
52  Matrix.diagonal (fun a => (Real.sqrt (p a) : ℂ))
53 
54theorem schmidtCoefficients_star (p : A → ℝ) :
55    (schmidtCoefficients p)ᴴ = schmidtCoefficients p := by
56  simp [schmidtCoefficients, Matrix.diagonal_conjTranspose]
57 
58theorem schmidtCoefficients_square (p : A → ℝ) (hp : ∀ a, 0 ≤ p a) :
59    schmidtCoefficients p * schmidtCoefficients p =
60      Matrix.diagonal (fun a => (p a : ℂ)) := by
61  rw [schmidtCoefficients, Matrix.diagonal_mul_diagonal]
62  congr 1
63  funext a
64  exact_mod_cast Real.mul_self_sqrt (hp a)
65 
66theorem schmidt_reduced (p : A → ℝ) (hp : ∀ a, 0 ≤ p a) :
67    reducedDensityMatrix (coefficientVector (schmidtCoefficients p)) =
68      Matrix.diagonal (fun a => (p a : ℂ)) := by
69  rw [reducedDensityMatrix_coefficientVector, schmidtCoefficients_star,
70    schmidtCoefficients_square p hp]
71 
72/-- The derivative of partial trace along a purification tangent matrix. -/
73def partialTraceDifferential (p : A → ℝ) (Z : Matrix A A ℂ) : Matrix A A ℂ :=
74  Z * schmidtCoefficients p + schmidtCoefficients p * Zᴴ
75 
76theorem partialTraceDifferential_apply (p : A → ℝ) (Z : Matrix A A ℂ) (a c : A) :
77    partialTraceDifferential p Z a c =
78      Z a c * (Real.sqrt (p c) : ℂ) + (Real.sqrt (p a) : ℂ) * star (Z c a) := by
79  simp [partialTraceDifferential, schmidtCoefficients, Matrix.mul_diagonal,
80    Matrix.diagonal_mul, Matrix.conjTranspose_apply]
81 
82theorem partialTraceDifferential_diagonal (p : A → ℝ) (Z : Matrix A A ℂ) (a : A) :
83    partialTraceDifferential p Z a a = (2 * Real.sqrt (p a) * (Z a a).re : ℝ) := by
84  rw [partialTraceDifferential_apply]
85  apply Complex.ext <;> simp [Complex.mul_re, Complex.mul_im, Complex.star_def] <;> ring
86 
87theorem partialTraceDifferential_hermitian (p : A → ℝ) (Z : Matrix A A ℂ) :
88    (partialTraceDifferential p Z).IsHermitian := by
89  change (partialTraceDifferential p Z)ᴴ = partialTraceDifferential p Z
90  simp [partialTraceDifferential, Matrix.conjTranspose_add, Matrix.conjTranspose_mul,
91    schmidtCoefficients_star, add_comm]
92 
93/-- The tangent orthogonality condition is exactly the vanishing of the
94weighted diagonal sum of the coefficient matrix. -/
95theorem schmidt_inner_tangent (p : A → ℝ) (Z : Matrix A A ℂ) :
96    ⟪coefficientVector (schmidtCoefficients p), coefficientVector Z⟫_ℂ =
97      ∑ a, (Real.sqrt (p a) : ℂ) * Z a a := by
98  simp [lp.inner_eq_tsum, tsum_fintype, Fintype.sum_prod_type, coefficientVector,
99    schmidtCoefficients, Matrix.diagonal_apply, RCLike.inner_apply, apply_ite,
100    mul_comm]
101 
102theorem partialTraceDifferential_trace_zero (p : A → ℝ) (Z : Matrix A A ℂ)
103    (horth : ⟪coefficientVector (schmidtCoefficients p), coefficientVector Z⟫_ℂ = 0) :
104    Matrix.trace (partialTraceDifferential p Z) = 0 := by
105  rw [schmidt_inner_tangent] at horth
106  have hre := congrArg Complex.re horth
107  simp only [Complex.re_sum, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im,
108    zero_mul, sub_zero, Complex.zero_re] at hre
109  simp only [Matrix.trace, Matrix.diag, partialTraceDifferential_diagonal,
110    Complex.ofReal_mul, Complex.ofReal_ofNat, Finset.mul_sum]
111  simp_rw [mul_assoc]
112  rw [← Finset.mul_sum]
113  have hs : (∑ a, (Real.sqrt (p a) : ℂ) * ((Z a a).re : ℂ)) = 0 := by
114    exact_mod_cast hre
115  rw [hs, mul_zero]
116 
117/-- Exact numerator expansion of the reduced perturbed purification. -/
118theorem reduced_perturbation_exact (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
119    (Z : Matrix A A ℂ) (t : ℝ) :
120    reducedDensityMatrix (coefficientVector (schmidtCoefficients p + t • Z)) =
121      Matrix.diagonal (fun a => (p a : ℂ)) +
122        t • partialTraceDifferential p Z + t ^ 2 • (Z * Zᴴ) := by
123  rw [reducedDensityMatrix_coefficientVector]
124  simp only [Matrix.conjTranspose_add, Matrix.conjTranspose_smul, star_trivial,
125    schmidtCoefficients_star, Matrix.add_mul, Matrix.mul_add, Matrix.smul_mul,
126    Matrix.mul_smul, smul_smul, schmidtCoefficients_square p hp,
127    partialTraceDifferential, smul_add, pow_two]
128  module
129 
130/-- The normalized physical tangent vector, with its exact quadratic denominator. -/
131def normalizedTangentVector (p : A → ℝ) (Z : Matrix A A ℂ) (e t : ℝ) : Register (A × A) :=
132  ((Real.sqrt (1 + t ^ 2 * e) : ℂ)⁻¹) •
133    coefficientVector (schmidtCoefficients p + t • Z)
134 
135theorem normalizedTangent_reduced_exact (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
136    (Z : Matrix A A ℂ) (e : ℝ) (he : 0 ≤ e) (t : ℝ) :
137    reducedDensityMatrix (normalizedTangentVector p Z e t) =
138      (1 + t ^ 2 * e)⁻¹ •
139        (Matrix.diagonal (fun a => (p a : ℂ)) +
140          t • partialTraceDifferential p Z + t ^ 2 • (Z * Zᴴ)) := by
141  have hd : 0 ≤ 1 + t ^ 2 * e := by positivity
142  rw [normalizedTangentVector, reducedDensityMatrix_smul]
143  have hc : ((Real.sqrt (1 + t ^ 2 * e) : ℂ)⁻¹) *
144      star ((Real.sqrt (1 + t ^ 2 * e) : ℂ)⁻¹) = ((1 + t ^ 2 * e)⁻¹ : ℝ) := by
145    simp only [map_inv₀, Complex.star_def, Complex.conj_ofReal, ← mul_inv]
146    rw [← Complex.ofReal_mul, Real.mul_self_sqrt hd, Complex.ofReal_inv]
147  rw [hc, Complex.coe_smul, reduced_perturbation_exact p hp Z t]
148 
149end Cloning.PCTReducedGaussian