Pratik Patil

QuantumLipschitz.lean

1module23public import SubentropyCertificates.QuantumModulus4public import SubentropyCertificates.TraceDistanceContinuity5public import SubentropyCertificates.LinearDiscrimination67/-! Theorem 13 at radius zero and the strict, optimal trace-distance Lipschitz bound. -/8@[expose] public section9noncomputable section10open Matrix Set11open scoped BigOperators ComplexOrder MatrixOrder1213namespace SubentropyCertificates.SpectralContinuity14open D5.S3.Quantum.Foundation.FiniteStateChannel15open D5.S3.Quantum.Information.PartialTraceMutualInformation16open D5.S3.Quantum.Information.InputInformationBalance (IsPure)17open D5.S3.Quantum.Subentropy.Basic18open SubentropyCertificates.BinarySpectra (densityMatrix)19open SubentropyCertificates.ClassicalCurve20open SubentropyCertificates.CompactStability (traceDistance_nonneg traceDistance_self)21open SubentropyCertificates.Continuity (modulus_lt_radius)22open SubentropyCertificates.Discrimination (smaller_coefficient_fails_near_zero)23open SubentropyCertificates.MixedQubit (traceDistance)2425variable {D : Type*} [Fintype D] [DecidableEq D]2627/-- Trace distance vanishes exactly when the two states coincide. -/28theorem traceDistance_eq_zero_iff (ρ σ : DensityState D) :29    traceDistance ρ σ = 0 ↔ ρ = σ := by30  refine ⟨fun h ↦ ?_, fun h ↦ h ▸ traceDistance_self σ⟩31  let H := (density_posSemidef ρ).isHermitian.sub (density_posSemidef σ).isHermitian32  change (∑ i, |H.eigenvalues i|) / 2 = 0 at h33  have hsum : ∑ i, |H.eigenvalues i| = 0 := by linarith34  have hz := (Finset.sum_eq_zero_iff_of_nonneg (fun i _ ↦ abs_nonneg (H.eigenvalues i))).mp hsum35  apply Subtype.ext36  apply CStarMatrix.ofMatrix.symm.injective37  have he : H.eigenvalues = 0 := funext fun i ↦ abs_eq_zero.mp (hz i (by simp))38  exact sub_eq_zero.mp (H.eigenvalues_eq_zero_iff.mp he)3940/-- In the closed ball of radius zero the maximizing pairs are precisely the identical pairs. -/41theorem quantum_modulus_zero_eq_iff (ρ σ : DensityState D) :42    (traceDistance ρ σ ≤ 0 ∧ |subentropy ρ - subentropy σ| = sSup (quantumDifferences D 0)) ↔43      ρ = σ := by44  have eq_of_ball (a b : DensityState D) (h : traceDistance a b ≤ 0) : a = b :=45    (traceDistance_eq_zero_iff a b).mp (le_antisymm h (traceDistance_nonneg a b))46  refine ⟨fun h ↦ eq_of_ball ρ σ h.1, ?_⟩47  rintro rfl48  have zero : IsGreatest (quantumDifferences D 0) 0 := by49    refine ⟨⟨ρ, ρ, (traceDistance_self ρ).le, by simp⟩, ?_⟩50    rintro _ ⟨a, b, hd, rfl⟩51    simp [eq_of_ball a b hd]52  simp [traceDistance_self, zero.csSup_eq]5354/-- On a space of dimension at most one, all density states coincide. -/55theorem densityState_eq_of_card_le_one (hd : Fintype.card D ≤ 1) (ρ σ : DensityState D) :56    ρ = σ := by57  have : Subsingleton D := Fintype.card_le_one_iff_subsingleton.mp hd58  apply Subtype.ext59  apply CStarMatrix.ofMatrix.symm.injective60  ext i j61  rw [Subsingleton.elim j i]62  have entry (τ : DensityState D) : densityMatrix τ i i = 1 := by63    have ht : (densityMatrix τ).trace = 1 := τ.2.264    change ∑ j, densityMatrix τ j j = 1 at ht65    rwa [Finset.sum_eq_single i (fun j _ hj ↦ (hj (Subsingleton.elim j i)).elim)66      (fun h ↦ (h (Finset.mem_univ i)).elim)] at ht67  exact (entry ρ).trans (entry σ).symm6869/-- Distinct density states have subentropy gap strictly below their trace distance. -/70theorem subentropy_lt_traceDistance (ρ σ : DensityState D) (hne : ρ ≠ σ) :71    |subentropy ρ - subentropy σ| < traceDistance ρ σ := by72  have hpos := lt_of_le_of_ne (traceDistance_nonneg ρ σ) (fun h ↦73    hne ((traceDistance_eq_zero_iff ρ σ).mp h.symm))74  have hd : 2 ≤ Fintype.card D := by75    by_contra! h76    exact hne (densityState_eq_of_card_le_one (by omega) ρ σ)77  obtain ⟨m, hm⟩ : ∃ m, Fintype.card D = m + 2 := ⟨Fintype.card D - 2, by omega⟩78  apply (quantum_continuity_upper ρ σ le_rfl).trans_lt79  rw [hm]80  exact modulus_lt_radius m hpos8182/-- The coefficient-one Lipschitz inequality in all finite dimensions. -/83theorem subentropy_le_traceDistance (ρ σ : DensityState D) :84    |subentropy ρ - subentropy σ| ≤ traceDistance ρ σ := by85  by_cases h : ρ = σ86  · simp [h, traceDistance_self]87  · exact (subentropy_lt_traceDistance ρ σ h).le8889/-- Every smaller coefficient fails at arbitrarily small positive distance in each fixed90dimension at least two, already for a pure state and a commuting diagonal state. -/91theorem quantum_lipschitz_sharp_near_zero (hd : 2 ≤ Fintype.card D) {c ε : ℝ}92    (hc : c < 1) (hε : 0 < ε) :93    ∃ ρ σ : DensityState D, IsPure σ ∧ Commute (densityMatrix ρ) (densityMatrix σ) ∧94      0 < traceDistance ρ σ ∧ traceDistance ρ σ < ε ∧95      c * traceDistance ρ σ < |subentropy ρ - subentropy σ| := by96  obtain ⟨m, hm⟩ : ∃ m, Fintype.card D = m + 2 := ⟨Fintype.card D - 2, by omega⟩97  let e : D ≃ Option (Fin (m + 1)) := Fintype.equivOfCardEq (by simp [hm, Nat.add_assoc])98  obtain ⟨u, hu, hεu, hub, hgap⟩ := smaller_coefficient_fails_near_zero m hc hε99  have hu1 : u ∈ Icc (0 : ℝ) 1 := ⟨hu.le, hub.trans (uniformError_mem m).2⟩100  obtain ⟨hp, hcomm, hdist, hdiff⟩ := extremal_diagonal_pair e hu1101  refine ⟨extremalDiagonal e u hu1, coordinatePure e, hp, hcomm, ?_⟩102  rw [hdist, hdiff]103  exact ⟨hu, hεu, hgap.trans_le (le_abs_self _)⟩104105/-- One is the least Lipschitz coefficient in every fixed dimension at least two. -/106theorem quantum_lipschitz_constant_isLeast (hd : 2 ≤ Fintype.card D) :107    IsLeast {c : ℝ | ∀ ρ σ : DensityState D,108      |subentropy ρ - subentropy σ| ≤ c * traceDistance ρ σ} 1 := by109  refine ⟨fun ρ σ ↦ by simpa using subentropy_le_traceDistance ρ σ, ?_⟩110  intro c hc111  by_contra! h112  obtain ⟨ρ, σ, _, _, _, _, hfail⟩ :=113    quantum_lipschitz_sharp_near_zero hd h (by norm_num : 0 < (1 : ℝ))114  exact hfail.not_ge (hc ρ σ)115116/-- The least coefficient uniform over all finite dimensions is one. -/117theorem quantum_lipschitz_universal_isLeast :118    IsLeast {c : ℝ | ∀ d : ℕ, ∀ ρ σ : DensityState (Fin d),119      |subentropy ρ - subentropy σ| ≤ c * traceDistance ρ σ} 1 := by120  refine ⟨fun _ ρ σ ↦ by simpa using subentropy_le_traceDistance ρ σ, ?_⟩121  intro c hc122  exact (quantum_lipschitz_constant_isLeast (D := Fin 2) (by decide)).2 (hc 2)123124end SubentropyCertificates.SpectralContinuity

Axioms used

Choose a statement to see which axioms its proof uses.