Offline · exact source
Exact Lean source

MatrixLiftedChannel

formalization/Cloning/MatrixLiftedChannel.lean

Source hash: f61e1ab6bc440ce6548414ee2f98a5537f5e0d6e20ca84aaadb12dbe43655fbb

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.

Paper ↔ Lean correspondence in this module
Declarations in this module
1import Cloning.Channels
2import Cloning.MatrixFidelityBlocks
3import Cloning.MatrixFidelityTensor
4import Cloning.MatrixFidelityLifted
5 
6/-!
7# Concrete finite sector transitions and ancillary lifting
8 
9An arbitrary finite family of actual matrix channels, positive input states,
10and nonnegative joint sector weights determines positive output blocks.
11Appending normalized ancillary states and taking a dependent orthogonal direct
12sum gives an actual density matrix. The Schur and PRV identifications are not
13assumed or asserted here.
14-/
15 
16noncomputable section
17 
18open scoped BigOperators Matrix MatrixOrder ComplexOrder Kronecker
19open Matrix
20open Cloning.Channels Cloning.MatrixFidelity
21 
22namespace Cloning.MatrixLiftedChannel
23 
24set_option backward.isDefEq.respectTransparency false
25 
26/-- Positivity follows from the concrete definition of complete positivity,
27by amplification with a one-dimensional ancilla. -/
28theorem map_positive {α β : Type*} [Fintype α] [Fintype β]
29    (Φ : MatrixChannel α β) {X : Matrix α α ℂ} (hX : X.PosSemidef) :
30    (Φ.toFun X).PosSemidef := by
31  have hcp := Φ.completely_positive 1 ((1 : Matrix (Fin 1) (Fin 1) ℂ) ⊗ₖ X)
32    (Matrix.PosSemidef.one.kronecker hX)
33  have hres := hcp.submatrix (fun i : β => ((0 : Fin 1), i))
34  simpa [Channels.amplify, Matrix.submatrix, Matrix.kroneckerMap_apply] using hres
35 
36variable {μ ν : Type*} [Fintype μ]
37variable {α : μ → Type*} {β : ν → Type*}
38variable [∀ i, Fintype (α i)] [∀ j, Fintype (β j)]
39 
40/-- Unnormalized output block for a fixed output sector. -/
41def transitionOutput (Φ : ∀ i j, MatrixChannel (α i) (β j))
42    (ρ : ∀ i, State (α i)) (joint : μ → ν → ℝ) (j : ν) : Matrix (β j) (β j) ℂ :=
43  ∑ i, joint i j • (Φ i j).toFun (ρ i).matrix
44 
45theorem transitionOutput_posSemidef (Φ : ∀ i j, MatrixChannel (α i) (β j))
46    (ρ : ∀ i, State (α i)) {joint : μ → ν → ℝ}
47    (hjoint : ∀ i j, 0 ≤ joint i j) (j : ν) :
48    (transitionOutput Φ ρ joint j).PosSemidef := by
49  apply Matrix.posSemidef_sum
50  intro i _
51  exact (map_positive (Φ i j) (ρ i).positive).smul (hjoint i j)
52 
53/-- The mass of an output block is exactly the output marginal weight. -/
54theorem transitionOutput_trace (Φ : ∀ i j, MatrixChannel (α i) (β j))
55    (ρ : ∀ i, State (α i)) (joint : μ → ν → ℝ) (j : ν) :
56    Matrix.trace (transitionOutput Φ ρ joint j) = ((∑ i, joint i j : ℝ) : ℂ) := by
57  simp [transitionOutput, Matrix.trace_sum, MatrixChannel.trace_preserving, State.trace_one]
58 
59theorem transitionOutput_trace_re (Φ : ∀ i j, MatrixChannel (α i) (β j))
60    (ρ : ∀ i, State (α i)) (joint : μ → ν → ℝ) (j : ν) :
61    (Matrix.trace (transitionOutput Φ ρ joint j)).re = ∑ i, joint i j := by
62  rw [transitionOutput_trace]
63  rfl
64 
65variable [Fintype ν] [DecidableEq ν]
66variable {κ : ν → Type*} [∀ j, Fintype (κ j)]
67variable [∀ j, DecidableEq (β j)] [∀ j, DecidableEq (κ j)]
68 
69/-- Joint law obtained by measuring an input sector and sampling an output
70sector through a classical transition kernel. -/
71def kernelJoint (p : μ → ℝ) (K : μ → ν → ℝ) (i : μ) (j : ν) : ℝ :=
72  p i * K i j
73 
74omit [Fintype μ] [Fintype ν] [DecidableEq ν] in
75theorem kernelJoint_nonneg {p : μ → ℝ} {K : μ → ν → ℝ}
76    (hp : ∀ i, 0 ≤ p i) (hK : ∀ i j, 0 ≤ K i j) :
77    ∀ i j, 0 ≤ kernelJoint p K i j :=
78  fun i j => mul_nonneg (hp i) (hK i j)
79 
80omit [DecidableEq ν] in
81/-- A probability law followed by a stochastic kernel has total mass one. -/
82theorem kernelJoint_mass {p : μ → ℝ} {K : μ → ν → ℝ}
83    (hp : ∑ i, p i = 1) (hK : ∀ i, ∑ j, K i j = 1) :
84    ∑ j, ∑ i, kernelJoint p K i j = 1 := by
85  unfold kernelJoint
86  rw [Finset.sum_comm]
87  simp_rw [← Finset.mul_sum, hK, mul_one]
88  exact hp
89 
90/-- Orthogonal output sectors with a normalized ancilla in each sector. -/
91def liftedOutput (Φ : ∀ i j, MatrixChannel (α i) (β j))
92    (ρ : ∀ i, State (α i)) (τ : ∀ j, State (κ j)) (joint : μ → ν → ℝ) :
93    Matrix (Σ j, β j × κ j) (Σ j, β j × κ j) ℂ :=
94  Matrix.blockDiagonal' (fun j => transitionOutput Φ ρ joint j ⊗ₖ (τ j).matrix)
95 
96theorem liftedOutput_posSemidef (Φ : ∀ i j, MatrixChannel (α i) (β j))
97    (ρ : ∀ i, State (α i)) (τ : ∀ j, State (κ j)) {joint : μ → ν → ℝ}
98    (hjoint : ∀ i j, 0 ≤ joint i j) : (liftedOutput Φ ρ τ joint).PosSemidef := by
99  apply blockDiagonal'_posSemidef
100  intro j
101  exact (transitionOutput_posSemidef Φ ρ hjoint j).kronecker (τ j).positive
102 
103omit [∀ j, DecidableEq (κ j)] [∀ j, DecidableEq (β j)] in
104theorem liftedOutput_trace (Φ : ∀ i j, MatrixChannel (α i) (β j))
105    (ρ : ∀ i, State (α i)) (τ : ∀ j, State (κ j)) (joint : μ → ν → ℝ) :
106    Matrix.trace (liftedOutput Φ ρ τ joint) = ((∑ j, ∑ i, joint i j : ℝ) : ℂ) := by
107  simp [liftedOutput, Matrix.trace_blockDiagonal', Matrix.trace_kronecker,
108    State.trace_one, transitionOutput_trace]
109 
110/-- The complete finite transition construction yields a density matrix. -/
111def liftedState (Φ : ∀ i j, MatrixChannel (α i) (β j))
112    (ρ : ∀ i, State (α i)) (τ : ∀ j, State (κ j)) (joint : μ → ν → ℝ)
113    (hjoint : ∀ i j, 0 ≤ joint i j) (hmass : ∑ j, ∑ i, joint i j = 1) :
114    State (Σ j, β j × κ j) where
115  matrix := liftedOutput Φ ρ τ joint
116  positive := liftedOutput_posSemidef Φ ρ τ hjoint
117  trace_one := by rw [liftedOutput_trace, hmass]; rfl
118 
119/-- The manuscript's finite transition rule, realized as a density matrix:
120sample the input sector with law `p`, the output sector with kernel `K`, apply
121its matrix channel, append the prescribed ancilla, and take the direct sum. -/
122def liftedStateOfKernel (Φ : ∀ i j, MatrixChannel (α i) (β j))
123    (ρ : ∀ i, State (α i)) (τ : ∀ j, State (κ j))
124    (p : μ → ℝ) (K : μ → ν → ℝ)
125    (hp : ∀ i, 0 ≤ p i) (hpsum : ∑ i, p i = 1)
126    (hK : ∀ i j, 0 ≤ K i j) (hKsum : ∀ i, ∑ j, K i j = 1) :
127    State (Σ j, β j × κ j) :=
128  liftedState Φ ρ τ (kernelJoint p K) (kernelJoint_nonneg hp hK)
129    (kernelJoint_mass hpsum hKsum)
130 
131/-- Exact fidelity of the concrete transition output with a weighted target
132family, using the same ancillary state in every matching sector. -/
133theorem liftedOutput_fidelity (Φ : ∀ i j, MatrixChannel (α i) (β j))
134    (ρ : ∀ i, State (α i)) (σ : ∀ j, State (β j)) (τ : ∀ j, State (κ j))
135    {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
136    (p : ν → ℝ) (hp : ∀ j, 0 ≤ p j) :
137    fidelity (liftedOutput Φ ρ τ joint)
138      (Matrix.blockDiagonal' (fun j => (p j • (σ j).matrix) ⊗ₖ (τ j).matrix)) =
139      ∑ j, Real.sqrt (p j) * fidelity (transitionOutput Φ ρ joint j) (σ j).matrix := by
140  exact fidelity_lifted_blocks (transitionOutput Φ ρ joint) (fun j => (σ j).matrix)
141    (fun j => (τ j).matrix) p (transitionOutput_posSemidef Φ ρ hjoint)
142    (fun j => (σ j).positive) (fun j => (τ j).positive) hp
143    (fun j => by rw [(τ j).trace_one]; rfl)
144 
145end Cloning.MatrixLiftedChannel