module public import SubentropyCertificates.AncillaTracePairing public import D5.S3.Quantum.Subentropy.GuessingProbability /-! The guessing-error clause of Proposition 25 for an arbitrary independent ancillary state. -/ @[expose] public section noncomputable section open Matrix Set open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator Kronecker namespace SubentropyCertificates.Discrimination open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState) open D5.S3.Quantum.Information.PartialTraceMutualInformation (productState) open D5.S3.Quantum.Subentropy.GuessingProbability open SubentropyCertificates.BinarySpectra (densityMatrix) variable {X Y B C : Type*} [Fintype X] [Fintype Y] [Fintype B] [DecidableEq B] [Fintype C] [DecidableEq C] /-- A measurement on the original system can ignore the ancilla. The lifted effects sum to the identity and reproduce every original outcome probability. -/ theorem lift_povm_ancilla (ν : DensityState C) (M : Y → Matrix B B ℂ) (hM : ∀ y, (M y).PosSemidef) (hs : ∑ y, M y = 1) : (∀ y, (M y ⊗ₖ (1 : Matrix C C ℂ)).PosSemidef) ∧ (∑ y, M y ⊗ₖ (1 : Matrix C C ℂ)) = 1 ∧ ∀ (y : Y) (ρ : DensityState B), ((M y ⊗ₖ (1 : Matrix C C ℂ)) * densityMatrix (productState ρ ν)).trace = (M y * densityMatrix ρ).trace := by refine ⟨fun y ↦ (hM y).kronecker Matrix.PosSemidef.one, ?_, ?_⟩ · calc _ = (∑ y, M y) ⊗ₖ (1 : Matrix C C ℂ) := by ext ⟨i,c⟩ ⟨j,d⟩ simp only [Matrix.sum_apply, kroneckerMap_apply, Finset.sum_mul] _ = _ := by rw [hs, one_kronecker_one] · intro y ρ change ((M y ⊗ₖ 1) * (densityMatrix ρ ⊗ₖ densityMatrix ν)).trace = _ rw [← Matrix.mul_kronecker_mul, one_mul, trace_kronecker, show (densityMatrix ν).trace = 1 from ν.2.2, mul_one] /-- The attainable success probabilities coincide. Each joint guessing measurement induces a measurement on B with the same statistics, and any measurement on B lifts by tensoring its effects with the identity. -/ theorem successProbabilitySet_product_right (p : X → ℝ) (ρ : X → DensityState B) (ν : DensityState C) : successProbabilitySet p (fun x ↦ productState (ρ x) ν) = successProbabilitySet p ρ := by ext a constructor · rintro ⟨E, hE, hs, rfl⟩ refine ⟨fun x ↦ ancillaEffect ν (E x), fun x ↦ ancillaEffect_posSemidef ν (E x) (hE x), sum_ancillaEffect ν E hs, ?_⟩ apply Finset.sum_congr rfl intro x _ exact congrArg (fun z : ℂ ↦ p x * z.re) (ancilla_trace_pairing ν (E x) (densityMatrix (ρ x))).symm · rintro ⟨M, hM, hs, rfl⟩ obtain ⟨hpos, hsum, hpair⟩ := lift_povm_ancilla ν M hM hs refine ⟨fun x ↦ M x ⊗ₖ (1 : Matrix C C ℂ), hpos, hsum, ?_⟩ apply Finset.sum_congr rfl intro x _ exact congrArg (fun z : ℂ ↦ p x * z.re) (hpair x (ρ x)).symm /-- An independent ancillary density state preserves optimal guessing probability. -/ theorem pGuess_product_right (p : X → ℝ) (ρ : X → DensityState B) (ν : DensityState C) : pGuess p (fun x ↦ productState (ρ x) ν) = pGuess p ρ := congrArg sSup (successProbabilitySet_product_right p ρ ν) /-- Proposition 25, guessing-error clause. The same ancillary state is appended for every signal. It may be singular, and any of the original labels may have prior zero. -/ theorem guessing_error_product_right (p : X → ℝ) (ρ : X → DensityState B) (ν : DensityState C) : 1 - pGuess p (fun x ↦ productState (ρ x) ν) = 1 - pGuess p ρ := by rw [pGuess_product_right] end SubentropyCertificates.Discrimination