Pratik Patil

MixedQubitExample.lean

1module23public import SubentropyCertificates.MixedQubitDistance4public import SubentropyCertificates.MixedQubitDeficit56/-! Section 3.5: small positive deficit at fixed distance from every7positive-error equality record. Both registers have dimension two. -/8@[expose] public section9noncomputable section10set_option autoImplicit false11open Matrix Set Filter12open scoped BigOperators Topology13namespace SubentropyCertificates.MixedQubit14open D5.S3.Quantum.Foundation.FiniteStateChannel15open D5.S3.Quantum.Information.OrthogonalRecordEntropy16open D5.S3.Quantum.Subentropy.ClassicalQuantumGram17open D5.S3.Quantum.Subentropy.GuessingProbability18open SubentropyCertificates.ClassicalCurve19open SubentropyCertificates.Discrimination2021/-- All normalized binary qubit CQ records attaining the sharp bound22at their own strictly positive guessing error. Priors may vary. -/23def positiveEqualityRecords : Set (DensityState (Fin 2 × Fin 2)) :=24  {τ | ∃ (q : Fin 2 → ℝ) (hq : ∀ x,0 ≤ q x) (hs : ∑ x,q x=1)25      (σ : Fin 2 → DensityState (Fin 2)),26      0 < 1-pGuess q σ ∧ conditionalSubentropy q hq hs σ = phi 0 (1-pGuess q σ) ∧27      τ=recordState q hq hs σ}2829theorem same_prior_pure_equality {e : ℝ} (he : e ∈ Ioo 0 (1/2))30    (v : Fin 2 → ℂ) (hv : ∑ i,star (v i)*v i=1) :31    recordState (priors e) (priors_probability he).1 (priors_probability he).2 (fun _ => pureSignal v hv)32      ∈ positiveEqualityRecords := by33  have hp := priors_probability he34  have herr := constant_signal_error he (pureSignal v hv)35  have hpos : 0 < 1-pGuess (priors e) (fun _ => pureSignal v hv) := by rw [herr]; exact he.136  refine ⟨priors e,hp.1,hp.2,fun _ => pureSignal v hv,hpos,?_,rfl⟩37  rw [herr,conditional_identical_pure]38  simpa [priors] using binary_coordinate_eq (by decide : Fintype.card (Fin 2)=2) (priors e) hp 03940/-- The distance is an attained minimum over the full equality set. -/41theorem nearest_positive_equality {e : ℝ} (he : e ∈ Ioo 0 (1/2)) :42    IsLeast ((traceDistance (exampleRecord e he)) '' positiveEqualityRecords) (1/2) := by43  have hp := priors_probability he44  constructor45  · let v : Fin 2 → ℂ := ![1,0]46    have hv : ∑ i,star (v i)*v i=1 := by simp [v,Fin.sum_univ_two]47    exact ⟨_,same_prior_pure_equality he v hv,mixed_pure_record_exact _ hp.1 hp.2 v hv⟩48  · rintro _ ⟨τ,hτ,rfl⟩49    obtain ⟨q,hq,hs,σ,hpos,heq,rfl⟩ := hτ50    obtain ⟨_,u,hu,huσ,_,_⟩ := (sharp_equality_iff_of_positive_error 051      (by decide : Fintype.card (Fin 2)=0+2) q hq hs σ hpos).mp heq52    rw [show σ = fun _ => pureSignal u hu from funext huσ]53    exact mixed_pure_record_lower _ q hp.1 hp.2 hq hs u hu5455/-- The complete mixed-qubit example. The positive deficit tends to zero56from the right, while the nearest positive-error equality case stays at57trace distance 1/2 throughout the open interval. -/58theorem mixed_qubit_example :59    Tendsto deficit (𝓝[>] 0) (𝓝 0) ∧60    ∀ (e : ℝ) (he : e ∈ Ioo 0 (1/2)),61      1-pGuess (priors e) (fun _ => mixed)=e ∧62      0 < deficit e ∧ deficit e ≤ e ∧63      IsLeast ((traceDistance (exampleRecord e he)) '' positiveEqualityRecords) (1/2) :=64  ⟨deficit_tendsto_zero,fun _ he => ⟨constant_signal_error he mixed,(deficit_bounds he).1,65    (deficit_bounds he).2,nearest_positive_equality he⟩⟩6667end SubentropyCertificates.MixedQubit

Axioms used

Choose a statement to see which axioms its proof uses.