ConditionalDephasing.lean
1module23public import SubentropyCertificates.BinaryBasisGuessing4public import SubentropyCertificates.DephasingEnsemble5public import SubentropyCertificates.QuantumSSACounterexample6public import D5.S3.Quantum.Subentropy.ClassicalQuantumGram7import all D5.S3.Quantum.Subentropy.ClassicalQuantumGram89/-! Identify the conditional subentropies of the input and unread10measurement output with the v19 joint state and its marginals. -/11@[expose] public section12noncomputable section13set_option autoImplicit false14set_option backward.isDefEq.respectTransparency false15open Matrix16open scoped ComplexOrder MatrixOrder BigOperators17namespace SubentropyCertificates.QuantumCounterexample18open D5.S3.Quantum.Foundation.FiniteStateChannel19open D5.S3.Quantum.Information.OrthogonalRecordEntropy20open D5.S3.Quantum.Subentropy.Basic21open D5.S3.Quantum.Subentropy.ClassicalQuantumGram2223theorem fair_nonneg (a : Bit) : 0 ≤ fair a := by norm_num [fair]24theorem fair_sum : ∑ a, fair a = 1 := by norm_num [fair,Fin.sum_univ_two]2526variable {D : Type*} [Fintype D] [DecidableEq D]27private def copyMap (f : D → Bit) : Matrix (D × Bit) D ℂ :=28 fun u j => if u=(j,f j) then 1 else 02930private theorem copy_isometry (f : D → Bit) : (copyMap f).conjTranspose * copyMap f = 1 := by31 ext i j32 by_cases h : i=j33 · subst j; simp [Matrix.mul_apply, Matrix.conjTranspose_apply, copyMap]34 · simp [Matrix.mul_apply, Matrix.conjTranspose_apply, copyMap, h, Ne.symm h]3536private theorem copy_entries (f : D → Bit) (R : Matrix D D ℂ) (i j : D) (c k : Bit) :37 (copyMap f * R * (copyMap f).conjTranspose) (i,c) (j,k) =38 if c=f i ∧ k=f j then R i j else 0 := by39 have row (l : D) : (copyMap f * R) (i,c) l = if c=f i then R i l else 0 := by40 simp [Matrix.mul_apply,copyMap,Prod.mk.injEq,ite_and,ite_mul]41 have col (l : D) : (copyMap f).conjTranspose l (j,k) =42 if l=j then (if k=f j then 1 else 0) else 0 := by43 by_cases hl : l=j44 · subst l; by_cases hk : k=f j <;> simp [Matrix.conjTranspose_apply,copyMap,hk]45 · simp [Matrix.conjTranspose_apply,copyMap,hl,Ne.symm hl]46 rw [Matrix.mul_apply]47 simp only [row,col]48 by_cases h : c=f i <;> by_cases g : k=f j <;> simp [h,g,mul_ite]4950private abbrev recMat (ρ : Bit → DensityState D) : Matrix (Bit × D) (Bit × D) ℂ :=51 mat (recordState fair fair_nonneg fair_sum ρ)5253private abbrev avgMat (ρ : Bit → DensityState D) : Matrix D D ℂ :=54 mat (mixtureState fair fair_nonneg fair_sum ρ)5556private theorem avg_entries (ρ : Bit → DensityState D) (u v : D) :57 avgMat ρ u v = ∑ a, (1/2 : ℂ)*(ρ a).1 u v := by58 change (∑ a, fair a • mat (ρ a)) u v = _59 simp [fair,Matrix.sum_apply,Complex.real_smul]6061private theorem input_record :62 mat state = copyMap (@Prod.snd Bit Bit) * recMat inputSignal *63 (copyMap (@Prod.snd Bit Bit)).conjTranspose := by64 ext ⟨⟨a,b⟩,c⟩ ⟨⟨d,j⟩,k⟩65 change state.1 ((a,b),c) ((d,j),k) = _66 rw [state_encoded_blocks a d (b,c) (j,k), encoded_entries, copy_entries]67 rw [show recMat inputSignal (a,b) (d,j) = _ from68 record_entries fair fair_nonneg fair_sum inputSignal (a,b) (d,j)]69 by_cases h : a=d <;> by_cases g : c=b ∧ k=j <;> simp [h,g,fair]7071private theorem input_average :72 mat stateBC = copyMap id * avgMat inputSignal * (copyMap id).conjTranspose := by73 ext ⟨b,c⟩ ⟨j,k⟩74 change (∑ a : Bit, state.1 ((a,b),c) ((a,j),k)) = _75 rw [copy_entries, avg_entries]76 have hblock (a : Bit) := state_encoded_blocks a a (b,c) (j,k)77 simp only [ite_true,encoded_entries] at hblock78 simp only [hblock,id_eq]79 by_cases h : c=b ∧ k=j <;> simp [h]8081private theorem output_record : recMat outputSignal = mat stateAB := by82 rw [show mat stateAB = _ from marginal_matrices.1]83 ext ⟨a,b⟩ ⟨d,j⟩84 rw [show recMat outputSignal (a,b) (d,j) = _ from85 record_entries fair fair_nonneg fair_sum outputSignal (a,b) (d,j)]86 simp only [output_weights]87 fin_cases a <;> fin_cases b <;> fin_cases d <;> fin_cases j <;>88 norm_num [fair,abWeight,Matrix.diagonal_apply]8990private theorem output_average : avgMat outputSignal = mat stateB := by91 rw [show mat stateB = _ from marginal_matrices.2.1]92 ext b j93 rw [avg_entries, Fin.sum_univ_two]94 change (1/2:ℂ)*mat (outputSignal 0) b j + (1/2:ℂ)*mat (outputSignal 1) b j = _95 rw [show mat (outputSignal 0) = _ from output_weights 0,96 show mat (outputSignal 1) = _ from output_weights 1]97 fin_cases b <;> fin_cases j <;> norm_num [Matrix.diagonal_apply]9899/-- The conditional subentropies on the very ensembles used for guessing100have the same difference as the three-qubit SSA deficit. -/101theorem conditional_difference_eq_deficit :102 conditionalSubentropy fair fair_nonneg fair_sum outputSignal -103 conditionalSubentropy fair fair_nonneg fair_sum inputSignal = deficit := by104 have hrecord : matrixSubentropy (mat state) = matrixSubentropy (recMat inputSignal) := by105 rw [input_record, matrixSubentropy_isometric_embedding _ _ (copy_isometry _)]106 have havg : matrixSubentropy (mat stateBC) = matrixSubentropy (avgMat inputSignal) := by107 rw [input_average, matrixSubentropy_isometric_embedding _ _ (copy_isometry _)]108 change matrixSubentropy (recMat outputSignal) - matrixSubentropy (avgMat outputSignal) -109 (matrixSubentropy (recMat inputSignal) - matrixSubentropy (avgMat inputSignal)) = _110 rw [output_record,output_average,← hrecord,← havg]111 unfold deficit subentropy112 ring113114end SubentropyCertificates.QuantumCounterexample
Axioms used
Choose a statement to see which axioms its proof uses.