fixed output of test/spin_hamiltonian.cpp