Pratik Patil

RobustInverse.lean

1module23public import SubentropyCertificates.RobustContinuity4public import SubentropyCertificates.UniformInverseLimit56/-! Certified inversion with both state uncertainty and numerical uncertainty. -/7@[expose] public section8noncomputable section9set_option autoImplicit false10set_option backward.isDefEq.respectTransparency false11open Matrix Set Filter12open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator Kronecker Topology13namespace SubentropyCertificates.Robust14open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState)15open D5.S3.Quantum.Information.PartialTraceMutualInformation (productState)16open D5.S3.Quantum.Subentropy.ClassicalQuantumGram (conditionalSubentropy)17open SubentropyCertificates.CompactStability18open SubentropyCertificates.MixedQubit (traceDistance)19open SubentropyCertificates.ConditionalContinuity20open SubentropyCertificates.SpectralContinuity (maximallyMixed)21open SubentropyCertificates.AncillaCalibration22open SubentropyCertificates.Discrimination2324variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]2526/-- The clipped argument lies below the true value, within twice the combined error. -/27theorem clipped_bracket {q s v η r : ℝ} (hq : 0 ≤ q) (hev : |v-s| ≤ η) (hst : |s-q| ≤ r) :28    q - 2*(η+r) ≤ max 0 (v-η-r) ∧ max 0 (v-η-r) ≤ q := by29  rw [abs_le] at hev hst30  exact ⟨le_trans (by linarith [hev.1,hst.1]) (le_max_right _ _),31    max_le hq (by linarith [hev.2,hst.2])⟩3233/-- Eq. (robust-certificate) for every certified state error radius, in particular34the three-term radius of conditional_continuity and its fixed-marginal refinement. -/35theorem ordinary_certificate (l : ℕ) (hn : Fintype.card X = l + 2) (E F : Ensemble X D)36    {v η R : ℝ} (hv : |v - conditional F| ≤ η) (hR : |conditional F - conditional E| ≤ R) :37    ∃ h : max 0 (v-η-R) ∈ curveRange l, phiInverse l (max 0 (v-η-R)) h ≤ guessingError E := by38  have hr := conditional_subentropy_range l hn E.1 E.1.2.1 E.1.2.2 (fun x ↦ asState (E.2 x))39  have h := (clipped_bracket hr.1 hv hR).240  have hi : max 0 (v-η-R) ∈ curveRange l := ⟨le_max_left _ _, h.trans hr.2⟩41  refine ⟨hi, error_threshold_lower_bound l hn E.1 E.1.2.1 E.1.2.2 (fun x ↦ asState (E.2 x))42    _ (phiInverse_mem l _ hi) ?_⟩43  simpa only [phi_phiInverse] using h444546/-- The lower bound using the full three-term radius in §6.4. -/47theorem ordinary_certificate_of_trace_distance (l : ℕ) (hn : Fintype.card X = l + 2)48    (E F : Ensemble X D) {v η δ : ℝ} (hv : |v - conditional F| ≤ η)49    (hd : traceDistance (record E) (record F) ≤ δ) :50    let R := min δ (min (SpectralContinuity.quantumModulus (Fintype.card X * Fintype.card D) δ +51      SpectralContinuity.quantumModulus (Fintype.card D) δ)52      (Real.log (Fintype.card X) - (harmonic (Fintype.card X) : ℝ) + 1))53    ∃ h : max 0 (v-η-R) ∈ curveRange l, phiInverse l (max 0 (v-η-R)) h ≤ guessingError E :=54  ordinary_certificate l hn E F hv (conditional_continuity l hn E F hd)5556/-- Fixing the marginal state improves the first term of the certified radius. -/57theorem ordinary_certificate_fixed_marginal (l : ℕ) (hn : Fintype.card X = l + 2)58    (E F : Ensemble X D) (hEF : average E = average F) {v η δ : ℝ}59    (hv : |v - conditional F| ≤ η) (hd : traceDistance (record E) (record F) ≤ δ) :60    let R := min (‖spatialSign (BinarySpectra.densityMatrix (average E))‖ * δ)61      (min (SpectralContinuity.quantumModulus (Fintype.card X * Fintype.card D) δ +62        SpectralContinuity.quantumModulus (Fintype.card D) δ)63        (Real.log (Fintype.card X) - (harmonic (Fintype.card X) : ℝ) + 1))64    ∃ h : max 0 (v-η-R) ∈ curveRange l, phiInverse l (max 0 (v-η-R)) h ≤ guessingError E :=65  ordinary_certificate l hn E F hv (fixed_conditional_continuity l hn E F hEF hd)6667/-- Conditional subentropy of the product extension of a CQ ensemble. -/68def extendedConditional {C : Type*} [Fintype C] [DecidableEq C] (ν : DensityState C)69    (E : Ensemble X D) : ℝ :=70  conditionalSubentropy E.1 E.1.2.1 E.1.2.2 (fun x ↦ productState (asState (E.2 x)) ν)7172theorem extended_conditional_blocks {C : Type*} [Fintype C] [DecidableEq C] (ν : DensityState C)73    (E : Ensemble X D) :74    extendedConditional ν E = blockConditionalQ (ancillaBlocks ν (ensembleBlocks E)) := by75  let F := ofEnsemble E.1 E.1.2.1 E.1.2.2 (fun x ↦ productState (asState (E.2 x)) ν)76  change conditional F = _77  rw [conditional_blocks]78  congr 179  funext x80  change E.1.1 x • ((E.2 x).1 ⊗ₖ BinarySpectra.densityMatrix ν) =81    (E.1.1 x • (E.2 x).1) ⊗ₖ BinarySpectra.densityMatrix ν82  rw [smul_kronecker]8384/-- The error in the extended conditional subentropy is at most δ divided by the ancilla dimension. -/85theorem calibrated_state_error (C : Type*) [Fintype C] [DecidableEq C] [Nonempty C]86    (E F : Ensemble X D) {δ : ℝ} (hδ : traceDistance (record E) (record F) ≤ δ) :87    |extendedConditional (maximallyMixed C) F - extendedConditional (maximallyMixed C) E| ≤88      δ / (Fintype.card C : ℝ) := by89  rw [extended_conditional_blocks, extended_conditional_blocks]90  have h := (cq_maximallyMixed_ancilla_continuity C (ensembleBlocks E) (ensembleBlocks F)91    (ensembleBlocks_pos E) (ensembleBlocks_pos F) (ensembleBlocks_trace E) (ensembleBlocks_trace F)).292  exact h.trans (div_le_div_of_nonneg_right ((record_distance_blocks E F).symm.le.trans hδ) (by positivity))9394/-- Eq. (calibrated-robust-certificate), including the inverse-domain guarantee. -/95theorem calibrated_certificate (C : Type*) [Fintype C] [DecidableEq C] [Nonempty C]96    (l : ℕ) (hn : Fintype.card X = l + 2) (E F : Ensemble X D) {v η δ : ℝ}97    (hv : |v - extendedConditional (maximallyMixed C) F| ≤ η)98    (hδ : traceDistance (record E) (record F) ≤ δ) :99    let q := max 0 (v-η-δ/(Fintype.card C : ℝ))100    let ν := maximallyMixed C101    ∃ h : q ∈ calibratedCurveRange ν l, calibratedPhiInverse ν l q h ≤ guessingError E := by102  dsimp only103  let ν := maximallyMixed C104  have hr := conditional_product_mem_calibratedRange ν l hn E.1 E.1.2.1 E.1.2.2 (fun x ↦ asState (E.2 x))105  have h := (clipped_bracket hr.1 hv (calibrated_state_error C E F hδ)).2106  have hi : max 0 (v-η-δ/(Fintype.card C : ℝ)) ∈ calibratedCurveRange ν l :=107    ⟨le_max_left _ _,h.trans hr.2⟩108  refine ⟨hi, (calibratedPhiInverse_le_iff ν l hi109    (optimal_error_range l hn E.1 E.1.2.1 E.1.2.2 (fun x ↦ asState (E.2 x)))).2 ?_⟩110  exact h.trans (ancilla_optimal_curve_bound ν l hn _ _ _ _)111112end SubentropyCertificates.Robust

Axioms used

Choose a statement to see which axioms its proof uses.