Exact Lean source
MatrixDiscardLabel
formalization/Cloning/MatrixDiscardLabel.lean
Source hash: f627f88bbbe6b99f58fe466d4e2e0a201d808e1a172ae069b8028bf754cce2b0
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.Channels.discardLabelMaptheorem Cloning.Channels.discardLabelMap_addtheorem Cloning.Channels.discardLabelMap_smultheorem Cloning.Channels.discardLabelMap_tracetheorem Cloning.Channels.discardLabelMap_completely_positivedefinition Cloning.Channels.discardLabelChanneltheorem Cloning.Channels.discardLabelMap_blockDiagonal'1import Cloning.Channels
2import Cloning.MatrixFidelityBlocks
3
4/-!
5# Discarding a finite classical label is a quantum channel
6
7The map takes the sum of the diagonal blocks of any input matrix. Complete
8positivity and trace preservation are proved directly, at every amplification.
9-/
10
11noncomputable section
12open scoped BigOperators Matrix ComplexOrder
13open Matrix
14namespace Cloning.Channels
15
16variable {ι n : Type*} [Fintype ι] [Fintype n]
17
18/-- Sum the diagonal blocks, including on inputs with off-diagonal blocks. -/
19def discardLabelMap (X : Matrix (Σ _ : ι, n) (Σ _ : ι, n) ℂ) : Matrix n n ℂ :=
20 ∑ i, X.submatrix (fun a => ⟨i, a⟩) (fun a => ⟨i, a⟩)
21
22omit [Fintype n] in
23theorem discardLabelMap_add (X Y : Matrix (Σ _ : ι, n) (Σ _ : ι, n) ℂ) :
24 discardLabelMap (X + Y) = discardLabelMap X + discardLabelMap Y := by
25 simp [discardLabelMap, Matrix.submatrix_add, Finset.sum_add_distrib]
26
27omit [Fintype n] in
28theorem discardLabelMap_smul (c : ℂ) (X : Matrix (Σ _ : ι, n) (Σ _ : ι, n) ℂ) :
29 discardLabelMap (c • X) = c • discardLabelMap X := by
30 simp [discardLabelMap, Matrix.submatrix_smul, Finset.smul_sum]
31
32theorem discardLabelMap_trace (X : Matrix (Σ _ : ι, n) (Σ _ : ι, n) ℂ) :
33 trace (discardLabelMap X) = trace X := by
34 unfold discardLabelMap
35 rw [Matrix.trace_sum]
36 simp [Matrix.trace, Matrix.diag, Fintype.sum_sigma]
37
38omit [Fintype n] in
39theorem discardLabelMap_completely_positive (k : ℕ)
40 (X : Matrix (Fin k × (Σ _ : ι, n)) (Fin k × (Σ _ : ι, n)) ℂ)
41 (hX : X.PosSemidef) : (amplify discardLabelMap X).PosSemidef := by
42 have heq : amplify discardLabelMap X =
43 ∑ i : ι, X.submatrix (fun p : Fin k × n => (p.1, ⟨i, p.2⟩))
44 (fun p : Fin k × n => (p.1, ⟨i, p.2⟩)) := by
45 ext a b
46 simp [amplify, discardLabelMap, Matrix.submatrix_apply, Matrix.sum_apply]
47 rw [heq]
48 exact Matrix.posSemidef_sum _ (fun i _ => hX.submatrix _)
49
50/-- A concrete CPTP map forgetting a finite classical label. -/
51def discardLabelChannel : MatrixChannel (Σ _ : ι, n) n where
52 toFun := discardLabelMap
53 map_add := discardLabelMap_add
54 map_smul := discardLabelMap_smul
55 trace_preserving := discardLabelMap_trace
56 completely_positive := discardLabelMap_completely_positive
57
58omit [Fintype n] in
59theorem discardLabelMap_blockDiagonal' [DecidableEq ι]
60 (A : ι → Matrix n n ℂ) :
61 discardLabelMap (Matrix.blockDiagonal' A) = ∑ i, A i := by
62 unfold discardLabelMap
63 apply Finset.sum_congr rfl
64 intro i _
65 ext a b
66 simp [Matrix.submatrix_apply]
67
68end Cloning.Channels