ProjectionAlignment.lean
1module23public import SubentropyCertificates.PlateauEquality45/-! Alignment at the interior equality case, tested by the projection onto the pure state. -/6@[expose] public section7noncomputable section8open Matrix9open scoped BigOperators ComplexOrder MatrixOrder1011namespace SubentropyCertificates.SpectralContinuity12open D5.S3.Quantum.Foundation.FiniteStateChannel13open D5.S3.Quantum.Information.InputInformationBalance (IsPure)14open D5.S3.Quantum.Information.PartialTraceMutualInformation15open SubentropyCertificates.ClassicalCurve16open SubentropyCertificates.BinarySpectra (densityMatrix)17open SubentropyCertificates.MixedQubit (traceDistance traceDistance_test)1819variable {D : Type*} [Fintype D] [DecidableEq D]2021/-- The state formula in Theorem 13; m+1 is the dimension of the orthogonal complement. -/22def extremalMatrix (m : ℕ) (δ : ℝ) (P : Matrix D D ℂ) : Matrix D D ℂ :=23 ((1 - δ : ℝ) : ℂ) • P + ((δ / (m + 1 : ℕ) : ℝ) : ℂ) • (1 - P)2425omit [Fintype D] in26theorem extremalMatrix_affine (m : ℕ) (δ : ℝ) (P : Matrix D D ℂ) :27 extremalMatrix m δ P = ((δ / (m + 1 : ℕ) : ℝ) : ℂ) • 1 +28 ((1 - δ - δ / (m + 1 : ℕ) : ℝ) : ℂ) • P := by29 simp only [extremalMatrix, Complex.ofReal_sub, sub_smul, smul_sub]30 abel3132private theorem reverse_test (ρ σ : DensityState D) (F : Matrix D D ℂ) :33 ((1-F)*(densityMatrix σ - densityMatrix ρ)).trace.re =34 (F*(densityMatrix ρ - densityMatrix σ)).trace.re := by35 rw [Matrix.sub_mul, Matrix.one_mul, Matrix.trace_sub, Matrix.trace_sub,36 show (densityMatrix ρ).trace = 1 from ρ.2.2, show (densityMatrix σ).trace = 1 from σ.2.2,37 sub_self, zero_sub, ← Matrix.trace_neg, ← Matrix.mul_neg, neg_sub]3839theorem traceDistance_comm (ρ σ : DensityState D) : traceDistance ρ σ = traceDistance σ ρ := by40 suffices h : ∀ a b : DensityState D, traceDistance a b ≤ traceDistance b a from41 le_antisymm (h ρ σ) (h σ ρ)42 intro a b43 obtain ⟨E, he, hc, val, _⟩ := traceDistance_test a b44 obtain ⟨_, _, _, val', bound⟩ := traceDistance_test b a45 rw [← val, ← reverse_test a b E, ← val']46 exact bound (1-E) hc (by simpa using he)4748theorem pure_density_projection (ρ : DensityState D) (hρ : IsPure ρ) :49 densityMatrix ρ * densityMatrix ρ = densityMatrix ρ ∧ (1-densityMatrix ρ).PosSemidef := by50 obtain ⟨v, hv⟩ := hρ51 have he : densityMatrix ρ = vecMulVec v (star v) := Matrix.ext hv52 have tr : (vecMulVec v (star v)).trace = 1 := he ▸ ρ.2.253 have hn : star v ⬝ᵥ v = 1 := by54 simpa only [trace, diag_apply, vecMulVec_apply, dotProduct, mul_comm] using tr55 have hid : densityMatrix ρ * densityMatrix ρ = densityMatrix ρ := by56 rw [he, vecMulVec_mul_vecMulVec, hn, one_smul]57 refine ⟨hid, ?_⟩58 have hherm := Matrix.isHermitian_one.sub (density_posSemidef ρ).isHermitian59 have hsq : (1-densityMatrix ρ).conjTranspose * (1-densityMatrix ρ) = 1-densityMatrix ρ := by60 have hk : (1-densityMatrix ρ)*densityMatrix ρ = 0 := by61 rw [Matrix.sub_mul, Matrix.one_mul, hid, sub_self]62 rw [hherm.eq, Matrix.mul_sub, Matrix.mul_one, hk, sub_zero]63 exact hsq ▸ Matrix.posSemidef_conjTranspose_mul_self _6465theorem interior_leading_gap (m : ℕ) {δ : ℝ} (hu : δ < uniformError m) :66 0 < 1 - δ - δ / (m + 1 : ℕ) := by67 have hb : (0 : ℝ) < (m + 1 : ℕ) := by positivity68 have hd : (0 : ℝ) < (m + 2 : ℕ) := by positivity69 unfold uniformError at hu70 have h : 1 / ((m + 2 : ℕ) : ℝ) < 1 - δ := by linarith71 have := (div_lt_iff₀ hd).mp h72 apply sub_pos.mpr73 apply (div_lt_iff₀ hb).mpr74 push_cast at *75 nlinarith7677/-- Distance at most δ forces the pure state to be the distinguished eigenprojection P78when the other state has the two interior eigenvalues on P and its complement. -/79theorem interior_projection_alignment (m : ℕ) {δ : ℝ} (hu : δ < uniformError m)80 (ρ σ : DensityState D) (hρ : IsPure ρ) (P : Matrix D D ℂ) (hp : P.IsHermitian)81 (hp2 : P*P = P) (hpt : P.trace = 1) (hs : densityMatrix σ = extremalMatrix m δ P)82 (hd : traceDistance ρ σ ≤ δ) : densityMatrix ρ = P := by83 let R := densityMatrix ρ84 have hr : R.IsHermitian := (density_posSemidef ρ).isHermitian85 have hrt : R.trace = 1 := ρ.2.286 obtain ⟨hr2, hrc⟩ := pure_density_projection ρ hρ87 change R*R = R at hr288 obtain ⟨E, _, _, hval, hmax⟩ := traceDistance_test ρ σ89 have ht := (hmax R (density_posSemidef ρ) hrc).trans (hval.le.trans hd)90 let a : ℝ := δ / (m + 1 : ℕ)91 have hs' : densityMatrix σ = (a : ℂ) • 1 + ((1-δ-a : ℝ) : ℂ) • P :=92 hs.trans (extremalMatrix_affine ..)93 change (R * (R - densityMatrix σ)).trace.re ≤ δ at ht94 rw [hs', Matrix.mul_sub, hr2, Matrix.mul_add, Matrix.mul_smul, Matrix.mul_smul,95 Matrix.mul_one, Matrix.trace_sub, Matrix.trace_add, Matrix.trace_smul, Matrix.trace_smul,96 hrt] at ht97 simp only [smul_eq_mul, mul_one, Complex.sub_re, Complex.add_re, Complex.one_re,98 Complex.ofReal_re, Complex.re_ofReal_mul] at ht99 have hgap : 0 < 1 - δ - a := interior_leading_gap m hu100 have hover : 1 ≤ (R*P).trace.re := by101 by_contra! hn102 nlinarith only [ht, mul_pos hgap (sub_pos.mpr hn)]103 let H := R-P104 have hnorm : (H.conjTranspose*H).trace.re = 2-2*(R*P).trace.re := by105 change ((R-P).conjTranspose*(R-P)).trace.re = _106 rw [(hr.sub hp).eq, Matrix.sub_mul, Matrix.mul_sub, Matrix.mul_sub, hr2, hp2,107 Matrix.trace_sub, Matrix.trace_sub, Matrix.trace_sub, Matrix.trace_mul_comm P R, hrt, hpt]108 simp only [Complex.sub_re, Complex.one_re]109 ring110 have hpos := RCLike.nonneg_iff.mp (Matrix.posSemidef_conjTranspose_mul_self H).trace_nonneg111 have hlo : 0 ≤ (H.conjTranspose*H).trace.re := hpos.1112 have hz : (H.conjTranspose*H).trace = 0 := Complex.ext113 (show (H.conjTranspose*H).trace.re = 0 by linarith only [hnorm, hover, hlo]) hpos.2114 exact sub_eq_zero.mp (Matrix.trace_conjTranspose_mul_self_eq_zero_iff.mp hz : H = 0)115116end SubentropyCertificates.SpectralContinuity
Axioms used
Choose a statement to see which axioms its proof uses.