module public import SubentropyCertificates.BinaryTableDeficit public import SubentropyCertificates.MarginalEigenbasisTable public import SubentropyCertificates.SubadditivityTheorem /-! The accepted two-qubit subadditivity deficit bound (cor:qubit-deficit). -/ @[expose] public section noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Matrix open scoped BigOperators ComplexOrder MatrixOrder namespace SubentropyCertificates.QubitDeficit open D5.S3.Quantum.Foundation.FiniteStateChannel open D5.S3.Quantum.Information.PartialTraceMutualInformation open D5.S3.Quantum.Information.InputInformationBalance open D5.S3.Quantum.Subentropy.Basic open D5.S3.Quantum.Subentropy.DensityKernel open SubentropyCertificates.ClassicalCurve open SubentropyCertificates.QuantumEquality open SubentropyCertificates.Subadditivity private theorem det_qubit_spectrum {A : Matrix (Fin 2) (Fin 2) ℂ} (hA : A.IsHermitian) : A.det.re = hA.eigenvalues 0 * hA.eigenvalues 1 := by rw [hA.det_eq_prod_eigenvalues, Fin.prod_univ_two] change (((hA.eigenvalues 0 : ℂ) * (hA.eigenvalues 1 : ℂ))).re = _ simp private theorem qubit_det_cases (ρ : DensityState (Fin 2)) : let d := (CStarMatrix.ofMatrix.symm ρ.1).det.re 0 ≤ d ∧ (d = 0 ↔ IsPure ρ) := by let A := CStarMatrix.ofMatrix.symm ρ.1 have hA := density_posSemidef ρ let w := hA.isHermitian.eigenvalues have hp := spectral_prob hA ρ.2.2 change (∀ i, 0 ≤ w i) ∧ ∑ i, w i = 1 at hp change 0 ≤ A.det.re ∧ (A.det.re = 0 ↔ IsPure ρ) rw [det_qubit_spectrum hA.isHermitian, ← subentropy_zero_iff_pure, subentropy, subentropy_of_spectrum hA.isHermitian, classical_zero_iff_pointMass w hp] change 0 ≤ w 0 * w 1 ∧ (w 0 * w 1 = 0 ↔ ∃ i, w = pointMass i) refine ⟨mul_nonneg (hp.1 _) (hp.1 _), ?_⟩ have hs := hp.2 rw [Fin.sum_univ_two] at hs constructor · intro hz rcases mul_eq_zero.mp hz with h | h · refine ⟨1, funext fun j => ?_⟩ fin_cases j <;> simp [pointMass] <;> linarith only [h, hs] · refine ⟨0, funext fun j => ?_⟩ fin_cases j <;> simp [pointMass] <;> linarith only [h, hs] · rintro ⟨i, hi⟩ rw [hi] fin_cases i <;> simp [pointMass] /-- The product of the actual marginal determinants divided by three is a lower bound for the subadditivity deficit of any two-qubit density matrix. -/ theorem two_qubit_subadditivity_deficit (ρ : DensityState (Fin 2 × Fin 2)) : (CStarMatrix.ofMatrix.symm (marginalRight ρ).1).det.re * (CStarMatrix.ofMatrix.symm (marginalLeft ρ).1).det.re / 3 ≤ subentropy (marginalRight ρ) + subentropy (marginalLeft ρ) - subentropy ρ := by have hA := (partialTraceRight_posSemidef (density_posSemidef ρ)).isHermitian have hB := (partialTraceLeft_posSemidef (density_posSemidef ρ)).isHermitian obtain ⟨p, hp, hr, hc, hdiag⟩ := marginal_eigenbasis_table ρ (0,0) have he := classical_two_by_two_deficit p hp dsimp only at he rw [funext hr, funext hc] at he rw [hr 0, hr 1, hc 0, hc 1] at he let M := CStarMatrix.ofMatrix.symm ρ.1 change (partialTraceRight M).det.re * (partialTraceLeft M).det.re / 3 ≤ matrixSubentropy (partialTraceRight M) + matrixSubentropy (partialTraceLeft M) - subentropy ρ rw [det_qubit_spectrum hA, det_qubit_spectrum hB, subentropy_of_spectrum hA, subentropy_of_spectrum hB] exact he.trans (sub_le_sub_left hdiag _) /-- The displayed lower bound is positive when both marginals are mixed. For a pure marginal the bound and the deficit both vanish. -/ theorem two_qubit_deficit_boundary_cases (ρ : DensityState (Fin 2 × Fin 2)) : let bound := (CStarMatrix.ofMatrix.symm (marginalRight ρ).1).det.re * (CStarMatrix.ofMatrix.symm (marginalLeft ρ).1).det.re / 3 let deficit := subentropy (marginalRight ρ) + subentropy (marginalLeft ρ) - subentropy ρ (¬ IsPure (marginalRight ρ) ∧ ¬ IsPure (marginalLeft ρ) ↔ 0 < bound) ∧ (IsPure (marginalRight ρ) ∨ IsPure (marginalLeft ρ) → bound = 0 ∧ deficit = 0) := by obtain ⟨ha, ha0⟩ := qubit_det_cases (marginalRight ρ) obtain ⟨hb, hb0⟩ := qubit_det_cases (marginalLeft ρ) dsimp only constructor · rw [← ha0, ← hb0, div_pos_iff_of_pos_right (by norm_num : (0 : ℝ) < 3)] constructor · rintro ⟨h, k⟩ exact mul_pos (lt_of_le_of_ne ha (Ne.symm h)) (lt_of_le_of_ne hb (Ne.symm k)) · intro h exact ⟨fun hz => by simp [hz] at h, fun hz => by simp [hz] at h⟩ · intro hp refine ⟨?_, sub_eq_zero.mpr ((subadditivity_with_equality ρ).2.mpr hp).symm⟩ rcases hp with h | h · simp [ha0.mpr h] · simp [hb0.mpr h] end SubentropyCertificates.QubitDeficit