Save the hamiltonian before calculating the eigenvalues.