Offline · exact source
Exact Lean source

MixedChannelsFiniteInstrument

formalization/Cloning/MixedChannelsFiniteInstrument.lean

Source hash: 4c8d5081334f366e09e00dcc8193394c92592b7f6afcd5494389b3b899ce6f14

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.MixedChannelsPreparation
2import Cloning.InfiniteRectangularKraus
3 
4/-! Actual finite quantum instruments with a classical density attached to
5each outcome. Complete positivity and trace preservation hold on all inputs.
6Finite normalized Kraus families give concrete instances of the construction. -/
7noncomputable section
8open scoped ComplexOrder InnerProductSpace Topology BigOperators Classical
9open MeasureTheory Filter Cloning.InfiniteTraceClass
10namespace Cloning.Hybrid
11set_option backward.isDefEq.respectTransparency false
12 
13variable {Ω H K ι : Type*} [MeasurableSpace Ω] {μ : Measure Ω}
14  [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
15  [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
16  [Fintype ι]
17 
18theorem Lp_finset_sum_ae {E : Type*} [NormedAddCommGroup E]
19    (s : Finset ι) (A : ι → Lp E 1 μ) :
20    (fun y ↦ (∑ r ∈ s, A r : Lp E 1 μ) y) =ᵐ[μ] fun y ↦ ∑ r ∈ s, A r y := by
21  induction s using Finset.induction_on with
22  | empty => simpa only [Finset.sum_empty] using (Lp.coeFn_zero E 1 μ)
23  | @insert r s hrs ih =>
24    rw [Finset.sum_insert hrs]
25    filter_upwards [Lp.coeFn_add (A r) (∑ k ∈ s, A k), ih] with y hy hs
26    simp only [hy, Pi.add_apply, hs, Finset.sum_insert hrs]
27 
28variable (I : ι → TraceClass H →ₗ[ℂ] TraceClass K)
29    (hI : ∀ r, IsCompletelyPositive (I r))
30    (htrace : ∀ A, ∑ r, traceCLM (I r A) = traceCLM A)
31    (g : ι → Ω → ℝ) (hg : ∀ r, Integrable (g r) μ)
32    (hg0 : ∀ r y, 0 ≤ g r y) (hprob : ∀ r, ∫ y, g r y ∂μ = 1)
33 
34def finiteInstrumentLinearMap : TraceClass H →ₗ[ℂ] Lp (TraceClass K) 1 μ :=
35  ∑ r, (prepareL1 (g r) (hg r)).comp (I r)
36 
37theorem finiteInstrumentLinearMap_apply (A : TraceClass H) :
38    finiteInstrumentLinearMap I g hg A = ∑ r, prepareL1 (g r) (hg r) (I r A) := by
39  simp [finiteInstrumentLinearMap]
40 
41theorem finiteInstrumentLinearMap_ae (A : TraceClass H) :
42    finiteInstrumentLinearMap I g hg A =ᵐ[μ]
43      fun y ↦ ∑ r, (g r y : ℂ) • I r A := by
44  rw [finiteInstrumentLinearMap_apply]
45  have hall : ∀ᵐ y ∂μ, ∀ r, prepareL1 (g r) (hg r) (I r A) y =
46      (g r y : ℂ) • I r A := ae_all_iff.mpr (fun r ↦ prepareL1_ae _ _ _)
47  filter_upwards [Lp_finset_sum_ae Finset.univ (fun r ↦ prepareL1 (g r) (hg r) (I r A)),
48    hall] with y hy hall
49  rw [hy]
50  exact Finset.sum_congr rfl (fun r _ ↦ hall r)
51 
52include hI hg0 in
53theorem finiteInstrumentLinearMap_completelyPositive (n : ℕ)
54    (A : Fin n → Fin n → TraceClass H) (hA : BlockPositive A) :
55    L1BlockPositive (fun i j ↦ finiteInstrumentLinearMap I g hg (A i j)) := by
56  have hall : ∀ᵐ y ∂μ, ∀ i j : Fin n,
57      finiteInstrumentLinearMap I g hg (A i j) y =
58        ∑ r, (g r y : ℂ) • I r (A i j) :=
59    ae_all_iff.mpr (fun i ↦ ae_all_iff.mpr (fun j ↦ finiteInstrumentLinearMap_ae I g hg _))
60  filter_upwards [hall] with y hy
61  intro v
62  have hr (r : ι) : 0 ≤ (g r y : ℂ) *
63      (∑ i, ∑ j, ⟪v i, (I r (A i j)).1 (v j)⟫_ℂ) :=
64    mul_nonneg (by exact_mod_cast hg0 r y) (hI r n A hA v)
65  have hs := Finset.sum_nonneg (fun r (_ : r ∈ Finset.univ) ↦ hr r)
66  simp only [hy]
67  change 0 ≤ ∑ i, ∑ j, ⟪v i, inclusionCLM (∑ r, (g r y : ℂ) • I r (A i j)) (v j)⟫_ℂ
68  simp only [map_sum, map_smul, ContinuousLinearMap.sum_apply,
69    ContinuousLinearMap.smul_apply, inner_sum, inner_smul_right, inclusionCLM_apply]
70  have he : (∑ i, ∑ j, ∑ r, (g r y : ℂ) * ⟪v i, (I r (A i j)).1 (v j)⟫_ℂ) =
71      ∑ r, ∑ i, ∑ j, (g r y : ℂ) * ⟪v i, (I r (A i j)).1 (v j)⟫_ℂ := by
72    symm
73    rw [Finset.sum_comm]
74    apply Finset.sum_congr rfl
75    intro i _
76    exact Finset.sum_comm
77  rw [he]
78  simpa only [Finset.mul_sum] using hs
79 
80include htrace hprob in
81theorem finiteInstrumentLinearMap_trace (A : TraceClass H) :
82    integratedTrace (finiteInstrumentLinearMap I g hg A) = traceCLM A := by
83  rw [finiteInstrumentLinearMap_apply, map_sum]
84  calc
85    _ = ∑ r, traceCLM (I r A) := by
86      apply Finset.sum_congr rfl
87      intro r _
88      exact (integratedTrace_apply _).trans (integral_trace_prepareL1 _ _ (hprob r) _)
89    _ = _ := htrace A
90 
91include hI htrace hg0 hprob in
92theorem finiteInstrumentLinearMap_norm_nonneg (A : TraceClass H) (hA : 0 ≤ A.1) :
93    ‖finiteInstrumentLinearMap I g hg A‖ ≤ ‖A‖ := by
94  rw [finiteInstrumentLinearMap_apply]
95  calc
96    _ ≤ ∑ r, ‖prepareL1 (g r) (hg r) (I r A)‖ := norm_sum_le _ _
97    _ = ∑ r, (traceCLM (I r A)).re := by
98      apply Finset.sum_congr rfl
99      intro r _
100      rw [norm_prepareL1 _ _ (hg0 r) (hprob r)]
101      exact TraceClass.norm_eq_trace_re_of_nonneg _ ((hI r).map_nonneg A hA)
102    _ = (traceCLM A).re := by rw [← Complex.re_sum, htrace]
103    _ = ‖A‖ := (TraceClass.norm_eq_trace_re_of_nonneg _ hA).symm
104 
105def QuantumToHybrid.finiteInstrument : QuantumToHybrid H K μ where
106  map := (finiteInstrumentLinearMap I g hg).mkContinuous 2 (fun A ↦ by
107    simpa only [mul_one] using norm_map_two_mul_of_positive_bound
108      (finiteInstrumentLinearMap I g hg) (by norm_num : (0 : ℝ) ≤ 1)
109      (fun B hB ↦ by simpa only [one_mul] using
110        finiteInstrumentLinearMap_norm_nonneg I hI htrace g hg hg0 hprob B hB) A)
111  completelyPositive := finiteInstrumentLinearMap_completelyPositive I hI g hg hg0
112  tracePreserving := finiteInstrumentLinearMap_trace I htrace g hg hprob
113 
114@[simp] theorem QuantumToHybrid.finiteInstrument_apply (A : TraceClass H) :
115    (QuantumToHybrid.finiteInstrument I hI htrace g hg hg0 hprob).map A =
116      ∑ r, prepareL1 (g r) (hg r) (I r A) := finiteInstrumentLinearMap_apply I g hg A
117 
118/-- Literal finite Kraus normalization supplies the instrument trace law. -/
119def QuantumToHybrid.finiteKrausInstrument (B : ι → H →L[ℂ] K)
120    (hB : RectangularKrausComplete B) : QuantumToHybrid H K μ :=
121  QuantumToHybrid.finiteInstrument (fun r ↦ conjugationLinearMap (B r))
122    (fun r ↦ conjugationLinearMap_completelyPositive (B r))
123    (fun A ↦ by
124      simpa only [rectangularKrausLinearMap_apply, tsum_fintype, map_sum] using
125        rectangularKrausLinearMap_trace B hB A) g hg hg0 hprob
126 
127end Cloning.Hybrid