subroutine end_exact_spectrum() deallocate(eigv_ed) deallocate(hamiltonian) end subroutine end_exact_spectrum