  In a previous work (arXiv:2010.02027) we showed how the full configuration
interaction (FCI) ground state energy can be obtained as a functional of an
arbitrary reference wavefunction by means of a gradient descent or quasi-Newton
algorithm. Here, we extend this approach and consider the optimization of the
low-energy subspace of the Hamiltonian from an arbitrary reference subspace.
The energies along the optimization path are obtained in terms of transition
matrix elements among the states in the reference subspace. We show an
application of the algorithm with a reference subspace constructed from a
non-orthogonal configuration interaction (NOCI) formalism to describe the
avoided crossing in LiF and the low-lying singlet and triplet spectrum of
formaldehyde.
