Pratik Patil

CounterexampleState.lean

1module23public import D5.S3.Quantum.Information.InputInformationBalance4public import D5.S3.Quantum.Subentropy.DensityKernel56/-! The classical binary label and its two pure qubit-pair signals. The7columns below omit the common normalization. Their squared norm is five,8so the equal prior gives the multiplier 1/10 in the density matrix. -/9@[expose] public section10noncomputable section11set_option autoImplicit false12set_option backward.isDefEq.respectTransparency false13open Matrix14open scoped ComplexOrder MatrixOrder BigOperators15namespace SubentropyCertificates.QuantumCounterexample16open D5.S3.Quantum.Foundation.FiniteStateChannel17open D5.S3.Quantum.Information.PartialTraceMutualInformation18open D5.S3.Quantum.Information.InputInformationBalance1920local notation "conjTwo" => (map_ofNat (starRingEnd ℂ) 2)2122abbrev Bit := Fin 223abbrev ABC := (Bit × Bit) × Bit2425def signals : Matrix (Bit × Bit) Bit ℂ := fun (b,c) a =>26  if b = c then (if b = a then 2 else 1) else 02728def labelled : Matrix ABC Bit ℂ := fun ((a,b),c) j =>29  if a = j then signals (b,c) j else 03031def mixture {D : Type*} [Fintype D] (V : Matrix D Bit ℂ) : Matrix D D ℂ :=32  (1/10 : ℝ) • (V * V.conjTranspose)3334def state : DensityState ABC := by35  refine ⟨CStarMatrix.ofMatrix (mixture labelled), ?_, ?_⟩36  · apply map_nonneg CStarMatrix.ofMatrixStarAlgEquiv37    exact ((Matrix.posSemidef_self_mul_conjTranspose labelled).smul38      (by norm_num : (0 : ℝ) ≤ 1/10)).nonneg39  · change (mixture labelled).trace = 140    norm_num [Matrix.trace, Fintype.sum_prod_type, Fin.sum_univ_two, mixture,41      labelled, signals, Matrix.mul_apply, Matrix.conjTranspose_apply, Complex.real_smul, conjTwo]4243/-- In the computational basis the diagonal label blocks are the two44rank-one signal matrices with the common factor 1/10. -/45theorem state_entries (a d : Bit) (u v : Bit × Bit) :46    state.1 ((a,u.1),u.2) ((d,v.1),v.2) =47      if a=d then (1/10 : ℂ)*signals u a*star (signals v a) else 0 := by48  change mixture labelled ((a,u.1),u.2) ((d,v.1),v.2) = _49  fin_cases a <;> fin_cases d <;>50    simp [mixture, labelled, Matrix.mul_apply, Matrix.conjTranspose_apply,51      Complex.real_smul, mul_assoc]5253def stateAB := marginalRight state54def stateB := marginalLeft stateAB55def stateBC := marginalLeft (relabel (Equiv.prodAssoc Bit Bit Bit).symm state)5657def abWeight : Bit × Bit → ℝ := fun (a,b) => if a = b then 2/5 else 1/105859/-- The marginals here are obtained by partial trace of the bundled witness. -/60theorem marginal_matrices :61    CStarMatrix.ofMatrix.symm stateAB.1 = diagonal (fun i => (abWeight i : ℂ)) ∧62    CStarMatrix.ofMatrix.symm stateB.1 = diagonal (fun _ => (1/2 : ℂ)) ∧63    CStarMatrix.ofMatrix.symm stateBC.1 = mixture signals := by64  have hab : partialTraceRight (mixture labelled) = diagonal (fun i => (abWeight i : ℂ)) := by65    ext ⟨a,b⟩ ⟨j,k⟩66    fin_cases a <;> fin_cases b <;> fin_cases j <;> fin_cases k <;>67      norm_num [partialTraceRight, mixture, labelled, signals, abWeight, Matrix.mul_apply,68        Matrix.conjTranspose_apply, Fin.sum_univ_two, Complex.real_smul, Matrix.diagonal_apply, conjTwo]69  refine ⟨hab, ?_, ?_⟩70  · change partialTraceLeft (partialTraceRight (mixture labelled)) = _71    rw [hab]72    ext b c73    fin_cases b <;> fin_cases c <;>74      norm_num [partialTraceLeft, Fin.sum_univ_two, Matrix.diagonal_apply, abWeight]75  · ext ⟨b,c⟩ ⟨j,k⟩76    change (∑ a : Bit, mixture labelled ((a,b),c) ((a,j),k)) = mixture signals (b,c) (j,k)77    fin_cases b <;> fin_cases c <;> fin_cases j <;> fin_cases k <;>78      norm_num [mixture, labelled, signals, Matrix.mul_apply, Fin.sum_univ_two,79        Matrix.conjTranspose_apply, Complex.real_smul]8081/-- Small Gram matrices of the labelled and unlabelled signals. -/82theorem signal_grams :83    labelled.conjTranspose * labelled = diagonal (fun _ => (5 : ℂ)) ∧84    signals.conjTranspose * signals = (fun i j => if i=j then (5 : ℂ) else 4) := by85  constructor <;> ext i j <;> fin_cases i <;> fin_cases j <;>86    norm_num [Matrix.mul_apply, Matrix.conjTranspose_apply, labelled, signals,87      Fintype.sum_prod_type, Fin.sum_univ_two, Matrix.diagonal_apply, conjTwo]8889end SubentropyCertificates.QuantumCounterexample

Axioms used

Choose a statement to see which axioms its proof uses.