CalibratedMeasurementCurve.lean
1module23public import SubentropyCertificates.CalibratedCoordinate4public import SubentropyCertificates.CalibratedPosterior5public import SubentropyCertificates.PosteriorStability67/-! The calibrated bound in Proposition 25, from each measurement to the optimal error. -/8@[expose] public section9noncomputable section10set_option autoImplicit false11open Matrix Set12open scoped BigOperators MatrixOrder ComplexOrder1314namespace SubentropyCertificates.AncillaCalibration15open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState)16open D5.S3.Quantum.Information.PartialTraceMutualInformation (productState)17open D5.S3.Quantum.Subentropy.ClassicalQuantumGram (conditionalSubentropy)18open D5.S3.Quantum.Subentropy.GuessingProbability (pGuess)19open SubentropyCertificates.ClassicalCurve20open SubentropyCertificates.MeasurementPosterior21open SubentropyCertificates.Discrimination22open SubentropyCertificates.PosteriorStability (measurementError)2324variable {X B C Y : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]25 [Fintype C] [DecidableEq C]2627/-- Jensen's inequality for calibrated posteriors, with any reported label at each outcome. -/28theorem calibrated_posterior_bound_finset (ν : DensityState C) (m : ℕ)29 (hn : Fintype.card X = m + 2) (S : Finset Y) (q : Y → ℝ)30 (hq : ∀ y ∈ S, 0 ≤ q y) (hs : ∑ y ∈ S, q y = 1) (b : Y → X → ℝ)31 (hb : ∀ y ∈ S, b y ∈ probabilitySimplex X) (selected : Y → X) :32 (∑ y ∈ S, q y * calibratedSubentropy ν (b y)) ≤33 calibratedPhi ν m (∑ y ∈ S, q y * (1 - b y (selected y))) := by34 have herr y (hy : y ∈ S) : 1 - b y (selected y) ∈ Icc (0 : ℝ) 1 := by35 have hle : b y (selected y) ≤ 1 := by36 rw [← (hb y hy).2]37 exact Finset.single_le_sum (fun i _ ↦ (hb y hy).1 i) (Finset.mem_univ _)38 exact ⟨sub_nonneg.mpr hle, by linarith [(hb y hy).1 (selected y)]⟩39 calc40 _ ≤ ∑ y ∈ S, q y * calibratedPhi ν m (1 - b y (selected y)) :=41 Finset.sum_le_sum fun y hy ↦ mul_le_mul_of_nonneg_left42 (calibrated_coordinate_bound_finite ν m hn (b y) (hb y hy) (selected y)) (hq y hy)43 _ ≤ _ := (calibratedPhi_concave ν m).le_map_sum hq hs herr4445variable [Fintype Y]4647private theorem measurement_average_le_curve (ν : DensityState C) (m : ℕ)48 (hn : Fintype.card X = m + 2) (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)49 (ρ : X → DensityState B) (F : Y → Matrix B B ℂ)50 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1) (selected : Y → X) :51 (∑ y ∈ Finset.univ.filter (fun y ↦ 0 < outcomeProbability p ρ (F y)),52 outcomeProbability p ρ (F y) * calibratedSubentropy ν (posterior p ρ (F y))) ≤53 calibratedPhi ν m (measurementError p ρ F selected) := by54 let q y := outcomeProbability p ρ (F y)55 let S := Finset.univ.filter (fun y ↦ 0 < q y)56 have hq y : 0 ≤ q y := outcomeProbability_nonneg p hp ρ (F y) (hF y)57 have hsum : ∑ y ∈ S, q y = 1 := by58 rw [sum_over_positive q hq q (fun _ hz ↦ hz)]59 exact sum_outcomeProbability p hp hs ρ F hsF60 exact calibrated_posterior_bound_finset ν m hn S q (fun y _ ↦ hq y) hsum61 (fun y ↦ posterior p ρ (F y))62 (fun y hy ↦ posterior_probability p hp ρ (F y) (hF y) (Finset.mem_filter.mp hy).2) selected6364/-- Equation (ancilla-posterior) for every finite POVM. The MAP error uses the maximum65posterior mass on each positive-probability outcome and is independent of tie breaking. -/66theorem ancilla_measurement_curve_bound (ν : DensityState C) (m : ℕ)67 (hn : Fintype.card X = m + 2) (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)68 (ρ : X → DensityState B) (F : Y → Matrix B B ℂ)69 (hF : ∀ y, (F y).PosSemidef) (hsF : ∑ y, F y = 1) :70 let q y := outcomeProbability p ρ (F y)71 let b y := posterior p ρ (F y)72 let S := Finset.univ.filter (fun y ↦ 0 < q y)73 let avg := ∑ y ∈ S, q y * calibratedSubentropy ν (b y)74 let e := ∑ y ∈ S, q y * (1 - sSup (Set.range (b y)))75 let c := conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν)76 0 ≤ c ∧ c ≤ avg ∧ avg ≤ calibratedPhi ν m e := by77 classical78 have : Nonempty X := Fintype.card_pos_iff.mp (by omega)79 have hmax (y : Y) : ∃ i, posterior p ρ (F y) i = sSup (Set.range (posterior p ρ (F y))) := by80 obtain ⟨i, _, hi⟩ := Finset.exists_max_image Finset.univ (posterior p ρ (F y)) Finset.univ_nonempty81 refine ⟨i, Eq.symm (IsGreatest.csSup_eq ⟨⟨i, rfl⟩, ?_⟩)⟩82 rintro _ ⟨x, rfl⟩83 exact hi x (Finset.mem_univ x)84 choose selected hsel using hmax85 have h := measurement_average_le_curve ν m hn p hp hs ρ F hF hsF selected86 simp only [measurementError, hsel] at h87 obtain ⟨hzero, hcomp⟩ := ancilla_measurement_posterior_comparison p hp hs ρ ν F hF hsF88 exact ⟨hzero, hcomp, h⟩8990/-- At an optimal guessing POVM the calibrated curve bounds the extended conditional91subentropy at the original ensemble's minimum attainable error. -/92theorem ancilla_optimal_curve_bound (ν : DensityState C) (m : ℕ)93 (hn : Fintype.card X = m + 2) (p : X → ℝ) (hp : ∀ x, 0 ≤ p x) (hs : ∑ x, p x = 1)94 (ρ : X → DensityState B) :95 conditionalSubentropy p hp hs (fun x ↦ productState (ρ x) ν) ≤96 calibratedPhi ν m (1 - pGuess p ρ) := by97 obtain ⟨M, hM, hsM, hopt⟩ := exists_optimal_povm p hp hs ρ98 have he : measurementError p ρ M id = 1 - pGuess p ρ :=99 (posterior_average_error p hp hs ρ M hM hsM id).trans (congrArg (fun s : ℝ ↦ 1 - s) hopt)100 rw [← he]101 exact (ancilla_measurement_posterior_comparison p hp hs ρ ν M hM hsM).2.trans102 (measurement_average_le_curve ν m hn p hp hs ρ M hM hsM id)103104end SubentropyCertificates.AncillaCalibration
Axioms used
Choose a statement to see which axioms its proof uses.