Partial traces on raw matrices #
This module defines the partial trace of an operator on a bipartite system nA ⊗ nB, working
directly with raw Matrix (nA × nB) (nA × nB) ℂ (no density-matrix wrapper). We record that the
partial trace preserves the total trace, is Hermitian on Hermitian inputs, and — the operative
fact for quantum information — sends positive semidefinite operators to positive semidefinite
operators.
The positivity is proved through an explicit completely positive decomposition: Tr_B M is the
sum over j of the compressions of M to the j-th block, i.e. the conjugations of M by the
block-inclusion isometries Eⱼᴴ : i ↦ (i, j). Each compression is positive semidefinite
(Matrix.PosSemidef.submatrix), and a finite sum of positive semidefinite matrices is positive
semidefinite. This is the Kraus / Stinespring picture of the partial trace as a CP map.
The partial trace over B of a Hermitian operator is Hermitian.
The partial trace over A of a Hermitian operator is Hermitian.
Completely positive (compression) decomposition #
Tr_B M = ∑ⱼ M.submatrix (· ↦ (·, j)) (· ↦ (·, j)): the partial trace is the sum of the
compressions of M to the diagonal j-th blocks. The reindexing map a ↦ (a, j) is the
block-inclusion isometry, and M.submatrix e e is the conjugation Eᴴ M E; this is exactly the
Kraus form of the partial trace, written without matrix multiplication.
The partial trace over B of a positive semidefinite operator is positive semidefinite.
The partial trace over A of a positive semidefinite operator is positive semidefinite.