chars int64 40 24k | content_type stringclasses 9
values | id stringlengths 13 64 | source stringclasses 5
values | subset stringclasses 31
values | text stringlengths 40 24k |
|---|---|---|---|---|---|
329 | leanexplore_declaration | leanexplore:378001 | leanexplore_sqlite | leanexplore_declarations | def of_kraus_CPTPMap {κ : Type*} [Fintype κ] [DecidableEq dIn]
(M : κ → Matrix dOut dIn 𝕜)
(hTP : (∑ k, (M k).conjTranspose * (M k)) = 1) : CPTPMap dIn dOut 𝕜 where
toLinearMap := MatrixMap.of_kraus M M
cp := MatrixMap.of_kraus_isCompletelyPositive M
TP := MatrixMap.IsTracePreserving.of_kraus_isTracePreserv... |
124 | leanexplore_declaration | leanexplore:378002 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem ext {Λ₁ Λ₂ : PUMap dIn dOut 𝕜} (h : Λ₁.map = Λ₂.map) : Λ₁ = Λ₂ := by
rw [PUMap.mk.injEq]
exact PMap.ext h |
83 | leanexplore_declaration | leanexplore:378003 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem ext {Λ₁ Λ₂ : PUMap dIn dOut 𝕜} (h : Λ₁.map = Λ₂.map) : Λ₁ = Λ₂ := by |
131 | leanexplore_declaration | leanexplore:378004 | leanexplore_sqlite | leanexplore_declarations | theorem injective_toPMap : (PUMap.toPMap (dIn := dIn) (dOut := dOut) (𝕜 := 𝕜)).Injective := by
intro _ _ _
rwa [PUMap.mk.injEq] |
294 | leanexplore_declaration | leanexplore:378005 | leanexplore_sqlite | leanexplore_declarations | /-- `PUMap`s are functions from `HermitianMat`s to `HermitianMat`s. -/
noncomputable instance instFunLike : FunLike (PUMap dIn dOut ℂ) (HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
coe Λ := Λ.toPMap
coe_injective' := (DFunLike.coe_injective' (F := PMap dIn dOut ℂ)).comp injective_toPMap |
112 | leanexplore_declaration | leanexplore:378006 | leanexplore_sqlite | leanexplore_declarations | lemma apply_hermitianMat_eq_toPMap (Λ : PUMap dIn dOut ℂ) (ρ : HermitianMat dIn ℂ) :
Λ ρ = Λ.toPMap ρ := rfl |
270 | leanexplore_declaration | leanexplore:378007 | leanexplore_sqlite | leanexplore_declarations | instance instLinearMapClass : LinearMapClass (PUMap dIn dOut ℂ) ℝ (HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_add f x y := HermitianMat.ext <| LinearMap.map_add f.toLinearMap x y
map_smulₛₗ f c x := HermitianMat.ext <| by simp [apply_hermitianMat_eq_toPMap] |
253 | leanexplore_declaration | leanexplore:378008 | leanexplore_sqlite | leanexplore_declarations | instance instHContinuousOrderHomClass : ContinuousOrderHomClass (PUMap dIn dOut ℂ)
(HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_continuous f := ContinuousMapClass.map_continuous f.toPMap
map_monotone f x y h := by
simpa using f.pos h |
153 | leanexplore_declaration | leanexplore:378009 | leanexplore_sqlite | leanexplore_declarations | instance instOneHomClass : OneHomClass (PUMap dIn dOut ℂ)
(HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_one f := HermitianMat.ext (f.unital) |
241 | leanexplore_declaration | leanexplore:378010 | leanexplore_sqlite | leanexplore_declarations | /-- CPTP maps also preserve positivity on Hermitian matrices. -/
@[simp]
theorem pos_Hermitian (M : PUMap dIn dOut ℂ) {x : HermitianMat dIn ℂ} (h : 0 ≤ x) : 0 ≤ M x := by
simpa only [map_zero] using ContinuousOrderHomClass.map_monotone M h |
142 | leanexplore_declaration | leanexplore:378011 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem ext {Λ₁ Λ₂ : CPUMap dIn dOut 𝕜} (h : Λ₁.map = Λ₂.map) : Λ₁ = Λ₂ := by
rw [CPUMap.mk.injEq, CPMap.mk.injEq]
exact PMap.ext h |
84 | leanexplore_declaration | leanexplore:378012 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem ext {Λ₁ Λ₂ : CPUMap dIn dOut 𝕜} (h : Λ₁.map = Λ₂.map) : Λ₁ = Λ₂ := by |
165 | leanexplore_declaration | leanexplore:378013 | leanexplore_sqlite | leanexplore_declarations | theorem injective_toPMap : (CPMap.toPMap ∘ CPUMap.toCPMap (dIn := dIn) (dOut := dOut) (𝕜 := 𝕜)).Injective := by
intro _ _ _
rwa [CPUMap.mk.injEq, CPMap.mk.injEq] |
296 | leanexplore_declaration | leanexplore:378014 | leanexplore_sqlite | leanexplore_declarations | /-- `CPUMap`s are functions from `HermitianMat`s to `HermitianMat`s. -/
noncomputable instance instFunLike : FunLike (CPUMap dIn dOut ℂ) (HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
coe Λ := Λ.toPMap
coe_injective' := (DFunLike.coe_injective' (F := PMap dIn dOut ℂ)).comp injective_toPMap |
113 | leanexplore_declaration | leanexplore:378015 | leanexplore_sqlite | leanexplore_declarations | lemma apply_hermitianMat_eq_toPMap (Λ : CPUMap dIn dOut ℂ) (ρ : HermitianMat dIn ℂ) :
Λ ρ = Λ.toPMap ρ := rfl |
271 | leanexplore_declaration | leanexplore:378016 | leanexplore_sqlite | leanexplore_declarations | instance instLinearMapClass : LinearMapClass (CPUMap dIn dOut ℂ) ℝ (HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_add f x y := HermitianMat.ext <| LinearMap.map_add f.toLinearMap x y
map_smulₛₗ f c x := HermitianMat.ext <| by simp [apply_hermitianMat_eq_toPMap] |
254 | leanexplore_declaration | leanexplore:378017 | leanexplore_sqlite | leanexplore_declarations | instance instHContinuousOrderHomClass : ContinuousOrderHomClass (CPUMap dIn dOut ℂ)
(HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_continuous f := ContinuousMapClass.map_continuous f.toPMap
map_monotone f x y h := by
simpa using f.pos h |
154 | leanexplore_declaration | leanexplore:378018 | leanexplore_sqlite | leanexplore_declarations | instance instOneHomClass : OneHomClass (CPUMap dIn dOut ℂ)
(HermitianMat dIn ℂ) (HermitianMat dOut ℂ) where
map_one f := HermitianMat.ext (f.unital) |
242 | leanexplore_declaration | leanexplore:378019 | leanexplore_sqlite | leanexplore_declarations | /-- CPTP maps also preserve positivity on Hermitian matrices. -/
@[simp]
theorem pos_Hermitian (M : CPUMap dIn dOut ℂ) {x : HermitianMat dIn ℂ} (h : 0 ≤ x) : 0 ≤ M x := by
simpa only [map_zero] using ContinuousOrderHomClass.map_monotone M h |
79 | leanexplore_declaration | leanexplore:378020 | leanexplore_sqlite | leanexplore_declarations | /-- The Choi matrix of a CPTPMap. -/
@[reducible]
def choi := Λ.map.choi_matrix |
195 | leanexplore_declaration | leanexplore:378021 | leanexplore_sqlite | leanexplore_declarations | /-- Two CPTPMaps are equal if their Choi matrices are equal. -/
theorem choi_ext {Λ₁ Λ₂ : CPTPMap dIn dOut} (h : Λ₁.choi = Λ₂.choi) : Λ₁ = Λ₂ := by
ext1
exact MatrixMap.choi_equiv.injective h |
137 | leanexplore_declaration | leanexplore:378022 | leanexplore_sqlite | leanexplore_declarations | /-- The Choi matrix of a channel is PSD. -/
theorem choi_PSD_of_CPTP : Λ.map.choi_matrix.PosSemidef :=
Λ.map.choi_PSD_iff_CP_map.1 Λ.cp |
193 | leanexplore_declaration | leanexplore:378023 | leanexplore_sqlite | leanexplore_declarations | /-- The trace of a Choi matrix of a CPTP map is the cardinality of the input space. -/
@[simp]
theorem Tr_of_choi_of_CPTP : Λ.choi.trace =
(Finset.univ (α := dIn)).card :=
Λ.TP.trace_choi |
490 | leanexplore_declaration | leanexplore:378024 | leanexplore_sqlite | leanexplore_declarations | /-- Construct a CPTP map from a PSD Choi matrix with correct partial trace. -/
def CPTP_of_choi_PSD_Tr {M : Matrix (dOut × dIn) (dOut × dIn) ℂ} (h₁ : M.PosSemidef)
(h₂ : M.traceLeft = 1) : CPTPMap dIn dOut where
toLinearMap := MatrixMap.of_choi_matrix M
cp := (MatrixMap.choi_PSD_iff_CP_map (MatrixMap.of_choi_ma... |
215 | leanexplore_declaration | leanexplore:378025 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem choi_of_CPTP_of_choi (M : Matrix (dOut × dIn) (dOut × dIn) ℂ) {h₁} {h₂} :
(CPTP_of_choi_PSD_Tr (M := M) h₁ h₂).choi = M := by
simp only [choi, CPTP_of_choi_PSD_Tr]
rw [MatrixMap.map_choi_inv] |
95 | leanexplore_declaration | leanexplore:378026 | leanexplore_sqlite | leanexplore_declarations | theorem mat_coe_eq_apply_mat [DecidableEq dOut] (ρ : MState dIn) : (Λ ρ).m = Λ.map ρ.m :=
rfl |
124 | leanexplore_declaration | leanexplore:378027 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem funext [DecidableEq dOut] {Λ₁ Λ₂ : CPTPMap dIn dOut} (h : ∀ ρ, Λ₁ ρ = Λ₂ ρ) : Λ₁ = Λ₂ :=
DFunLike.ext _ _ h |
103 | leanexplore_declaration | leanexplore:378028 | leanexplore_sqlite | leanexplore_declarations | @[ext]
theorem funext [DecidableEq dOut] {Λ₁ Λ₂ : CPTPMap dIn dOut} (h : ∀ ρ, Λ₁ ρ = Λ₂ ρ) : Λ₁ = Λ₂ := |
215 | leanexplore_declaration | leanexplore:378029 | leanexplore_sqlite | leanexplore_declarations | /-- The composition of CPTPMaps, as a CPTPMap. -/
def compose (Λ₂ : CPTPMap dM dOut) (Λ₁ : CPTPMap dIn dM) : CPTPMap dIn dOut where
toLinearMap := Λ₂.map ∘ₗ Λ₁.map
cp := Λ₁.cp.comp Λ₂.cp
TP := Λ₁.TP.comp Λ₂.TP |
235 | leanexplore_declaration | leanexplore:378031 | leanexplore_sqlite | leanexplore_declarations | /-- Composition of CPTPMaps by `CPTPMap.compose` is compatible with the `instFunLike` action. -/
@[simp]
theorem compose_eq [DecidableEq dOut] {Λ₁ : CPTPMap dIn dM} {Λ₂ : CPTPMap dM dOut} : ∀ρ, (Λ₂ ∘ₘ Λ₁) ρ = Λ₂ (Λ₁ ρ) :=
fun _ ↦ rfl |
219 | leanexplore_declaration | leanexplore:378032 | leanexplore_sqlite | leanexplore_declarations | /-- Composition of CPTPMaps is associative. -/
theorem compose_assoc [DecidableEq dOut] (Λ₃ : CPTPMap dM₂ dOut) (Λ₂ : CPTPMap dM dM₂)
(Λ₁ : CPTPMap dIn dM) : (Λ₃ ∘ₘ Λ₂) ∘ₘ Λ₁ = Λ₃ ∘ₘ (Λ₂ ∘ₘ Λ₁) := by
ext1 ρ
simp |
1,888 | leanexplore_declaration | leanexplore:378033 | leanexplore_sqlite | leanexplore_declarations | /-- CPTPMaps have a convex structure from their Choi matrices. -/
instance instMixable : Mixable (Matrix (dOut × dIn) (dOut × dIn) ℂ) (CPTPMap dIn dOut) where
to_U := CPTPMap.choi
to_U_inj := choi_ext
mkT {u} h := ⟨CPTP_of_choi_PSD_Tr (M := u)
(Exists.recOn h fun t ht => ht ▸ t.choi_PSD_of_CPTP)
(Exists.r... |
138 | leanexplore_declaration | leanexplore:378034 | leanexplore_sqlite | leanexplore_declarations | /-- The identity channel, which leaves the input unchanged. -/
def id : CPTPMap dIn dIn where
toLinearMap := .id
cp := .id
TP := .id |
130 | leanexplore_declaration | leanexplore:378035 | leanexplore_sqlite | leanexplore_declarations | /-- The map `CPTPMap.id` leaves any matrix unchanged. -/
@[simp]
theorem id_map : (id (dIn := dIn)).map = LinearMap.id := by
rfl |
198 | leanexplore_declaration | leanexplore:378036 | leanexplore_sqlite | leanexplore_declarations | /-- The map `CPTPMap.id` leaves the input state unchanged. -/
@[simp]
theorem id_MState (ρ : MState dIn) : CPTPMap.id (dIn := dIn) ρ = ρ := by
apply MState.ext_m
rw [mat_coe_eq_apply_mat]
simp |
177 | leanexplore_declaration | leanexplore:378037 | leanexplore_sqlite | leanexplore_declarations | /-- The map `CPTPMap.id` composed with any map is the same map. -/
@[simp]
theorem id_compose [DecidableEq dOut] (Λ : CPTPMap dIn dOut) : id ∘ₘ Λ = Λ := by
apply funext
simp |
152 | leanexplore_declaration | leanexplore:378038 | leanexplore_sqlite | leanexplore_declarations | /-- Any map composed with `CPTPMap.id` is the same map. -/
@[simp]
theorem compose_id (Λ : CPTPMap dIn dOut) : Λ ∘ₘ id = Λ := by
classical ext1
simp |
481 | leanexplore_declaration | leanexplore:378039 | leanexplore_sqlite | leanexplore_declarations | /-- Given a equivalence (a bijection) between the types d₁ and d₂, that is, if they're
the same dimension, then there's a CPTP channel for this. This is what we need for
defining e.g. the SWAP channel, which is 'unitary' but takes heterogeneous input
and outputs types (d₁ × d₂) and (d₂ × d₁). -/
def ofEquiv (σ : dIn... |
112 | leanexplore_declaration | leanexplore:378040 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem ofEquiv_apply (σ : dIn ≃ dOut) (ρ : MState dIn) :
ofEquiv σ ρ = ρ.relabel σ.symm := by
rfl |
118 | leanexplore_declaration | leanexplore:378041 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem equiv_inverse (σ : dIn ≃ dOut) : (ofEquiv σ) ∘ (ofEquiv σ.symm) = id (dIn := dOut) := by
ext1; simp |
115 | leanexplore_declaration | leanexplore:378042 | leanexplore_sqlite | leanexplore_declarations | /-- The SWAP operation, as a channel. -/
def SWAP : CPTPMap (d₁ × d₂) (d₂ × d₁) :=
ofEquiv (Equiv.prodComm d₁ d₂) |
128 | leanexplore_declaration | leanexplore:378043 | leanexplore_sqlite | leanexplore_declarations | /-- The associator, as a channel. -/
def assoc : CPTPMap ((d₁ × d₂) × d₃) (d₁ × d₂ × d₃) :=
ofEquiv (Equiv.prodAssoc d₁ d₂ d₃) |
142 | leanexplore_declaration | leanexplore:378044 | leanexplore_sqlite | leanexplore_declarations | /-- The inverse associator, as a channel. -/
def assoc' : CPTPMap (d₁ × d₂ × d₃) ((d₁ × d₂) × d₃) :=
ofEquiv (Equiv.prodAssoc d₁ d₂ d₃).symm |
107 | leanexplore_declaration | leanexplore:378045 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem SWAP_eq_MState_SWAP (ρ : MState (d₁ × d₂)) : SWAP (d₁ := d₁) (d₂ := d₂) ρ = ρ.SWAP :=
rfl |
129 | leanexplore_declaration | leanexplore:378046 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem assoc_eq_MState_assoc (ρ : MState ((d₁ × d₂) × d₃)) : assoc (d₁ := d₁) (d₂ := d₂) (d₃ := d₃) ρ = ρ.assoc :=
rfl |
131 | leanexplore_declaration | leanexplore:378047 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem assoc'_eq_MState_assoc' (ρ : MState (d₁ × d₂ × d₃)) : assoc' (d₁ := d₁) (d₂ := d₂) (d₃ := d₃) ρ = ρ.assoc' :=
rfl |
108 | leanexplore_declaration | leanexplore:378048 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem assoc_assoc' : (assoc (d₁ := d₁) (d₂ := d₂) (d₃ := d₃)) ∘ₘ assoc' = id := by
ext1 ρ
simp |
1,215 | leanexplore_declaration | leanexplore:378049 | leanexplore_sqlite | leanexplore_declarations | /-- Partial tracing out the left, as a CPTP map. -/
@[simps]
def traceLeft : CPTPMap (d₁ × d₂) d₂ :=
--TODO: make Matrix.traceLeft a linear map, a `MatrixMap`.
letI f (d) [Fintype d] [DecidableEq d]: Matrix (d₁ × d) (d₁ × d) ℂ →ₗ[ℂ] Matrix d d ℂ := {
toFun x := Matrix.traceLeft x
map_add' := by
intr... |
48 | leanexplore_declaration | leanexplore:378050 | leanexplore_sqlite | leanexplore_declarations | @[simps]
def traceLeft : CPTPMap (d₁ × d₂) d₂ := |
113 | leanexplore_declaration | leanexplore:378051 | leanexplore_sqlite | leanexplore_declarations | /-- Partial tracing out the right, as a CPTP map. -/
def traceRight : CPTPMap (d₁ × d₂) d₁ :=
traceLeft ∘ₘ SWAP |
134 | leanexplore_declaration | leanexplore:378052 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem traceLeft_eq_MState_traceLeft (ρ : MState (d₁ × d₂)) :
traceLeft (d₁ := d₁) (d₂ := d₂) ρ = ρ.traceLeft := by
rfl |
210 | leanexplore_declaration | leanexplore:378053 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem traceRight_eq_MState_traceRight (ρ : MState (d₁ × d₂)) :
traceRight (d₁ := d₁) (d₂ := d₂) ρ = ρ.traceRight := by
rfl --It's actually pretty crazy that this is a definitional equality, cool |
457 | leanexplore_declaration | leanexplore:378054 | leanexplore_sqlite | leanexplore_declarations | /--The replacement channel that maps all inputs to a given state. -/
def replacement [Nonempty dIn] [DecidableEq dOut] (ρ : MState dOut) : CPTPMap dIn dOut :=
traceLeft ∘ₘ {
toFun := fun M => Matrix.kroneckerMap (fun x1 x2 => x1 * x2) M ρ.m
map_add' := by simp [Matrix.add_kronecker]
map_smul' := by ... |
617 | leanexplore_declaration | leanexplore:378055 | leanexplore_sqlite | leanexplore_declarations | /-- The output of `replacement ρ` is always that `ρ`. -/
@[simp]
theorem replacement_apply [Nonempty dIn] [DecidableEq dOut] (ρ : MState dOut) (ρ₀ : MState dIn) :
replacement ρ ρ₀ = ρ := by
simp only [replacement, compose_eq, traceLeft_eq_MState_traceLeft]
simp only [apply_mState_eq_toPTPMap, PTPMap.apply_mstat... |
116 | leanexplore_declaration | leanexplore:378056 | leanexplore_sqlite | leanexplore_declarations | instance [Nonempty dIn] [Nonempty dOut] [DecidableEq dOut] : Inhabited (CPTPMap dIn dOut) :=
⟨replacement default⟩ |
102 | leanexplore_declaration | leanexplore:378057 | leanexplore_sqlite | leanexplore_declarations | instance [Nonempty dIn] [Nonempty dOut] : Nonempty (CPTPMap dIn dOut) := by
classical infer_instance |
321 | leanexplore_declaration | leanexplore:378058 | leanexplore_sqlite | leanexplore_declarations | /-- There is a CPTP map that takes a system of any (nonzero) dimension and outputs the
trivial Hilbert space, 1-dimensional, indexed by any `Unique` type. We can think of this
as "destroying" the whole system; tracing out everything. -/
def destroy [Nonempty dIn] [Unique dOut] : CPTPMap dIn dOut :=
replacement defaul... |
231 | leanexplore_declaration | leanexplore:378059 | leanexplore_sqlite | leanexplore_declarations | /-- Two CPTP maps into the same one-dimensional output space must be equal -/
theorem eq_if_output_unique [Unique dOut] (Λ₁ Λ₂ : CPTPMap dIn dOut) : Λ₁ = Λ₂ :=
funext fun _ ↦ (Unique.eq_default _).trans (Unique.eq_default _).symm |
207 | leanexplore_declaration | leanexplore:378060 | leanexplore_sqlite | leanexplore_declarations | /-- There is exactly one CPTPMap to a 1-dimensional space. -/
instance instUnique [Nonempty dIn] [Unique dOut] : Unique (CPTPMap dIn dOut) where
default := destroy
uniq := fun _ ↦ eq_if_output_unique _ _ |
204 | leanexplore_declaration | leanexplore:378061 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem destroy_comp {dOut₂ : Type*} [Unique dOut₂] [DecidableEq dOut] [Nonempty dIn] [Nonempty dOut]
(Λ : CPTPMap dIn dOut) :
destroy (dOut := dOut₂) ∘ₘ Λ = destroy :=
Unique.eq_default _ |
223 | leanexplore_declaration | leanexplore:378062 | leanexplore_sqlite | leanexplore_declarations | /-- The tensor product of two CPTPMaps. -/
def prod (Λ₁ : CPTPMap dI₁ dO₁) (Λ₂ : CPTPMap dI₂ dO₂) : CPTPMap (dI₁ × dI₂) (dO₁ × dO₂) where
toLinearMap := Λ₁.map.kron Λ₂.map
cp := Λ₁.cp.kron Λ₂.cp
TP := Λ₁.TP.kron Λ₂.TP |
282 | leanexplore_declaration | leanexplore:378064 | leanexplore_sqlite | leanexplore_declarations | /-- Finitely-indexed tensor products of CPTPMaps. -/
def piProd (Λi : (i:ι) → CPTPMap (dI i) (dO i)) : CPTPMap ((i:ι) → dI i) ((i:ι) → dO i) where
toLinearMap := MatrixMap.piProd (fun i ↦ (Λi i).map)
cp := MatrixMap.IsCompletelyPositive.piProd (fun i ↦ (Λi i).cp)
TP := sorry |
266 | leanexplore_declaration | leanexplore:378065 | leanexplore_sqlite | leanexplore_declarations | theorem fin_1_piProd
{dI : Fin 1 → Type v} [Fintype (dI 0)] [DecidableEq (dI 0)]
{dO : Fin 1 → Type w} [Fintype (dO 0)] [DecidableEq (dO 0)]
(Λi : (i : Fin 1) → CPTPMap (dI 0) (dO 0)) :
piProd Λi = sorry ∘ₘ ((Λi 1) ∘ₘ sorry) :=
sorry --TODO: permutations |
504 | leanexplore_declaration | leanexplore:378066 | leanexplore_sqlite | leanexplore_declarations | /--
The tensor product of composed maps is the composition of the tensor products.
-/
theorem piProd_comp
{d₁ d₂ d₃ : ι → Type*}
[∀ i, Fintype (d₁ i)] [∀ i, DecidableEq (d₁ i)]
[∀ i, Fintype (d₂ i)] [∀ i, DecidableEq (d₂ i)]
[∀ i, Fintype (d₃ i)] [∀ i, DecidableEq (d₃ i)]
(Λ₁ : ∀ i, CPTPMap (d₁ i) (d₂ i)) (Λ₂... |
319 | leanexplore_declaration | leanexplore:378067 | leanexplore_sqlite | leanexplore_declarations | /-- Conjugating density matrices by a unitary as a channel. This is standard unitary evolution. -/
def ofUnitary (U : 𝐔[dIn]) : CPTPMap dIn dIn where
toLinearMap := MatrixMap.conj U
cp := MatrixMap.conj_isCompletelyPositive U.val
TP := by intro; simp [Matrix.trace_mul_cycle U.val, ← Matrix.star_eq_conjTranspose] |
145 | leanexplore_declaration | leanexplore:378068 | leanexplore_sqlite | leanexplore_declarations | /-- The unitary channel U conjugated by U. -/
theorem ofUnitary_eq_conj (U : 𝐔[dIn]) (ρ : MState dIn) :
(ofUnitary U) ρ = ρ.U_conj U :=
rfl |
121 | leanexplore_declaration | leanexplore:378069 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is unitary iff it is `ofUnitary U`. -/
def IsUnitary (Λ : CPTPMap dIn dIn) : Prop :=
∃ U, Λ = ofUnitary U |
241 | leanexplore_declaration | leanexplore:378070 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is unitary iff it can be written as conjugation by a unitary. -/
theorem IsUnitary_iff_U_conj (Λ : CPTPMap dIn dIn) : IsUnitary Λ ↔ ∃ U, ∀ ρ, Λ ρ = ρ.U_conj U := by
simp_rw [IsUnitary, ← ofUnitary_eq_conj, CPTPMap.funext_iff] |
1,098 | leanexplore_declaration | leanexplore:378071 | leanexplore_sqlite | leanexplore_declarations | theorem IsUnitary_equiv (σ : dIn ≃ dIn) : IsUnitary (ofEquiv σ) := by
have h_unitary : ∃ U : Matrix dIn dIn ℂ, U * U.conjTranspose = 1 ∧ U.conjTranspose * U = 1 ∧ ∀ x : dIn, (∀ y : dIn, (U y x = 1) ↔ (y = σ x)) ∧ ∀ y : dIn, (U y x = 0) ↔ (y ≠ σ x) := by
simp only [Matrix.conjTranspose, RCLike.star_def];
refin... |
1,265 | leanexplore_declaration | leanexplore:378072 | leanexplore_sqlite | leanexplore_declarations | theorem exists_purify (Λ : CPTPMap dIn dOut) :
∃ (Λ' : CPTPMap (dIn × dOut × dOut) (dIn × dOut × dOut)),
Λ'.IsUnitary ∧
Λ = (
let zero_prep : CPTPMap Unit (dOut × dOut) := replacement (MState.pure (Ket.basis default))
let prep := (id ⊗ᶜᵖ zero_prep)
let append : CPTPMap dIn (dIn × Unit)... |
815 | leanexplore_declaration | leanexplore:378073 | leanexplore_sqlite | leanexplore_declarations | /-- Every channel can be written as a unitary channel on a larger system. In general, if
the original channel was A→B, we may need to go as big as dilating the output system (the
environment) by a factor of A*B. One way of stating this would be that it forms an
isometry from A to (B×A×B). So that we can instead talk... |
106 | leanexplore_declaration | leanexplore:378074 | leanexplore_sqlite | leanexplore_declarations | theorem purify_IsUnitary (Λ : CPTPMap dIn dOut) : Λ.purify.IsUnitary :=
exists_purify Λ |>.choose_spec.1 |
758 | leanexplore_declaration | leanexplore:378075 | leanexplore_sqlite | leanexplore_declarations | /-- With a channel Λ : A → B, a valid purification (A×B×B)→(A×B×B) is such that:
* Preparing the default ∣0⟩ state on two copies of B
* Appending these to the input
* Applying the purified unitary channel
* Tracing out the two left parts of the output
is equivalent to the original channel. This theorem states that ... |
474 | leanexplore_declaration | leanexplore:378076 | leanexplore_sqlite | leanexplore_declarations | /-- The complementary channel comes from tracing out the other half (the right half) of the purified channel `purify`. -/
def complementary (Λ : CPTPMap dIn dOut) : CPTPMap dIn (dIn × dOut) :=
let zero_prep : CPTPMap Unit (dOut × dOut) := replacement (MState.pure (Ket.basis default))
let prep := (id ⊗ᶜᵖ zero_prep)
... |
266 | leanexplore_declaration | leanexplore:378077 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is *degradable to* another, if the other can be written as a composition of
a _degrading_ channel D with the original channel. -/
def IsDegradableTo (Λ : CPTPMap dIn dOut) (Λ₂ : CPTPMap dIn dOut₂) : Prop :=
∃ (D : CPTPMap dOut (dOut₂)), D ∘ₘ Λ = Λ₂ |
204 | leanexplore_declaration | leanexplore:378078 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is *antidegradable to* another, if the other `IsDegradableTo` this one. -/
@[reducible]
def IsAntidegradableTo (Λ : CPTPMap dIn dOut) (Λ₂ : CPTPMap dIn dOut₂) : Prop :=
IsDegradableTo Λ₂ Λ |
167 | leanexplore_declaration | leanexplore:378079 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is *degradable* if it `IsDegradableTo` its complementary channel. -/
def IsDegradable (Λ : CPTPMap dIn dOut) : Prop :=
IsDegradableTo Λ Λ.complementary |
196 | leanexplore_declaration | leanexplore:378080 | leanexplore_sqlite | leanexplore_declarations | /-- A channel is *antidegradable* if it `IsAntidegradableTo` its complementary channel. -/
@[reducible]
def IsAntidegradable (Λ : CPTPMap dIn dOut) : Prop :=
IsAntidegradableTo Λ Λ.complementary |
189 | leanexplore_declaration | leanexplore:378081 | leanexplore_sqlite | leanexplore_declarations | /-- `CPTPMap`s inherit a topology from their choi matrices. -/
instance instTop : TopologicalSpace (CPTPMap dIn dOut) :=
TopologicalSpace.induced (CPTPMap.choi) instTopologicalSpaceMatrix |
216 | leanexplore_declaration | leanexplore:378082 | leanexplore_sqlite | leanexplore_declarations | /-- The projection from `CPTPMap` to the Choi matrix is an embedding -/
theorem choi_IsEmbedding : Topology.IsEmbedding (CPTPMap.choi (dIn := dIn) (dOut := dOut)) where
eq_induced := rfl
injective _ _ := choi_ext |
100 | leanexplore_declaration | leanexplore:378083 | leanexplore_sqlite | leanexplore_declarations | instance instT3Space : T3Space (CPTPMap dIn dOut) :=
Topology.IsEmbedding.t3Space choi_IsEmbedding |
399 | leanexplore_declaration | leanexplore:378084 | leanexplore_sqlite | leanexplore_declarations | /-- The dual of a map between matrices, defined by `Tr[A M(B)] = Tr[(dual M)(A) B]`. Sometimes
called the adjoint of the map instead. -/
@[irreducible]
def dual (M : MatrixMap dIn dOut R) : MatrixMap dOut dIn R :=
let iso1 := (Module.Basis.toDualEquiv <| Matrix.stdBasis R dIn dIn).symm
let iso2 := (Module.Basis.to... |
352 | leanexplore_declaration | leanexplore:378085 | leanexplore_sqlite | leanexplore_declarations | /-- The defining property of a dual map: inner products are preserved on the opposite argument. -/
theorem Dual.trace_eq (M : MatrixMap dIn dOut R) (A : Matrix dIn dIn R) (B : Matrix dOut dOut R) :
(M A * B).trace = (A * M.dual B).trace := by
unfold dual
dsimp [Matrix.trace]
rw [LinearMap.dualMap_apply']
si... |
188 | leanexplore_declaration | leanexplore:378086 | leanexplore_sqlite | leanexplore_declarations | /-- The dual of a `IsHermitianPreserving` map also `IsHermitianPreserving`. -/
theorem IsHermitianPreserving.dual (h : M.IsHermitianPreserving) : M.dual.IsHermitianPreserving := by
sorry |
770 | leanexplore_declaration | leanexplore:378087 | leanexplore_sqlite | leanexplore_declarations | theorem _root_.Matrix.PosSemidef.trace_mul_nonneg {n : Type*} [Fintype n] [DecidableEq n]
{A B : Matrix n n 𝕜} (hA : A.PosSemidef) (hB : B.PosSemidef) :
0 ≤ (A * B).trace := by
open scoped Matrix in
obtain ⟨sqrtB, rfl⟩ : ∃ sqrtB : Matrix n n 𝕜, B = sqrtBᴴ * sqrtB := by
classical
apply CStarAlgebra... |
914 | leanexplore_declaration | leanexplore:378088 | leanexplore_sqlite | leanexplore_declarations | /-- The dual of a `IsPositive` map also `IsPositive`. -/
theorem IsPositive.dual (h : M.IsPositive) : M.dual.IsPositive := by
intro x hx
rw [Matrix.posSemidef_iff_dotProduct_mulVec] at hx ⊢
use IsHermitianPreserving.dual h.IsHermitianPreserving hx.1
intro v
have h_dual_pos : 0 ≤ (M (Matrix.vecMulVec v (star v... |
698 | leanexplore_declaration | leanexplore:378089 | leanexplore_sqlite | leanexplore_declarations | /-- The dual of TracePreserving map is *not* trace-preserving, it's *unital*, that is, M*(I) = I. -/
theorem dual_Unital (h : M.IsTracePreserving) : M.dual.Unital := by
-- By definition of dual, we know that for any matrix A, Tr(M(A) * I) = Tr(A * M*(I)).
have h_dual_trace : ∀ A : Matrix dIn dIn 𝕜, (M A * 1).trace... |
43 | leanexplore_declaration | leanexplore:378090 | leanexplore_sqlite | leanexplore_declarations | alias IsTracePreserving.dual := dual_Unital |
816 | leanexplore_declaration | leanexplore:378091 | leanexplore_sqlite | leanexplore_declarations | /--
If two matrix maps satisfy the trace duality property, they are equal.
-/
lemma dual_unique
(M : MatrixMap dIn dOut 𝕜) (M' : MatrixMap dOut dIn 𝕜)
(h : ∀ A B, (M A * B).trace = (A * M' B).trace) : M.dual = M' := by
-- By definition of dual, we know that for any A and B, the trace of (M A) * B equals the... |
996 | leanexplore_declaration | leanexplore:378092 | leanexplore_sqlite | leanexplore_declarations | /--
The Choi matrix of the dual map is the transpose of the reindexed Choi matrix of the original map.
-/
lemma dual_choi_matrix (M : MatrixMap dIn dOut 𝕜) :
M.dual.choi_matrix = (M.choi_matrix.transpose).reindex (Equiv.prodComm dOut dIn) (Equiv.prodComm dOut dIn) := by
-- By definition of dual, we know that $(M... |
400 | leanexplore_declaration | leanexplore:378093 | leanexplore_sqlite | leanexplore_declarations | /--
If the Choi matrix of a map is positive semidefinite, then the Choi matrix of its dual is also positive semidefinite.
-/
lemma dual_choi_matrix_posSemidef_of_posSemidef (M : MatrixMap dIn dOut 𝕜) (h : M.choi_matrix.PosSemidef) :
M.dual.choi_matrix.PosSemidef := by
rw [ dual_choi_matrix ];
simp +zetaDelta a... |
191 | leanexplore_declaration | leanexplore:378094 | leanexplore_sqlite | leanexplore_declarations | /--
The dual of the identity map is the identity map.
-/
lemma dual_id : (MatrixMap.id dIn 𝕜).dual = MatrixMap.id dIn 𝕜 := by
exact dual_unique (id dIn 𝕜) (id dIn 𝕜) fun A_1 => congrFun rfl |
4,162 | leanexplore_declaration | leanexplore:378095 | leanexplore_sqlite | leanexplore_declarations | /--
The dual of a Kronecker product of maps is the Kronecker product of their duals.
-/
lemma dual_kron {A B C D : Type*} [Fintype A] [Fintype B] [Fintype C] [Fintype D]
[DecidableEq A] [DecidableEq B] [DecidableEq C] [DecidableEq D]
(M : MatrixMap A B 𝕜) (N : MatrixMap C D 𝕜) :
(M ⊗ₖₘ N).dual = M.dual ⊗ₖ... |
592 | leanexplore_declaration | leanexplore:378096 | leanexplore_sqlite | leanexplore_declarations | theorem IsCompletelyPositive.dual (h : M.IsCompletelyPositive) : M.dual.IsCompletelyPositive := by
intro n
have h_dual_pos : (MatrixMap.dual (M ⊗ₖₘ MatrixMap.id (Fin n) 𝕜)).IsPositive := by
exact IsPositive.dual (h n);
-- By definition of complete positivity, we know that $(M ⊗ₖₘ id) dually map = M.dual ⊗ₖₘ ... |
870 | leanexplore_declaration | leanexplore:378097 | leanexplore_sqlite | leanexplore_declarations | /--
The composition of the dual of the inverse of the dual basis isomorphism with the dual basis isomorphism is the evaluation map.
-/
lemma Module.Basis.dualMap_toDualEquiv_symm_comp_toDualEquiv {ι R M : Type*} [Fintype ι] [DecidableEq ι] [CommRing R] [AddCommGroup M] [Module R M] [Module.IsReflexive R M] (b : Module.... |
810 | leanexplore_declaration | leanexplore:378098 | leanexplore_sqlite | leanexplore_declarations | /--
The composition of the inverse of the dual basis isomorphism with the dual of the dual basis isomorphism is the inverse of the evaluation map.
-/
lemma Module.Basis.toDualEquiv_symm_comp_dualMap_toDualEquiv {ι R M : Type*} [Fintype ι] [DecidableEq ι] [CommRing R] [AddCommGroup M] [Module R M] [Module.IsReflexive R ... |
2,138 | leanexplore_declaration | leanexplore:378099 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem dual_dual : M.dual.dual = M := by
rw [dual, dual]
simp only [← LinearMap.dualMap_comp_dualMap]
have h₁ : (Matrix.stdBasis 𝕜 dOut dOut).toDualEquiv.symm.toLinearMap ∘ₗ
((Matrix.stdBasis 𝕜 dOut dOut).toDualEquiv).toLinearMap.dualMap =
(Module.evalEquiv 𝕜 (Matrix dOut dOut 𝕜)).symm.to... |
124 | leanexplore_declaration | leanexplore:378100 | leanexplore_sqlite | leanexplore_declarations | def dual (M : CPTPMap dIn dOut) : CPUMap dOut dIn where
toLinearMap := M.map.dual
unital := M.TP.dual
cp := .dual M.cp |
135 | leanexplore_declaration | leanexplore:378101 | leanexplore_sqlite | leanexplore_declarations | theorem dual_pos (M : CPTPMap dIn dOut) {T : HermitianMat dOut ℂ} (hT : 0 ≤ T) :
0 ≤ M.dual T := by
exact M.dual.pos_Hermitian hT |
432 | leanexplore_declaration | leanexplore:378102 | leanexplore_sqlite | leanexplore_declarations | /-- The dual of a CPTP map preserves POVMs. Stated here just for two-element POVMs, that is, an
operator `T` between 0 and 1. -/
theorem dual.PTP_POVM (M : CPTPMap dIn dOut) {T : HermitianMat dOut ℂ} (hT : 0 ≤ T ∧ T ≤ 1) :
(0 ≤ M.dual T ∧ M.dual T ≤ 1) := by
rcases hT with ⟨hT₁, hT₂⟩
have hT_psd := HermitianMat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.