Offline · exact source
Exact Lean source

HybridWeightedMaps

formalization/Cloning/HybridWeightedMaps.lean

Source hash: c7c7581e4b704dc458aa993a8d472aa89da40f2355fafcae379269943d6ce4f2

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.HybridThermalWitness
2 
3/-!
4# Weighted quantum maps extracted from classical--quantum channels
5 
6The classical register is the actual operator-valued L1 Banach space. Preparing
7a scalar density, applying any completely positive L1 map, and integrating a
8bounded nonnegative weight produces a genuine completely positive quantum map.
9-/
10 
11noncomputable section
12open scoped ComplexOrder InnerProductSpace Topology BigOperators
13open MeasureTheory Filter Cloning.InfiniteTraceClass
14namespace Cloning.Hybrid
15set_option backward.isDefEq.respectTransparency false
16 
17variable {Ω H K : Type*} [MeasurableSpace Ω] {μ : Measure Ω}
18  [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
19  [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
20 
21/-- Positivity at every finite quantum ancilla, almost everywhere in the
22classical register. This is independent of representatives of L1 classes. -/
23def L1CompletelyPositive
24    (Λ : Lp (TraceClass H) 1 μ →ₗ[ℂ] Lp (TraceClass K) 1 μ) : Prop :=
25  ∀ n : ℕ, ∀ A : Fin n → Fin n → Lp (TraceClass H) 1 μ,
26    (∀ᵐ y ∂μ, BlockPositive (fun i j => A i j y)) →
27      ∀ᵐ y ∂μ, BlockPositive (fun i j => Λ (A i j) y)
28 
29def prepareL1 (g : Ω → ℝ) (hg : Integrable g μ) :
30    TraceClass H →ₗ[ℂ] Lp (TraceClass H) 1 μ where
31  toFun A := ((Complex.ofRealCLM.integrable_comp hg).smul_const A).toL1
32    (fun y => (g y : ℂ) • A)
33  map_add' A B := by
34    rw [← Integrable.toL1_add]
35    apply (Integrable.toL1_eq_toL1_iff _ _ _ _).mpr
36    exact Eventually.of_forall fun y => smul_add (g y : ℂ) A B
37  map_smul' c A := by
38    change _ = c • _
39    rw [← Integrable.toL1_smul]
40    apply (Integrable.toL1_eq_toL1_iff _ _ _ _).mpr
41    exact Eventually.of_forall fun y => smul_comm (g y : ℂ) c A
42 
43theorem prepareL1_ae (g : Ω → ℝ) (hg : Integrable g μ) (A : TraceClass H) :
44    prepareL1 g hg A =ᵐ[μ] fun y => (g y : ℂ) • A :=
45  Integrable.coeFn_toL1 ((Complex.ofRealCLM.integrable_comp hg).smul_const A)
46 
47theorem weightedL1_integrable (χ : Ω → ℝ) (hχ : AEStronglyMeasurable χ μ)
48    {C : ℝ} (hbound : ∀ y, ‖χ y‖ ≤ C) (A : Lp (TraceClass K) 1 μ) :
49    Integrable (fun y => (χ y : ℂ) • A y) μ := by
50  apply (L1.integrable_coeFn A).bdd_smul C
51    (Complex.continuous_ofReal.comp_aestronglyMeasurable hχ)
52  exact Eventually.of_forall fun y => by simpa only [Complex.norm_real] using hbound y
53 
54def weightedL1Integral (χ : Ω → ℝ) (hχ : AEStronglyMeasurable χ μ)
55    {C : ℝ} (hbound : ∀ y, ‖χ y‖ ≤ C) :
56    Lp (TraceClass K) 1 μ →ₗ[ℂ] TraceClass K where
57  toFun A := ∫ y, (χ y : ℂ) • A y ∂μ
58  map_add' A B := by
59    rw [← integral_add (weightedL1_integrable χ hχ hbound A)
60      (weightedL1_integrable χ hχ hbound B)]
61    apply integral_congr_ae
62    filter_upwards [Lp.coeFn_add A B] with y hy
63    simp only [hy, Pi.add_apply, smul_add]
64  map_smul' c A := by
65    rw [← integral_smul]
66    apply integral_congr_ae
67    filter_upwards [Lp.coeFn_smul c A] with y hy
68    simp only [hy, Pi.smul_apply, RingHom.id_apply]
69    exact smul_comm _ _ _
70 
71theorem norm_weightedL1Integral_le (χ : Ω → ℝ) (hχ : AEStronglyMeasurable χ μ)
72    {C : ℝ} (hbound : ∀ y, ‖χ y‖ ≤ C) (A : Lp (TraceClass K) 1 μ) :
73    ‖weightedL1Integral χ hχ hbound A‖ ≤ C * ‖A‖ := by
74  calc
75    _ ≤ ∫ y, ‖(χ y : ℂ) • A y‖ ∂μ := norm_integral_le_integral_norm _
76    _ ≤ ∫ y, C * ‖A y‖ ∂μ := by
77      apply integral_mono (weightedL1_integrable χ hχ hbound A).norm
78        ((L1.integrable_coeFn A).norm.const_mul C)
79      intro y
80      dsimp only
81      rw [norm_smul, Complex.norm_real]
82      exact mul_le_mul_of_nonneg_right (hbound y) (norm_nonneg _)
83    _ = _ := by rw [integral_const_mul, L1.norm_eq_integral_norm]
84 
85/-- The actual weighted quantum map, defined on all complex trace-class inputs. -/
86def weightedQuantumMap
87    (Λ : Lp (TraceClass H) 1 μ →ₗ[ℂ] Lp (TraceClass K) 1 μ)
88    (g : Ω → ℝ) (hg : Integrable g μ)
89    (χ : Ω → ℝ) (hχ : AEStronglyMeasurable χ μ)
90    {C : ℝ} (hbound : ∀ y, ‖χ y‖ ≤ C) : TraceClass H →ₗ[ℂ] TraceClass K :=
91  (weightedL1Integral χ hχ hbound).comp (Λ.comp (prepareL1 g hg))
92 
93theorem integral_complex_nonneg_ae {f : Ω → ℂ}
94    (hf : Integrable f μ) (hpos : ∀ᵐ y ∂μ, 0 ≤ f y) : 0 ≤ ∫ y, f y ∂μ := by
95  apply Complex.nonneg_iff.mpr
96  constructor
97  · change 0 ≤ Complex.reCLM (∫ y, f y ∂μ)
98    rw [← Complex.reCLM.integral_comp_comm hf]
99    exact integral_nonneg_of_ae (hpos.mono fun y hy => (Complex.nonneg_iff.mp hy).1)
100  · change 0 = Complex.imCLM (∫ y, f y ∂μ)
101    rw [← Complex.imCLM.integral_comp_comm hf]
102    symm
103    apply integral_eq_zero_of_ae
104    exact hpos.mono fun y hy => (Complex.nonneg_iff.mp hy).2.symm
105 
106theorem weightedQuantumMap_completelyPositive
107    (Λ : Lp (TraceClass H) 1 μ →ₗ[ℂ] Lp (TraceClass K) 1 μ)
108    (hΛ : L1CompletelyPositive Λ) (g : Ω → ℝ) (hg : Integrable g μ)
109    (hg0 : ∀ y, 0 ≤ g y) (χ : Ω → ℝ) (hχ : AEStronglyMeasurable χ μ)
110    (hχ0 : ∀ y, 0 ≤ χ y) {C : ℝ} (hbound : ∀ y, ‖χ y‖ ≤ C) :
111    IsCompletelyPositive (weightedQuantumMap Λ g hg χ hχ hbound) := by
112  intro n A hA v
113  have hp : ∀ᵐ y ∂μ, BlockPositive (fun i j => prepareL1 g hg (A i j) y) := by
114    have he : ∀ᵐ y ∂μ, ∀ i j : Fin n,
115        prepareL1 g hg (A i j) y = (g y : ℂ) • A i j :=
116      ae_all_iff.mpr fun i => ae_all_iff.mpr fun j => prepareL1_ae g hg (A i j)
117    filter_upwards [he] with y hy
118    intro u
119    simp only [hy]
120    change 0 ≤ ∑ i, ∑ j, ⟪u i, ((g y : ℂ) • (A i j).1) (u j)⟫_ℂ
121    simp only [ContinuousLinearMap.smul_apply, inner_smul_right,
122      ← Finset.mul_sum]
123    exact mul_nonneg (by exact_mod_cast hg0 y) (hA u)
124  have ho := hΛ n (fun i j => prepareL1 g hg (A i j)) hp
125  let F (i j : Fin n) (y : Ω) : TraceClass K :=
126    (χ y : ℂ) • Λ (prepareL1 g hg (A i j)) y
127  have hF (i j : Fin n) : Integrable (F i j) μ :=
128    weightedL1_integrable χ hχ hbound _
129  have hi (i j : Fin n) : Integrable (fun y => ⟪v i, (F i j y).1 (v j)⟫_ℂ) μ :=
130    (traceClassMatrixCoefficient (v i) (v j)).integrable_comp (hF i j)
131  have hs : Integrable (fun y => ∑ i : Fin n, ∑ j : Fin n,
132      ⟪v i, (F i j y).1 (v j)⟫_ℂ) μ :=
133    integrable_finset_sum _ (fun i _ => integrable_finset_sum _ (fun j _ => hi i j))
134  have hn : ∀ᵐ y ∂μ, 0 ≤ ∑ i : Fin n, ∑ j : Fin n,
135      ⟪v i, (F i j y).1 (v j)⟫_ℂ := by
136    filter_upwards [ho] with y hy
137    change 0 ≤ ∑ i, ∑ j, ⟪v i,
138      ((χ y : ℂ) • (Λ (prepareL1 g hg (A i j)) y).1) (v j)⟫_ℂ
139    simp only [ContinuousLinearMap.smul_apply, inner_smul_right, ← Finset.mul_sum]
140    exact mul_nonneg (by exact_mod_cast hχ0 y) (hy v)
141  have he (i j : Fin n) :
142      ⟪v i, (weightedQuantumMap Λ g hg χ hχ hbound (A i j)).1 (v j)⟫_ℂ =
143      ∫ y, ⟪v i, (F i j y).1 (v j)⟫_ℂ ∂μ :=
144    ((traceClassMatrixCoefficient (v i) (v j)).integral_comp_comm (hF i j)).symm
145  simp_rw [he]
146  have h := integral_complex_nonneg_ae hs hn
147  rw [integral_finset_sum _ (fun i _ =>
148    integrable_finset_sum _ (fun j _ => hi i j))] at h
149  simp_rw [integral_finset_sum _ (fun j _ => hi _ j)] at h
150  exact h
151 
152end Cloning.Hybrid