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 |
|---|---|---|---|---|---|
291 | leanexplore_declaration | leanexplore:378204 | leanexplore_sqlite | leanexplore_declarations | /-- `MatrixMap.submatrix` is completely positive -/
theorem IsCompletelyPositive.submatrix (f : B → A) : (MatrixMap.submatrix R f).IsCompletelyPositive := by
convert conj_isCompletelyPositive (Matrix.submatrix (α := R) 1 f _root_.id : Matrix B A R)
ext1 m
simp [m.submatrix_eq_mul_mul] |
327 | leanexplore_declaration | leanexplore:378205 | leanexplore_sqlite | leanexplore_declarations | /-- The channel X ↦ ∑ k : κ, (M k) * X * (M k)ᴴ formed by Kraus operators M : κ → Matrix B A R
is completely positive -/
theorem of_kraus_isCompletelyPositive (M : κ → Matrix B A R) :
(of_kraus M M).IsCompletelyPositive := by
rw [of_kraus]
exact IsCompletelyPositive.finset_sum (fun i ↦ conj_isCompletelyPositive... |
877 | leanexplore_declaration | leanexplore:378206 | leanexplore_sqlite | leanexplore_declarations | /--
The Choi matrix of a map in symmetric Kraus form is a sum of rank-1 projectors.
-/
theorem choi_of_kraus_R [DecidableEq A] (K : κ → Matrix B A 𝕜) :
(of_kraus K K).choi_matrix = ∑ k, Matrix.vecMulVec (fun (x : B × A) => K k x.1 x.2) (fun (x : B × A) => star (K k x.1 x.2)) := by
unfold of_kraus choi_matrix
e... |
912 | leanexplore_declaration | leanexplore:378207 | leanexplore_sqlite | leanexplore_declarations | theorem choi_eq_kron_id_apply_choi_id (M : MatrixMap A B R) :
M.choi_matrix = (M ⊗ₖₘ MatrixMap.id A R) ((MatrixMap.id A R).choi_matrix) := by
ext ⟨j₁, a₁⟩ ⟨j₂, a₂⟩ : 2
rw [ MatrixMap.kron_def ]
simp only [choi_matrix, Matrix.single, LinearMap.id_coe, id_eq, Matrix.of_apply, mul_ite, mul_one,
mul_zero]
s... |
1,012 | leanexplore_declaration | leanexplore:378208 | leanexplore_sqlite | leanexplore_declarations | theorem choi_id_is_PSD {A R : Type*} [Fintype A] [DecidableEq A] [RCLike R] :
(MatrixMap.id A R).choi_matrix.PosSemidef := by
-- Let $v$ be the vector with $v_{(a,b)} = \delta_{ab}$.
set v : A × A → R := fun p => if p.1 = p.2 then 1 else 0;
-- By definition of $C$, we know that $C = v v^*$.
have hC : (Matri... |
311 | leanexplore_declaration | leanexplore:378209 | leanexplore_sqlite | leanexplore_declarations | theorem is_CP_implies_choi_PSD {A B R : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] [RCLike R] (M : MatrixMap A B R) (hCP : M.IsCompletelyPositive) :
M.choi_matrix.PosSemidef := by
rw [choi_eq_kron_id_apply_choi_id]
exact MatrixMap.IsCompletelyPositive.of_Fintype hCP A choi_id_is_PSD |
329 | leanexplore_declaration | leanexplore:378210 | leanexplore_sqlite | leanexplore_declarations | theorem IsCompletelyPositive.exists_kraus (Φ : MatrixMap A B R) (hCP : Φ.IsCompletelyPositive) :
∃ (M : (B × A) → Matrix B A R), Φ = of_kraus M M := by
rw [choi_PSD_iff_CP_map] at hCP
convert exists_kraus_of_choi_PSD Φ.choi_matrix hCP using 1;
funext
rw [eq_iff_iff, iff_comm]
exact MatrixMap.choi_matrix_i... |
1,911 | leanexplore_declaration | leanexplore:378211 | leanexplore_sqlite | leanexplore_declarations | /--
The Kronecker product of two Kraus maps is the Kraus map of the Kronecker products of the operators.
-/
theorem kron_of_kraus {A B C D R : Type*} [Fintype A] [Fintype B] [Fintype C] [Fintype D]
[DecidableEq A] [DecidableEq C] [CommSemiring R] [StarRing R] [SMulCommClass R R R]
{κ ι : Type*} [Fintype κ] [Fin... |
439 | leanexplore_declaration | leanexplore:378212 | leanexplore_sqlite | leanexplore_declarations | /-- The Kronecker product of IsCompletelyPositive maps is also completely positive. -/
theorem kron {D : Type*} [DecidableEq C] [Fintype D] {M₁ : MatrixMap A B R} {M₂ : MatrixMap C D R}
(h₁ : M₁.IsCompletelyPositive) (h₂ : M₂.IsCompletelyPositive) : IsCompletelyPositive (M₁ ⊗ₖₘ M₂) := by
obtain ⟨K₁, rfl⟩ := exist... |
251 | leanexplore_declaration | leanexplore:378213 | leanexplore_sqlite | leanexplore_declarations | /-- The `MatrixMap.piProd` product of IsCompletelyPositive maps is also completely positive. -/
theorem piProd {Λi : ∀ i, MatrixMap (dI i) (dO i) R} (h₁ : ∀ i, (Λi i).IsCompletelyPositive) :
IsCompletelyPositive (MatrixMap.piProd Λi) := by
sorry |
233 | leanexplore_declaration | leanexplore:378214 | leanexplore_sqlite | leanexplore_declarations | /--
A channel Λ₁ `Emulates` another channel Λ₂ if there are D and E such that D∘Λ₁∘E = Λ₂.
-/
def Emulates (Λ₁ : CPTPMap d₁ d₂) (Λ₂ : CPTPMap d₃ d₄) : Prop :=
∃ (E : CPTPMap d₃ d₁) (D : CPTPMap d₂ d₄), D.compose (Λ₁.compose E) = Λ₂ |
243 | leanexplore_declaration | leanexplore:378215 | leanexplore_sqlite | leanexplore_declarations | /--
A channel A `εApproximates` channel B of the same dimensions if the for every state ρ, the fidelity F(A(ρ), B(ρ)) is at least 1-ε.
-/
def εApproximates (A B : CPTPMap d₁ d₂) (ε : ℝ) : Prop :=
∀ (ρ : MState d₁), (A ρ).fidelity (B ρ) ≥ 1-ε |
436 | leanexplore_declaration | leanexplore:378216 | leanexplore_sqlite | leanexplore_declarations | /--
A channel A `AchievesRate` R:ℝ if for every ε>0, some n copies of A emulates a channel B such that log2(dimout(B))/n ≥ R, and that B εApproximates the identity channel.
-/
def AchievesRate (A : CPTPMap d₁ d₂) (R : ℝ) : Prop :=
∀ ε : ℝ, ε > 0 →
∃ n > 0, ∃ (dimB : ℕ) (B : CPTPMap (Fin dimB) (Fin dimB)),
(... |
96 | leanexplore_declaration | leanexplore:378217 | leanexplore_sqlite | leanexplore_declarations | noncomputable def quantumCapacity (A : CPTPMap d₁ d₂) : ℝ :=
sSup { R : ℝ | AchievesRate A R } |
149 | leanexplore_declaration | leanexplore:378218 | leanexplore_sqlite | leanexplore_declarations | /-- Every quantum channel emulates itself. -/
@[refl]
theorem emulates_self (Λ : CPTPMap d₁ d₂) : Λ.Emulates Λ :=
⟨CPTPMap.id, CPTPMap.id, by simp⟩ |
396 | leanexplore_declaration | leanexplore:378219 | leanexplore_sqlite | leanexplore_declarations | /-- If a quantum channel A emulates B, and B emulates C, then A emulates C. -/
@[trans]
theorem emulates_trans (Λ₁ : CPTPMap d₁ d₂) (Λ₂ : CPTPMap d₃ d₄) (Λ₃ : CPTPMap d₅ d₆)
(h₁₂ : Λ₁.Emulates Λ₂) (h₂₃ : Λ₂.Emulates Λ₃) : Λ₁.Emulates Λ₃ := by
obtain ⟨E₁, D₁, hED₁⟩ := h₁₂
obtain ⟨E₂, D₂, hED₂⟩ := h₂₃
exact ⟨E₁.c... |
236 | leanexplore_declaration | leanexplore:378220 | leanexplore_sqlite | leanexplore_declarations | /-- Every quantum channel perfectly approximates itself, that is, `εApproximates` with `ε = 0`. -/
theorem εApproximates_self (Λ : CPTPMap d₁ d₂) : Λ.εApproximates Λ 0 :=
fun ρ ↦ ((Λ ρ).fidelity_self_eq_one.trans (sub_zero 1).symm).ge |
286 | leanexplore_declaration | leanexplore:378221 | leanexplore_sqlite | leanexplore_declarations | /-- If a quantum channel A approximates B with ε₀, it also approximates B with all larger ε₁. -/
theorem εApproximates_monotone {A B : CPTPMap d₁ d₂} {ε₀ : ℝ} (h : A.εApproximates B ε₀)
{ε₁ : ℝ} (h₂ : ε₀ ≤ ε₁) : A.εApproximates B ε₁ :=
fun ρ ↦ (tsub_le_tsub_left h₂ 1).trans (h ρ) |
550 | leanexplore_declaration | leanexplore:378222 | leanexplore_sqlite | leanexplore_declarations | /-- Every quantum channel achieves a rate of zero. -/
theorem achievesRate_0 (Λ : CPTPMap d₁ d₂) : Λ.AchievesRate 0 := by
intro ε hε
use 1, zero_lt_one, 1, default
constructor
· have : Nonempty d₁ := by sorry--having a CPTPMap should be enough to conclude in- and out-spaces are nonempty
have : Nonempty d₂ :... |
1,075 | leanexplore_declaration | leanexplore:378223 | leanexplore_sqlite | leanexplore_declarations | /-- The identity channel on D dimensional space achieves a rate of log2(D). -/
theorem id_achievesRate_log_dim : (id (dIn := d₁)).AchievesRate (Real.logb 2 (Fintype.card d₁)) := by
intro ε hε
use 1, zero_lt_one, Fintype.card d₁, id
constructor
· --they are equivalent up to permutation
-- TODO: Instead this ... |
238 | leanexplore_declaration | leanexplore:378224 | leanexplore_sqlite | leanexplore_declarations | /-- A channel cannot achieve a rate greater than log2(D), where D is the input dimension. -/
theorem not_achievesRate_gt_log_dim_in (Λ : CPTPMap d₁ d₂) {R : ℝ} (hR : Real.logb 2 (Fintype.card d₁) < R) :
¬Λ.AchievesRate R := by
sorry |
1,724 | leanexplore_declaration | leanexplore:378225 | leanexplore_sqlite | leanexplore_declarations | /-- A channel cannot achieve a rate greater than log2(D), where D is the output dimension. -/
theorem not_achievesRate_gt_log_dim_out (Λ : CPTPMap d₁ d₂) {R : ℝ} (hR : Real.logb 2 (Fintype.card d₂) < R): ¬Λ.AchievesRate R := by
intro h;
-- We show that the identity channel on the output space `d₂` emulates `Λ`. Sin... |
257 | leanexplore_declaration | leanexplore:378226 | leanexplore_sqlite | leanexplore_declarations | /-- The achievable rates are a bounded set. -/
theorem bddAbove_achievesRate (Λ : CPTPMap d₁ d₂) : BddAbove {R | Λ.AchievesRate R} := by
use Real.logb 2 (Fintype.card d₁)
intro R h
contrapose h
exact not_achievesRate_gt_log_dim_in Λ (lt_of_not_ge h) |
182 | leanexplore_declaration | leanexplore:378227 | leanexplore_sqlite | leanexplore_declarations | /-- Quantum channel capacity is nonnegative. -/
theorem zero_le_quantumCapacity (Λ : CPTPMap d₁ d₂) : 0 ≤ Λ.quantumCapacity :=
le_csSup (bddAbove_achievesRate Λ) (achievesRate_0 Λ) |
457 | leanexplore_declaration | leanexplore:378228 | leanexplore_sqlite | leanexplore_declarations | /-- Quantum channel capacity is at most log2(D), where D is the input dimension. -/
theorem quantumCapacity_ge_log_dim_in (Λ : CPTPMap d₁ d₂) : Λ.quantumCapacity ≤ Real.logb 2 (Fintype.card d₁) :=
Real.sSup_le (by
intro R h
contrapose h
exact not_achievesRate_gt_log_dim_in Λ (lt_of_not_ge h))
(by
by... |
553 | leanexplore_declaration | leanexplore:378229 | leanexplore_sqlite | leanexplore_declarations | /-- The LSD (Lloyd-Shor-Devetak) theorem: the quantum capacity is at least as large the single-copy coherent
information. The "coherent information" is used in literature to refer to both a function of state and
a channel (`coherentInfo`), or a function of just a channel. In the latter case, the state is implicitly
max... |
287 | leanexplore_declaration | leanexplore:378230 | leanexplore_sqlite | leanexplore_declarations | /-- The quantum capacity is the limit of the coherent information of n-copy uses of the channel. -/
theorem quantumCapacity_eq_piProd_coherentInfo (Λ : CPTPMap d₁ d₂) : Λ.quantumCapacity =
sSup { r : ℝ | ∃ n ρ, r = coherentInfo ρ (CPTPMap.piProd (fun (_ : Fin n) ↦ Λ))} := by
sorry |
748 | leanexplore_declaration | leanexplore:378231 | leanexplore_sqlite | leanexplore_declarations | @[reducible]
def DegradablePreorder (dIn : Type*) [Fintype dIn] [DecidableEq dIn] : Preorder
(Σ dOut : (Σ t, Fintype t × DecidableEq t), let _ := dOut.snd.1; CPTPMap dIn dOut.fst) where
le Λ₁ Λ₂ :=
let _ := Λ₁.fst.snd.1;
let _ := Λ₂.fst.snd.1;
let _ := Λ₂.fst.snd.2;
Λ₂.snd.IsDegradableTo Λ₁.snd;
... |
178 | leanexplore_declaration | leanexplore:378232 | leanexplore_sqlite | leanexplore_declarations | /-- The fidelity of two quantum states. This is the quantum version of the Bhattacharyya coefficient. -/
def fidelity (ρ σ : MState d) : ℝ :=
(σ.M.conj ρ.M.sqrt.mat).sqrt.trace |
116 | leanexplore_declaration | leanexplore:378233 | leanexplore_sqlite | leanexplore_declarations | theorem fidelity_ge_zero : 0 ≤ fidelity ρ σ := by
apply HermitianMat.trace_nonneg
apply HermitianMat.sqrt_nonneg |
93 | leanexplore_declaration | leanexplore:378234 | leanexplore_sqlite | leanexplore_declarations | theorem fidelity_le_one : fidelity ρ σ ≤ 1 :=
sorry --submultiplicativity of trace and sqrt |
162 | leanexplore_declaration | leanexplore:378235 | leanexplore_sqlite | leanexplore_declarations | /-- The fidelity, as a `Prob` probability with value between 0 and 1. -/
def fidelity_prob : Prob :=
⟨fidelity ρ σ, ⟨fidelity_ge_zero ρ σ, fidelity_le_one ρ σ⟩⟩ |
588 | leanexplore_declaration | leanexplore:378236 | leanexplore_sqlite | leanexplore_declarations | /-- A state has perfect fidelity with itself. -/
theorem fidelity_self_eq_one : fidelity ρ ρ = 1 := by
simp only [fidelity, HermitianMat.sqrt_eq_cfc_rpow_half]
conv =>
enter [1, 1, 1, 2]
rw [← HermitianMat.cfc_id ρ.M]
rw [HermitianMat.cfc_conj, ← HermitianMat.cfc_comp_apply]
convert ρ.tr using 2
conve... |
182 | leanexplore_declaration | leanexplore:378237 | leanexplore_sqlite | leanexplore_declarations | /-- The fidelity is 1 if and only if the two states are the same. -/
theorem fidelity_eq_one_iff_self : fidelity ρ σ = 1 ↔ ρ = σ :=
⟨by sorry,
fun h ↦ h ▸ fidelity_self_eq_one ρ⟩ |
126 | leanexplore_declaration | leanexplore:378238 | leanexplore_sqlite | leanexplore_declarations | /-- The fidelity is a symmetric quantity. -/
theorem fidelity_symm : fidelity ρ σ = fidelity σ ρ :=
sorry --break into sqrts |
195 | leanexplore_declaration | leanexplore:378239 | leanexplore_sqlite | leanexplore_declarations | /-- The fidelity cannot decrease under the application of a channel. -/
theorem fidelity_channel_nondecreasing [DecidableEq d₂] (Λ : CPTPMap d d₂) : fidelity (Λ ρ) (Λ σ) ≥ fidelity ρ σ :=
sorry |
172 | leanexplore_declaration | leanexplore:378240 | leanexplore_sqlite | leanexplore_declarations | /--The trace distance between two quantum states: half the trace norm of the difference (ρ - σ). -/
def TrDistance (ρ σ : MState d) : ℝ :=
(1/2:ℝ) * (ρ.m - σ.m).traceNorm |
93 | leanexplore_declaration | leanexplore:378241 | leanexplore_sqlite | leanexplore_declarations | theorem ge_zero : 0 ≤ TrDistance ρ σ := by
rw [TrDistance]
simp [Matrix.traceNorm_nonneg] |
325 | leanexplore_declaration | leanexplore:378242 | leanexplore_sqlite | leanexplore_declarations | theorem le_one : TrDistance ρ σ ≤ 1 :=
calc TrDistance ρ σ
_ = (1/2:ℝ) * (ρ.m - σ.m).traceNorm := by rfl
_ ≤ (1/2:ℝ) * (ρ.m.traceNorm + σ.m.traceNorm) := by
linarith [Matrix.traceNorm_triangleIneq' ρ.m σ.m]
_ = (1/2:ℝ) * (1 + 1) := by
rw [ρ.traceNorm_eq_1, σ.traceNorm_eq_1]
_ = 1 := by nor... |
143 | leanexplore_declaration | leanexplore:378243 | leanexplore_sqlite | leanexplore_declarations | /-- The trace distance, as a `Prob` probability with value between 0 and 1. -/
def prob : Prob :=
⟨TrDistance ρ σ, ⟨ge_zero ρ σ, le_one ρ σ⟩⟩ |
171 | leanexplore_declaration | leanexplore:378244 | leanexplore_sqlite | leanexplore_declarations | /-- The trace distance is a symmetric quantity. -/
theorem symm : TrDistance ρ σ = TrDistance σ ρ := by
dsimp [TrDistance]
rw [← Matrix.traceNorm_eq_neg_self, neg_sub] |
284 | leanexplore_declaration | leanexplore:378245 | leanexplore_sqlite | leanexplore_declarations | /-- The trace distance is equal to half the 1-norm of the eigenvalues of their difference . -/
theorem eq_abs_eigenvalues : TrDistance ρ σ = (1/2:ℝ) *
∑ i, abs ((ρ.Hermitian.sub σ.Hermitian).eigenvalues i) := by
rw [TrDistance, Matrix.traceNorm_Hermitian_eq_sum_abs_eigenvalues] |
336 | leanexplore_declaration | leanexplore:378246 | leanexplore_sqlite | leanexplore_declarations | /-- A mixed-state ensemble is a random variable valued in `MState d`. That is,
a collection of mixed states `var : α → MState d`, each with their own probability weight
described by `distr : ProbDistribution α`. -/
abbrev MEnsemble (d : Type*) (α : Type*) [Fintype d] [DecidableEq d] [Fintype α] := ProbDistribution.Rand... |
309 | leanexplore_declaration | leanexplore:378247 | leanexplore_sqlite | leanexplore_declarations | /-- A pure-state ensemble is a random variable valued in `Ket d`. That is,
a collection of pure states `var : α → Ket d`, each with their own probability weight
described by `distr : ProbDistribution α`. -/
abbrev PEnsemble (d : Type*) (α : Type*) [Fintype d] [Fintype α] := ProbDistribution.RandVar α (Ket d) |
167 | leanexplore_declaration | leanexplore:378248 | leanexplore_sqlite | leanexplore_declarations | /-- Alias for `ProbDistribution.var` for mixed-state ensembles. -/
abbrev MEnsemble.states [Fintype α] : MEnsemble d α → (α → MState d) := ProbDistribution.RandVar.var |
163 | leanexplore_declaration | leanexplore:378249 | leanexplore_sqlite | leanexplore_declarations | /-- Alias for `ProbDistribution.var` for pure-state ensembles. -/
abbrev PEnsemble.states [Fintype α] : PEnsemble d α → (α → Ket d) := ProbDistribution.RandVar.var |
174 | leanexplore_declaration | leanexplore:378250 | leanexplore_sqlite | leanexplore_declarations | /-- A pure-state ensemble is a mixed-state ensemble if all kets are interpreted as mixed states. -/
@[coe] def toMEnsemble : PEnsemble d α → MEnsemble d α := Functor.map pure |
63 | leanexplore_declaration | leanexplore:378251 | leanexplore_sqlite | leanexplore_declarations | instance : Coe (PEnsemble d α) (MEnsemble d α) := ⟨toMEnsemble⟩ |
104 | leanexplore_declaration | leanexplore:378252 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem toMEnsemble_mk : (toMEnsemble ⟨ps, distr⟩ : MEnsemble d α) = ⟨pure ∘ ps, distr⟩ :=
rfl |
430 | leanexplore_declaration | leanexplore:378253 | leanexplore_sqlite | leanexplore_declarations | /-- A mixed-state ensemble comes from a pure-state ensemble if and only if all states are pure. -/
theorem coe_PEnsemble_iff_pure_states (me : MEnsemble d α): (∃ pe : PEnsemble d α, ↑pe = me) ↔ (∃ ψ : α → Ket d, me.states = MState.pure ∘ ψ) := by
constructor
· intro ⟨pe, hpe⟩
use pe.states
ext1 i
subst ... |
281 | leanexplore_declaration | leanexplore:378254 | leanexplore_sqlite | leanexplore_declarations | /-- The resulting mixed state after mixing the states in an ensemble with their
respective probability weights. Note that, generically, a single mixed state has infinitely many
ensembles that mixes into it. -/
def mix (e : MEnsemble d α) : MState d := ProbDistribution.expect_val e |
156 | leanexplore_declaration | leanexplore:378255 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem mix_of (e : MEnsemble d α) : (mix e).m = ∑ i, (e.distr i : ℝ) • (e.states i).m := by
apply AddSubgroup.val_finset_sum -- *laughs in defeq* |
189 | leanexplore_declaration | leanexplore:378256 | leanexplore_sqlite | leanexplore_declarations | /-- Two mixed-state ensembles indexed by `\alpha` and `\beta` are equivalent if `α ≃ β`. -/
def congrMEnsemble (σ : α ≃ β) : MEnsemble d α ≃ MEnsemble d β := ProbDistribution.congrRandVar σ |
188 | leanexplore_declaration | leanexplore:378257 | leanexplore_sqlite | leanexplore_declarations | /-- Two pure-state ensembles indexed by `\alpha` and `\beta` are equivalent if `α ≃ β`. -/
def congrPEnsemble (σ : α ≃ β) : PEnsemble d α ≃ PEnsemble d β := ProbDistribution.congrRandVar σ |
252 | leanexplore_declaration | leanexplore:378258 | leanexplore_sqlite | leanexplore_declarations | /-- Equivalence of mixed-state ensembles leaves the resulting mixed state invariant -/
@[simp]
theorem mix_congrMEnsemble_eq_mix (σ : α ≃ β) (e : MEnsemble d α) : mix (congrMEnsemble σ e) = mix e :=
ProbDistribution.expect_val_congr_eq_expect_val σ e |
414 | leanexplore_declaration | leanexplore:378259 | leanexplore_sqlite | leanexplore_declarations | /-- Equivalence of pure-state ensembles leaves the resulting mixed state invariant -/
@[simp]
theorem mix_congrPEnsemble_eq_mix (σ : α ≃ β) (e : PEnsemble d α) : mix (toMEnsemble (congrPEnsemble σ e)) = mix (↑e : MEnsemble d α) := by
unfold toMEnsemble congrPEnsemble mix
rw [ProbDistribution.map_congr_eq_congr_map ... |
417 | leanexplore_declaration | leanexplore:378260 | leanexplore_sqlite | leanexplore_declarations | /-- The average of a function `f : MState d → T`, where `T` is of `Mixable U T` instance, on a mixed-state ensemble `e`
is the expectation value of `f` acting on the states of `e`, with the corresponding probability weights from `e.distr`. -/
def average {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : Mi... |
435 | leanexplore_declaration | leanexplore:378261 | leanexplore_sqlite | leanexplore_declarations | /-- A version of `average` conveniently specialized for functions `f : MState d → ℝ≥0` returning nonnegative reals.
Notably, the average is also a nonnegative real number. -/
def average_NNReal {d : Type _} [Fintype d] [DecidableEq d] (f : MState d → NNReal) (e : MEnsemble d α) : NNReal :=
⟨average (NNReal.toReal ∘ f... |
415 | leanexplore_declaration | leanexplore:378262 | leanexplore_sqlite | leanexplore_declarations | /-- The average of a function `f : Ket d → T`, where `T` is of `Mixable U T` instance, on a pure-state ensemble `e`
is the expectation value of `f` acting on the states of `e`, with the corresponding probability weights from `e.distr`. -/
def pure_average {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : M... |
423 | leanexplore_declaration | leanexplore:378263 | leanexplore_sqlite | leanexplore_declarations | /-- A version of `average` conveniently specialized for functions `f : Ket d → ℝ≥0` returning nonnegative reals.
Notably, the average is also a nonnegative real number. -/
def pure_average_NNReal {d : Type _} [Fintype d] (f : Ket d → NNReal) (e : PEnsemble d α) : NNReal :=
⟨pure_average (NNReal.toReal ∘ f) e,
Pro... |
454 | leanexplore_declaration | leanexplore:378264 | leanexplore_sqlite | leanexplore_declarations | /-- The average of `f : MState d → T` on a coerced pure-state ensemble `↑e : MEnsemble d α`
is equal to averaging the restricted function over Kets `f ∘ pure : Ket d → T` on `e`. -/
theorem average_of_pure_ensemble {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : Mixable U T]
(f : MState d → T) (e : PEn... |
99 | leanexplore_declaration | leanexplore:378265 | leanexplore_sqlite | leanexplore_declarations | @[simp]
theorem distr_toMEnsemble (e : PEnsemble d α) : (toMEnsemble e).distr = e.distr := by
rfl |
740 | leanexplore_declaration | leanexplore:378266 | leanexplore_sqlite | leanexplore_declarations | theorem mix_pEnsemble_pure_iff_pure {e : PEnsemble d α} :
mix (toMEnsemble e) = MState.pure ψ ↔
∀ i : α, e.distr i ≠ 0 → MState.pure (e.states i) = MState.pure ψ := by
refine ⟨fun h i hi ↦ ?_, fun h ↦ ?_⟩
· apply MState.eq_of_sum_eq_pure ?_ ?_ ?_ e.distr.normalized i (Finset.mem_univ i)
· exact_mod_cast... |
1,253 | leanexplore_declaration | leanexplore:378267 | leanexplore_sqlite | leanexplore_declarations | /-- The average of `f : Ket d → T` on an ensemble that mixes to a pure state `ψ` is `f ψ` -/
theorem mix_pEnsemble_pure_average {e : PEnsemble d α} {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U]
[inst : Mixable U T] (f : Ket d → T) (hf : ∀ ψ φ, Ket.PhaseEquiv.r ψ φ → f ψ = f φ)
(hmix : mix (toMEnsemble ... |
696 | leanexplore_declaration | leanexplore:378268 | leanexplore_sqlite | leanexplore_declarations | theorem sum_prob_mul_eq_one_iff {ι : Type*} [Fintype ι] (p : ι → ℝ) (x : ι → ℝ)
(hp : ∀ i, 0 ≤ p i) (hsum : ∑ i, p i = 1) (hx : ∀ i, x i ≤ 1) :
(∑ i, p i * x i = 1) ↔ ∀ i, p i ≠ 0 → x i = 1 := by
constructor
· intro a i a_1
contrapose! a
have h : ∃ i, p i * x i < p i := by
use i
apply mu... |
1,416 | leanexplore_declaration | leanexplore:378269 | leanexplore_sqlite | leanexplore_declarations | theorem MState.exp_val_pure_eq_one_iff {d : Type*} [Fintype d] [DecidableEq d] (ρ : MState d) (ψ : Ket d) :
ρ.exp_val (pure ψ) = 1 ↔ ρ = pure ψ := by
stop
constructor <;> intro h <;> simp_all +decide [ MState.exp_val ];
· have h_eq : ρ.M = (MState.pure ψ).M := by
have h_eq : (ρ.M - (MState.pure ψ).M).in... |
570 | leanexplore_declaration | leanexplore:378270 | leanexplore_sqlite | leanexplore_declarations | theorem mix_mEnsemble_pure_iff_pure {e : MEnsemble d α} :
mix e = pure ψ ↔ ∀ i : α, e.distr i ≠ 0 → e.states i = MState.pure ψ := by
have h : (mix e).exp_val ↑(MState.pure ψ) = ∑ i, ↑(e.distr i) * (e.states i).exp_val ↑(MState.pure ψ) := by
simp [MState.exp_val, HermitianMat.inner_def, Finset.sum_mul]
rw [←... |
1,339 | leanexplore_declaration | leanexplore:378271 | leanexplore_sqlite | leanexplore_declarations | /-- The average of `f : MState d → T` on an ensemble that mixes to a pure state `ψ` is `f (pure ψ)` -/
theorem mix_mEnsemble_pure_average {e : MEnsemble d α} {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : Mixable U T] (f : MState d → T) (hmix : mix e = pure ψ) :
average f e = f (pure ψ) := by
have h... |
222 | leanexplore_declaration | leanexplore:378272 | leanexplore_sqlite | leanexplore_declarations | /-- The trivial mixed-state ensemble of `ρ` consists of copies of `rho`, with the `i`-th one having
probability 1. -/
def trivial_mEnsemble (ρ : MState d) (i : α) : MEnsemble d α := ⟨fun _ ↦ ρ, ProbDistribution.constant i⟩ |
399 | leanexplore_declaration | leanexplore:378273 | leanexplore_sqlite | leanexplore_declarations | /-- The trivial mixed-state ensemble of `ρ` mixes to `ρ` -/
theorem trivial_mEnsemble_mix (ρ : MState d) : ∀ i : α, mix (trivial_mEnsemble ρ i) = ρ := fun i ↦by
apply MState.ext_m
classical simp only [trivial_mEnsemble, ProbDistribution.constant, mix_of, DFunLike.coe, apply_ite,
Prob.coe_one, Prob.coe_zero, ite... |
430 | leanexplore_declaration | leanexplore:378274 | leanexplore_sqlite | leanexplore_declarations | /-- The average of `f : MState d → T` on a trivial ensemble of `ρ` is `f ρ`-/
theorem trivial_mEnsemble_average {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : Mixable U T] (f : MState d → T) (ρ : MState d):
∀ i : α, average f (trivial_mEnsemble ρ i) = f ρ := fun i ↦ by
simp only [average, Functor.... |
140 | leanexplore_declaration | leanexplore:378275 | leanexplore_sqlite | leanexplore_declarations | instance MEnsemble.instInhabited [Nonempty d] [Inhabited α] : Inhabited (MEnsemble d α) where
default := trivial_mEnsemble default default |
216 | leanexplore_declaration | leanexplore:378276 | leanexplore_sqlite | leanexplore_declarations | /-- The trivial pure-state ensemble of `ψ` consists of copies of `ψ`, with the `i`-th one having
probability 1. -/
def trivial_pEnsemble (ψ : Ket d) (i : α) : PEnsemble d α := ⟨fun _ ↦ ψ, ProbDistribution.constant i⟩ |
465 | leanexplore_declaration | leanexplore:378277 | leanexplore_sqlite | leanexplore_declarations | /-- The trivial pure-state ensemble of `ψ` mixes to `ψ` -/
theorem trivial_pEnsemble_mix : ∀ i : α, mix (toMEnsemble (trivial_pEnsemble ψ i)) = MState.pure ψ := fun i ↦ by
apply MState.ext_m
classical simp only [trivial_pEnsemble, ProbDistribution.constant, toMEnsemble_mk, mix_of, DFunLike.coe,
apply_ite, Prob.... |
420 | leanexplore_declaration | leanexplore:378278 | leanexplore_sqlite | leanexplore_declarations | /-- The average of `f : Ket d → T` on a trivial ensemble of `ψ` is `f ψ`-/
theorem trivial_pEnsemble_average {T : Type _} {U : Type*} [AddCommGroup U] [Module ℝ U] [inst : Mixable U T] (f : Ket d → T) :
∀ i : α, pure_average f (trivial_pEnsemble ψ i) = f ψ := fun i ↦ by
simp only [pure_average, Functor.map, ProbD... |
140 | leanexplore_declaration | leanexplore:378279 | leanexplore_sqlite | leanexplore_declarations | instance PEnsemble.instInhabited [Nonempty d] [Inhabited α] : Inhabited (PEnsemble d α) where
default := trivial_pEnsemble default default |
606 | leanexplore_declaration | leanexplore:378280 | leanexplore_sqlite | leanexplore_declarations | /-- The spectral pure-state ensemble of `ρ`. The states are its eigenvectors, and the probabilities, eigenvalues. -/
def spectral_ensemble (ρ : MState d) : PEnsemble d d where
var i :=
{ vec := ρ.Hermitian.eigenvectorBasis i
normalized' := by
rw [←one_pow 2, ←ρ.Hermitian.eigenvectorBasis.orthonormal... |
725 | leanexplore_declaration | leanexplore:378281 | leanexplore_sqlite | leanexplore_declarations | theorem spectral_decomposition_sum {d 𝕜 : Type*} [Fintype d] [DecidableEq d] [RCLike 𝕜]
{A : Matrix d d 𝕜} (hA : A.IsHermitian) :
A = ∑ i, (hA.eigenvalues i) • (Matrix.vecMulVec (hA.eigenvectorBasis i) (star (hA.eigenvectorBasis i))) := by
nth_rw 1 [hA.spectral_theorem]
ext
simp only [Matrix.sum_apply]... |
310 | leanexplore_declaration | leanexplore:378282 | leanexplore_sqlite | leanexplore_declarations | /-- The spectral pure-state ensemble of `ρ` mixes to `ρ` -/
theorem spectral_ensemble_mix {ρ : MState d} : mix (↑(spectral_ensemble ρ) : MEnsemble d d) = ρ := by
ext i j
convert rfl;
convert rfl;
apply MState.ext_m;
convert Ensemble.mix_of _
convert (spectral_decomposition_sum ρ.Hermitian) using 1 |
798 | leanexplore_declaration | leanexplore:378283 | leanexplore_sqlite | leanexplore_declarations | /-- Convex roof extension of a function `g : KetUpToPhase d → ℝ≥0`, defined as the infimum of all pure-state
ensembles of a given `ρ` of the average of `g` in that ensemble.
This is valued in the extended nonnegative real numbers `ℝ≥0∞` to have good properties of the infimum, which
come from the fact that `ℝ≥0∞` is a ... |
754 | leanexplore_declaration | leanexplore:378284 | leanexplore_sqlite | leanexplore_declarations | /-- Mixed convex roof extension of a function `f : MState d → ℝ≥0`, defined as the infimum of all mixed-state
ensembles of a given `ρ` of the average of `f` on that ensemble.
This is valued in the extended nonnegative real numbers `ℝ≥0∞` to have good properties of the infimum, which
come from the fact that `ℝ≥0∞` is a... |
513 | leanexplore_declaration | leanexplore:378285 | leanexplore_sqlite | leanexplore_declarations | /-- The convex roof extension `convex_roof_ENNReal` is never ∞. -/
theorem convex_roof_ne_top : ∀ ρ, convex_roof_ENNReal g ρ ≠ ∞ := fun ρ => by
simp only [convex_roof_ENNReal, ne_eq, iInf_eq_top, coe_ne_top, imp_false, not_forall]
use ⟨Fintype.card d, Fintype.card_pos⟩
have ed : d ≃ Fin ↑(⟨Fintype.card d, Fintype... |
332 | leanexplore_declaration | leanexplore:378286 | leanexplore_sqlite | leanexplore_declarations | /-- The convex roof extension `mixed_convex_roof_ENNReal` is never ∞. -/
theorem mixed_convex_roof_ne_top : ∀ ρ, mixed_convex_roof_ENNReal f ρ ≠ ∞ := fun ρ => by
simp only [mixed_convex_roof_ENNReal, ne_eq, iInf_eq_top, coe_ne_top, imp_false, not_forall]
use 1, trivial_mEnsemble ρ 0
push Not
exact trivial_mEnse... |
455 | leanexplore_declaration | leanexplore:378287 | leanexplore_sqlite | leanexplore_declarations | /-- Convex roof extension of a function `g : KetUpToPhase d → ℝ≥0`, defined as the infimum of all pure-state
ensembles of a given `ρ` of the average of `g` in that ensemble.
This is valued in the nonnegative real numbers `ℝ≥0` by applying `ENNReal.toNNReal` to `convex_roof_ENNReal`. Hence,
it should be used in proofs ... |
486 | leanexplore_declaration | leanexplore:378288 | leanexplore_sqlite | leanexplore_declarations | /-- Mixed convex roof extension of a function `f : MState d → ℝ≥0`, defined as the infimum of all mixed-state
ensembles of a given `ρ` of the average of `f` on that ensemble.
This is valued in the nonnegative real numbers `ℝ≥0` by applying `ENNReal.toNNReal` to `mixed_convex_roof_ENNReal`. Hence,
it should be used in ... |
249 | leanexplore_declaration | leanexplore:378289 | leanexplore_sqlite | leanexplore_declarations | /-- Auxiliary function. Convex roof of a function `f : MState d → ℝ≥0` defined over mixed states by
restricting `f` to pure states, via `pureQ : KetUpToPhase d → MState d`. -/
def convex_roof_of_MState_fun : MState d → ℝ≥0 := convex_roof (f ∘ pureQ) |
370 | leanexplore_declaration | leanexplore:378290 | leanexplore_sqlite | leanexplore_declarations | theorem le_mixed_convex_roof (ρ : MState d) :
(∀ n > 0, ∀ e : MEnsemble d (Fin n), mix e = ρ → c ≤ average_NNReal f e) → (c ≤ mixed_convex_roof f ρ) := fun h => by
unfold mixed_convex_roof
rw [WithTop.le_untop_iff]
apply le_iInf; intro ⟨n, hnpos⟩; apply le_iInf; intro e; apply le_iInf; intro hmix
rw [some_eq_... |
391 | leanexplore_declaration | leanexplore:378291 | leanexplore_sqlite | leanexplore_declarations | theorem le_convex_roof (ρ : MState d) :
(∀ n > 0, ∀ e : PEnsemble d (Fin n), mix (toMEnsemble e) = ρ → c ≤ pure_average_NNReal (g ∘ KetUpToPhase.mk) e) → (c ≤ convex_roof g ρ) := fun h => by
unfold convex_roof
rw [WithTop.le_untop_iff]
apply le_iInf; intro ⟨n, hnpos⟩; apply le_iInf; intro e; apply le_iInf; intr... |
407 | leanexplore_declaration | leanexplore:378292 | leanexplore_sqlite | leanexplore_declarations | theorem convex_roof_le (ρ : MState d):
(∃ n > 0, ∃ e : PEnsemble d (Fin n), mix (toMEnsemble e) = ρ ∧ pure_average_NNReal (g ∘ KetUpToPhase.mk) e ≤ c) → (convex_roof g ρ ≤ c) := fun h => by
obtain ⟨n, hnpos, e, hmix, h⟩ := h
unfold convex_roof
rw [WithTop.untop_le_iff]
apply iInf_le_of_le ⟨n, hnpos⟩; apply iInf... |
386 | leanexplore_declaration | leanexplore:378293 | leanexplore_sqlite | leanexplore_declarations | theorem mixed_convex_roof_le (ρ : MState d):
(∃ n > 0, ∃ e : MEnsemble d (Fin n), mix e = ρ ∧ average_NNReal f e ≤ c) → (mixed_convex_roof f ρ ≤ c) := fun h => by
obtain ⟨n, hnpos, e, hmix, h⟩ := h
unfold mixed_convex_roof
rw [WithTop.untop_le_iff]
apply iInf_le_of_le ⟨n, hnpos⟩; apply iInf_le_of_le e; apply iI... |
502 | leanexplore_declaration | leanexplore:378294 | leanexplore_sqlite | leanexplore_declarations | /-- The mixed convex roof extension of `f` is smaller than or equal to its convex roof extension, since
the former minimizes over a larger set of ensembles. -/
theorem mixed_convex_roof_le_convex_roof : mixed_convex_roof f ≤ convex_roof_of_MState_fun f := by
intro ρ
apply le_convex_roof (f ∘ pureQ) ρ
intro n hnpo... |
1,038 | leanexplore_declaration | leanexplore:378295 | leanexplore_sqlite | leanexplore_declarations | /-- The convex roof extension of `g : KetUpToPhase d → ℝ≥0` applied to a pure state `ψ` is `g (KetUpToPhase.mk ψ)`. -/
theorem convex_roof_of_pure (ψ : Ket d) : convex_roof g (pure ψ) = g (KetUpToPhase.mk ψ) := by
rw [le_antisymm_iff]
constructor
· apply convex_roof_le
use 1; simp only [gt_iff_lt, zero_lt_one... |
821 | leanexplore_declaration | leanexplore:378296 | leanexplore_sqlite | leanexplore_declarations | /-- The mixed convex roof extension of `f : MState d → ℝ≥0` applied to a pure state `ψ` is `f (pure ψ)`. -/
theorem mixed_convex_roof_of_pure (ψ : Ket d) : mixed_convex_roof f (pure ψ) = f (pure ψ) := by
rw [le_antisymm_iff]
constructor
· apply mixed_convex_roof_le
use 1; simp only [gt_iff_lt, zero_lt_one, tr... |
670 | leanexplore_declaration | leanexplore:378297 | leanexplore_sqlite | leanexplore_declarations | /-- Entanglement of Formation of bipartite systems. It is the convex roof extension of the
von Neumann entropy of one of the subsystems (here chosen to be the left one, but see `Entropy.Sᵥₙ_of_partial_eq`).
The function `Sᵥₙ ∘ traceRight ∘ pure` is phase-invariant because `pure` maps phase-equivalent kets to the
same ... |
1,076 | leanexplore_declaration | leanexplore:378298 | leanexplore_sqlite | leanexplore_declarations | theorem traceRight_pure_MES (d : Type*) [Fintype d] [DecidableEq d] [Nonempty d] :
(MState.pure (Ket.MES d)).traceRight = MState.uniform := by
-- By definition of partial trace, we sum over the second system.
have h_partial_trace : ∀ (i j : d), ∑ k : d, (Ket.MES d).vec (i, k) * (star (Ket.MES d).vec (j, k)) = (... |
915 | leanexplore_declaration | leanexplore:378299 | leanexplore_sqlite | leanexplore_declarations | theorem Sᵥₙ_eq_trace_cfc {d : Type*} [Fintype d] [DecidableEq d] (ρ : MState d) :
Sᵥₙ ρ = (HermitianMat.cfc ρ.M Real.negMulLog).trace := by
-- By definition of von Neumann entropy, we have Sᵥₙ ρ = Finset.sum Finset.univ (fun x ↦ Real.negMulLog (ρ.M.H.eigenvalues x)).
have h_def : Sᵥₙ ρ = Finset.sum Finset.univ ... |
724 | leanexplore_declaration | leanexplore:378300 | leanexplore_sqlite | leanexplore_declarations | theorem Sᵥₙ_ofClassical {d : Type*} [Fintype d] [DecidableEq d] (dist : ProbDistribution d) :
Sᵥₙ (MState.ofClassical dist) = Hₛ dist := by
-- Let's unfold the definition of `Sᵥₙ` using `Sᵥₙ_eq_trace_cfc`.
have h_def : Sᵥₙ (MState.ofClassical dist) = (HermitianMat.cfc (MState.ofClassical dist).M Real.negMulLog)... |
625 | leanexplore_declaration | leanexplore:378301 | leanexplore_sqlite | leanexplore_declarations | /-- The entanglement of formation of the maximally entangled state with on-site dimension 𝕕 is log(𝕕). -/
theorem EoF_of_MES : EoF (pure <| Ket.MES d) = Real.log (Finset.card Finset.univ (α := d)) := by
simp only [EoF, convex_roof_of_pure, Finset.card_univ]
simp only [KetUpToPhase.lift_mk]
-- The von Neumann en... |
256 | leanexplore_declaration | leanexplore:378302 | leanexplore_sqlite | leanexplore_declarations | /-- The weighted norm \|X\|_{p, σ} defined in the paper. -/
noncomputable def weighted_norm (p : ℝ) (σ : MState d) (X : Matrix d d ℂ) : ℝ :=
let σ_pow : HermitianMat d ℂ := σ.M.cfc (fun x => x ^ (1 / (2 * p)))
schattenNorm (σ_pow.mat * X * σ_pow.mat) p |
439 | leanexplore_declaration | leanexplore:378303 | leanexplore_sqlite | leanexplore_declarations | /-- The spectral norm (operator norm) of a matrix. -/
noncomputable def spectralNorm_mat (A : Matrix d d ℂ) : ℝ :=
if h : Finset.univ.Nonempty then
let A_dag_A : HermitianMat d ℂ := ⟨A.conjTranspose * A, by
have h := Matrix.isHermitian_mul_conjTranspose_self A.conjTranspose
rwa [Matrix.conjTranspose_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.