Van Vleck perturbation theory, following Shavitt and Redmon, but excluding the quasi-degenerate split.
E0 - eigenvalues of H0, a column vector of real numbers H1 - perturbation, written in the basis that di- agonalises H0 order - order of perturbation theory to be used, 5 is the maximum available
Ep - eigenvalues of H0+H1 to the specified order, a column vector of reals, not necessarily sorted in the same way as the input G - Van Vleck transformation generator, such that expm(G) is a square unitary matrix with eigen- vectors in columns, in the same order as the eigenvalues in Ep
There must be no degeneracies in H0; H1 must be Hermitian, the theory only converges when norm(H1,2) is much than the smallest energy gap in H0; complexity is linear in the order and cubic in the matrix dimension
Version 2.6, authors: Ilya Kuprov