Exact Lean source
Nonadditivity.QuantumCodingPackingAverages
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
2 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
6 project constants, including generated, internal and private declarations.
6 declarations
Nonadditivity.QuantumCoding.average_cross_trace_leNonadditivity.QuantumCoding.average_cross_trace_le._simp_1_1internal/detail/privateNonadditivity.QuantumCoding.compressed_trace_leNonadditivity.QuantumCoding.compression_cap_identityNonadditivity.QuantumCoding.tensorState_mixture_matrixNonadditivity.QuantumCoding.weighted_compressed_trace
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.QuantumCodingTypicalProjectors7import Nonadditivity.StateEnsembles8import Nonadditivity.AdjointPurity910/-! # The packing cross term for an actual finite quantum ensemble1112The average tensor state is proved to be the mixture of the actual word13states. A spectral cap on its global compression and a trace bound on each14conditional projector give the required average interference bound.15-/1617noncomputable section18namespace Nonadditivity.QuantumCoding1920open Entropy AdjointPurity21open scoped BigOperators ComplexOrder Matrix2223variable {ι α : Type*} [Fintype ι] [DecidableEq ι] [Fintype α]2425/-- Independent sampling of input letters gives the genuine tensor power26of the single-letter average, as an exact matrix identity. -/27theorem tensorState_mixture_matrix (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)28(hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι) (n : ℕ) :29(tensorState (DensityMatrix.mixture p hp hs ρ) n).matrix =30∑ x : Fin n → α, (tensorWeights p n x : ℂ) •31(tensorFamilyState (fun j => ρ (x j))).matrix := by32ext u v33change (∏ j, (∑ a, (p a : ℂ) • (ρ a).matrix) (u j) (v j)) = _34simp only [Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul]35rw [Fintype.prod_sum]36apply Finset.sum_congr rfl37intro x _38change (∏ j, (p (x j) : ℂ) * (ρ (x j)).matrix (u j) (v j)) =39(tensorWeights p n x : ℂ) * ∏ j, (ρ (x j)).matrix (u j) (v j)40rw [Finset.prod_mul_distrib]41simp only [tensorWeights, Complex.ofReal_prod]4243/-- Lift a spectral cap relative to a projection to a cap by the identity. -/44theorem compression_cap_identity (P R : Matrix ι ι ℂ) {a : ℝ} (ha : 0 ≤ a)45(hP : (1 - P).PosSemidef) (hcap : ((a : ℂ) • P - P * R * P).PosSemidef) :46((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P).PosSemidef := by47have h := (hP.smul (show (0 : ℂ) ≤ (a : ℂ) by exact_mod_cast ha)).add hcap48convert h using 149simp only [smul_sub]50abel5152/-- Any positive test has interference at most its trace times the cap. -/53theorem compressed_trace_le (P R Q : Matrix ι ι ℂ) {a : ℝ}54(hQ : Q.PosSemidef)55(hcap : ((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P).PosSemidef) :56(Q * P * R * P).trace.re ≤ a * Q.trace.re := by57have h : 0 ≤ (Q * ((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P)).trace.re :=58(RCLike.nonneg_iff.mp (trace_mul_nonneg hQ hcap)).159simp only [Matrix.mul_sub, Matrix.mul_smul, Matrix.mul_one, Matrix.trace_sub,60Matrix.trace_smul, smul_eq_mul, Complex.sub_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] at h61simpa only [Matrix.mul_assoc] using (sub_nonneg.mp h)6263theorem weighted_compressed_trace (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)64(hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι) (P Q : Matrix ι ι ℂ) :65(∑ x, p x * (Q * P * (ρ x).matrix * P).trace.re) =66(Q * P * (DensityMatrix.mixture p hp hs ρ).matrix * P).trace.re := by67simp only [DensityMatrix.mixture_matrix, Matrix.mul_sum, Matrix.sum_mul,68Matrix.mul_smul, Matrix.smul_mul, Matrix.trace_sum, Matrix.trace_smul,69Complex.re_sum, smul_eq_mul, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero]7071/-- Independent average over the true state and an interfering test. -/72theorem average_cross_trace_le (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)73(hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι)74(P : Matrix ι ι ℂ) (Q : α → Matrix ι ι ℂ) (hQ : ∀ x, (Q x).PosSemidef)75{a b : ℝ} (ha : 0 ≤ a) (htrace : ∀ x, (Q x).trace.re ≤ b)76(hcap : ((a : ℂ) • (1 : Matrix ι ι ℂ) -77P * (DensityMatrix.mixture p hp hs ρ).matrix * P).PosSemidef) :78(∑ y, ∑ x, p y * p x * (Q y * P * (ρ x).matrix * P).trace.re) ≤ a * b := by79calc80_ = ∑ y, p y * (Q y * P * (DensityMatrix.mixture p hp hs ρ).matrix * P).trace.re := by81apply Finset.sum_congr rfl82intro y _83have he (x : α) : p y * p x * (Q y * P * (ρ x).matrix * P).trace.re =84p y * (p x * (Q y * P * (ρ x).matrix * P).trace.re) := mul_assoc _ _ _85simp only [he, ← Finset.mul_sum]86rw [weighted_compressed_trace]87_ ≤ ∑ y, p y * (a * b) := by88apply Finset.sum_le_sum89intro y _90apply mul_le_mul_of_nonneg_left _ (hp y)91exact (compressed_trace_le P _ (Q y) (hQ y) hcap).trans92(mul_le_mul_of_nonneg_left (htrace y) ha)93_ = a * b := by rw [← Finset.sum_mul, hs, one_mul]9495end Nonadditivity.QuantumCoding