module public import SubentropyCertificates.CalibratedDefinitions /-! Rectangular Gram conversion with a common ancillary matrix factor. -/ @[expose] public section noncomputable section open Matrix open scoped Kronecker ComplexOrder MatrixOrder Matrix.Norms.L2Operator namespace SubentropyCertificates.AncillaCalibration open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState) open D5.S3.Quantum.Information.PartialTraceMutualInformation (density_posSemidef) open D5.S3.Quantum.Subentropy.Basic open SubentropyCertificates.BinarySpectra (densityMatrix) /-- Tensoring a Gram factor with the ancillary square root converts both rectangular Gram products at once, including for an ancillary density with a kernel. -/ theorem calibrated_rectangular_gram {C I J : Type*} [Fintype C] [DecidableEq C] [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (ν : DensityState C) (V : Matrix I J ℂ) : matrixSubentropy ((V.conjTranspose * V) ⊗ₖ densityMatrix ν) = matrixSubentropy ((V * V.conjTranspose) ⊗ₖ densityMatrix ν) := by let S := CFC.sqrt (densityMatrix ν) have hh : S.conjTranspose = S := (CFC.sqrt_nonneg _).isSelfAdjoint.star_eq have hs : S * S = densityMatrix ν := CFC.sqrt_mul_sqrt_self _ (density_posSemidef ν).nonneg simpa only [Matrix.conjTranspose_kronecker, ← Matrix.mul_kronecker_mul, hh, hs] using matrixSubentropy_rectangular_gram (V ⊗ₖ S) end SubentropyCertificates.AncillaCalibration