Pratik Patil

AncillaRegroup.lean

1module23public import SubentropyCertificates.MaximallyMixedBlocks4public import SubentropyCertificates.QubitTraceDistance56/-! Regrouping the ancilla and the classical label preserves the joint trace distance. -/7@[expose] public section8noncomputable section9open Matrix10open scoped BigOperators ComplexOrder MatrixOrder Kronecker1112namespace SubentropyCertificates.ConditionalContinuity13open D5.S3.Quantum.Foundation.FiniteStateChannel14open D5.S3.Quantum.Information.PartialTraceMutualInformation15open SubentropyCertificates.BinarySpectra (densityMatrix)16open SubentropyCertificates.MixedQubit (traceDistance)17open SubentropyCertificates.SpectralContinuity (maximallyMixed)1819variable {D X : Type*} [Fintype D] [DecidableEq D] [Fintype X] [DecidableEq X]2021/-- Joint trace distance is unchanged by a simultaneous permutation of both state matrices,22including a reindexing between different finite coordinate types. -/23theorem traceDistance_eq_of_reindex {I J : Type*} [Fintype I] [DecidableEq I] [Fintype J]24    [DecidableEq J] (e : I ≃ J) (ρ σ : DensityState J) (τ υ : DensityState I)25    (hρ : densityMatrix ρ = reindex e e (densityMatrix τ))26    (hσ : densityMatrix σ = reindex e e (densityMatrix υ)) :27    traceDistance ρ σ = traceDistance τ υ := by28  let h := (density_posSemidef ρ).isHermitian.sub (density_posSemidef σ).isHermitian29  let k := (density_posSemidef τ).isHermitian.sub (density_posSemidef υ).isHermitian30  have hm : densityMatrix ρ - densityMatrix σ = reindex e e (densityMatrix τ - densityMatrix υ) := by31    rw [hρ,hσ]32    rfl33  have hc := congrArg Polynomial.roots34    ((congrArg Matrix.charpoly hm).trans (Matrix.charpoly_reindex e _))35  have hr := h.roots_charpoly_eq_eigenvalues.symm.trans (hc.trans k.roots_charpoly_eq_eigenvalues)36  have hs := congrArg (fun r : Multiset ℂ ↦ (r.map (fun z ↦ |z.re|)).sum) hr37  change (∑ i, |h.eigenvalues i|) / 2 = (∑ j, |k.eigenvalues j|) / 238  congr 139  simpa only [Multiset.map_map, Finset.sum_map_val, Function.comp_apply,40    RCLike.ofReal_eq_complex_ofReal, Complex.ofReal_re] using hs4142private def regroup (D X C : Type*) : (D × X) × C ≃ (D × C) × X where43  toFun z := ((z.1.1,z.2),z.1.2)44  invFun z := ((z.1.1,z.2),z.1.2)45  left_inv _ := rfl46  right_inv _ := rfl4748omit [Fintype D] [DecidableEq D] [Fintype X] in49private theorem matrix_regroup {C : Type*} (A : X → Matrix D D ℂ) (T : Matrix C C ℂ) :50    blockDiagonal (fun x ↦ A x ⊗ₖ T) =51      reindex (regroup D X C) (regroup D X C) ((blockDiagonal A) ⊗ₖ T) := by52  ext ⟨⟨i,c⟩,x⟩ ⟨⟨j,d⟩,y⟩53  change blockDiagonal _ ((i,c),x) ((j,d),y) = blockDiagonal A (i,x) (j,y) * T c d54  by_cases h : x = y55  · subst y56    simp only [blockDiagonal_apply_eq, Matrix.kroneckerMap_apply]57  · simp only [blockDiagonal_apply_ne _ _ _ h, zero_mul]5859/-- The direct sum of the tensored CQ blocks and the tensor product of the original joint60state with the ancilla give the same joint trace distance. -/61theorem traceDistance_ancilla_regroup (C : Type*) [Fintype C] [DecidableEq C] [Nonempty C]62    (A B : X → Matrix D D ℂ) (ha : ∀ x, (A x).PosSemidef) (hb : ∀ x, (B x).PosSemidef)63    (hta : (∑ x, A x).trace = 1) (htb : (∑ x, B x).trace = 1)64    (ha' : ∀ x, (A x ⊗ₖ densityMatrix (maximallyMixed C)).PosSemidef)65    (hb' : ∀ x, (B x ⊗ₖ densityMatrix (maximallyMixed C)).PosSemidef)66    (hta' : (∑ x, A x ⊗ₖ densityMatrix (maximallyMixed C)).trace = 1)67    (htb' : (∑ x, B x ⊗ₖ densityMatrix (maximallyMixed C)).trace = 1) :68    traceDistance (blockDensity (fun x ↦ A x ⊗ₖ densityMatrix (maximallyMixed C)) ha' hta')69        (blockDensity (fun x ↦ B x ⊗ₖ densityMatrix (maximallyMixed C)) hb' htb') =70      traceDistance (productState (blockDensity A ha hta) (maximallyMixed C))71        (productState (blockDensity B hb htb) (maximallyMixed C)) :=72  traceDistance_eq_of_reindex (regroup D X C) _ _ _ _73    (matrix_regroup A _) (matrix_regroup B _)7475end SubentropyCertificates.ConditionalContinuity

Axioms used

Choose a statement to see which axioms its proof uses.