made _version2int compatible with development version of Cython
test that check at that a hamiltonian is diagonal when transformed to the eigenbasis
bugfix: diagonalization fails when off diagonal elements in the hamiltonian is complex.