Offline · exact source
Exact Lean source

MatrixChannelFidelity

formalization/Cloning/MatrixChannelFidelity.lean

Source hash: cd17723592e01a006707d825ac792deed6f563aaa4edf3325b0dc954456267a8

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.Channels
2import Cloning.MatrixFidelitySymmetry
3import Cloning.MatrixFidelityWitness
4import Cloning.MatrixFidelityBlockBound
5import Mathlib.Analysis.Normed.Module.FiniteDimension
6 
7/-! # Data processing for concrete finite-dimensional matrix channels
8 
9Complete positivity transports positive two-by-two operator blocks. This
10provides the channel step in the semidefinite characterization of fidelity.
11-/
12 
13noncomputable section
14open scoped BigOperators Matrix MatrixOrder ComplexOrder Topology
15open Matrix Filter
16 
17namespace Cloning.MatrixFidelity
18 
19set_option autoImplicit false
20set_option backward.isDefEq.respectTransparency false
21 
22variable {α β : Type*} [Fintype α] [Fintype β]
23 
24/-- A completely positive matrix channel transports all four entries of
25a positive two-by-two operator block. -/
26theorem channel_fromBlocks_posSemidef (Φ : Cloning.Channels.MatrixChannel α β)
27    {A X Y B : Matrix α α ℂ} (h : (Matrix.fromBlocks A X Y B).PosSemidef) :
28    (Matrix.fromBlocks (Φ.toFun A) (Φ.toFun X) (Φ.toFun Y) (Φ.toFun B)).PosSemidef := by
29  let encode : Fin 2 × α → α ⊕ α :=
30    fun p => if p.1 = 0 then Sum.inl p.2 else Sum.inr p.2
31  let decode : β ⊕ β → Fin 2 × β := Sum.elim (fun i => (0, i)) (fun i => (1, i))
32  have hin := h.submatrix encode
33  have hout := (Φ.completely_positive 2 _ hin).submatrix decode
34  convert hout using 1
35  ext i j
36  cases i with
37  | inl i =>
38    cases j with
39    | inl j => simp [Cloning.Channels.amplify, Matrix.submatrix, encode, decode]
40    | inr j => simp [Cloning.Channels.amplify, Matrix.submatrix, encode, decode]
41  | inr i =>
42    cases j with
43    | inl j => simp [Cloning.Channels.amplify, Matrix.submatrix, encode, decode]
44    | inr j => simp [Cloning.Channels.amplify, Matrix.submatrix, encode, decode]
45 
46/-- Positivity of a channel follows from its one-dimensional amplification. -/
47theorem channel_map_posSemidef (Φ : Cloning.Channels.MatrixChannel α β)
48    {A : Matrix α α ℂ} (hA : A.PosSemidef) : (Φ.toFun A).PosSemidef := by
49  have hin := hA.submatrix (Prod.snd : Fin 1 × α → α)
50  have hout := (Φ.completely_positive 1 _ hin).submatrix (fun i : β => (0, i))
51  simpa only [Cloning.Channels.amplify, Matrix.submatrix_apply] using hout
52 
53/-- A feasible fidelity block remains feasible after applying a channel.
54Hermitian symmetry of the output block identifies its lower-left corner. -/
55theorem channel_fidelity_block_posSemidef (Φ : Cloning.Channels.MatrixChannel α β)
56    {A B X : Matrix α α ℂ}
57    (h : (Matrix.fromBlocks A X Xᴴ B).PosSemidef) :
58    (Matrix.fromBlocks (Φ.toFun A) (Φ.toFun X) (Φ.toFun X)ᴴ (Φ.toFun B)).PosSemidef := by
59  have hp := channel_fromBlocks_posSemidef Φ h
60  have hstar : (Φ.toFun X)ᴴ = Φ.toFun Xᴴ :=
61    (Matrix.isHermitian_fromBlocks_iff.mp hp.isHermitian).2.1
62  rwa [hstar]
63 
64/-- The channel's stated algebraic laws define an ordinary complex linear map. -/
65def channelLinearMap (Φ : Cloning.Channels.MatrixChannel α β) :
66    Matrix α α ℂ →ₗ[ℂ] Matrix β β ℂ where
67  toFun := Φ.toFun
68  map_add' := Φ.map_add
69  map_smul' := Φ.map_smul
70 
71/-- Finite-dimensional matrix channels are continuous, as a consequence
72of their linearity rather than an additional channel hypothesis. -/
73theorem channel_continuous (Φ : Cloning.Channels.MatrixChannel α β) :
74    Continuous Φ.toFun := (channelLinearMap Φ).continuous_of_finiteDimensional
75 
76/-- Compatibility with real scalar multiplication. -/
77theorem channel_map_real_smul (Φ : Cloning.Channels.MatrixChannel α β)
78    (ε : ℝ) (A : Matrix α α ℂ) : Φ.toFun (ε • A) = ε • Φ.toFun A :=
79  (channelLinearMap Φ |>.restrictScalars ℝ).map_smul ε A
80 
81variable [DecidableEq α] [DecidableEq β]
82 
83omit [DecidableEq β] in
84/-- The channel image of a positive-definite regularization is explicit;
85the channel need not preserve the identity. -/
86theorem channel_map_regularize (Φ : Cloning.Channels.MatrixChannel α β)
87    (A : Matrix α α ℂ) (ε : ℝ) :
88    Φ.toFun (Cloning.MatrixRegularization.regularize A ε) =
89      Φ.toFun A + ε • Φ.toFun 1 := by
90  rw [Cloning.MatrixRegularization.regularize, Φ.map_add, channel_map_real_smul]
91 
92/-- Fidelity data processing for positive-definite inputs. Complete
93positivity transports an attaining block witness, and trace preservation
94preserves its objective value. -/
95theorem fidelity_data_processing_posDef (Φ : Cloning.Channels.MatrixChannel α β)
96    {A B : Matrix α α ℂ} (hA : A.PosDef) (hB : B.PosDef) :
97    fidelity A B ≤ fidelity (Φ.toFun A) (Φ.toFun B) := by
98  obtain ⟨X, hblock, htrace⟩ := exists_fidelity_block_witness hA hB
99  have h := trace_re_le_fidelity_of_block_posSemidef
100    (channel_fidelity_block_posSemidef Φ hblock)
101  rw [Φ.trace_preserving, htrace] at h
102  exact h
103 
104/-- Data processing for actual root fidelity under an arbitrary finite
105dimensional completely positive trace-preserving matrix channel. Positive
106inputs may be singular and need not have unit trace. -/
107theorem fidelity_data_processing (Φ : Cloning.Channels.MatrixChannel α β)
108    {A B : Matrix α α ℂ} (hA : A.PosSemidef) (hB : B.PosSemidef) :
109    fidelity A B ≤ fidelity (Φ.toFun A) (Φ.toFun B) := by
110  let ε : ℕ → ℝ := fun k => 1 / ((k : ℝ) + 1)
111  have hε (k : ℕ) : 0 < ε k := by
112    dsimp [ε]
113    positivity
114  let Aseq := fun k => Cloning.MatrixRegularization.regularize A (ε k)
115  let Bseq := fun k => Cloning.MatrixRegularization.regularize B (ε k)
116  have hAseq (k : ℕ) : (Aseq k).PosDef :=
117    Cloning.MatrixRegularization.regularize_posDef hA (hε k)
118  have hBseq (k : ℕ) : (Bseq k).PosDef :=
119    Cloning.MatrixRegularization.regularize_posDef hB (hε k)
120  have hAlim : Tendsto Aseq atTop (𝓝 A) :=
121    (Cloning.MatrixRegularization.tendsto_regularize_zero A).comp
122      tendsto_one_div_add_atTop_nhds_zero_nat
123  have hBlim : Tendsto Bseq atTop (𝓝 B) :=
124    (Cloning.MatrixRegularization.tendsto_regularize_zero B).comp
125      tendsto_one_div_add_atTop_nhds_zero_nat
126  have hin := tendsto_fidelity hA hB (fun k => (hAseq k).posSemidef)
127    (fun k => (hBseq k).posSemidef) hAlim hBlim
128  have hΦA := (channel_continuous Φ).continuousAt.tendsto.comp hAlim
129  have hΦB := (channel_continuous Φ).continuousAt.tendsto.comp hBlim
130  have hout := tendsto_fidelity (channel_map_posSemidef Φ hA)
131    (channel_map_posSemidef Φ hB)
132    (fun k => channel_map_posSemidef Φ (hAseq k).posSemidef)
133    (fun k => channel_map_posSemidef Φ (hBseq k).posSemidef) hΦA hΦB
134  apply le_of_tendsto_of_tendsto hin hout
135  exact Filter.Eventually.of_forall (fun k =>
136    fidelity_data_processing_posDef Φ (hAseq k) (hBseq k))
137 
138end Cloning.MatrixFidelity