The Hilbert–Schmidt inner product on matrices #
The Hilbert–Schmidt (Frobenius) inner product of two complex matrices is
⟪A, B⟫ = Tr[Aᴴ B]. Mathlib equips Matrix with the Frobenius norm but not (as a
global instance) with this inner product, so this quantum-free helper records the
plain bilinear data needed downstream: conjugate symmetry, sesquilinearity, and — the
key fact for the Lie-algebraic variance formula — multiplicativity over the
Kronecker product, ⟪A ⊗ C, B ⊗ D⟫ = ⟪A, B⟫ · ⟪C, D⟫.
(The genuine InnerProductSpace structure, when needed for Gram–Schmidt / orthonormal
bases, is obtained separately by transport along the linear isometry to
EuclideanSpace ℂ (m × m).)
The Hilbert–Schmidt (Frobenius) inner product ⟪A, B⟫ = Tr[Aᴴ B]. Conjugate-linear
in the first argument, linear in the second.
Equations
- QuantumAlg.hsInner A B = (A.conjTranspose * B).trace
Instances For
For Hermitian arguments the Hilbert–Schmidt inner product is symmetric.
For Hermitian arguments the Hilbert–Schmidt inner product is real.
The matrix units single i j 1 are Hilbert–Schmidt orthonormal.