Fully working state-density evaluation for give density matrix.