The von Neumann entropy of a positive semidefinite matrix with matrix trace 1 is
Such a matrix is a density matrix. If are its eigenvalues,
then
where
is defined to be 0. Thus von Neumann entropy is the Shannon
entropy of the distribution of the eigenvalues.
It is zero when
has matrix rank 1 and is at most
, with equality for
. Base 2 gives entropy in bits,
while base
gives entropy in nats.