Wrong factor of 2 in density matrix corrected