Finite-subspace variational method (source code)

= Finite-subspace variational method

For an orthonormal trial set $\phi_1,\ldots,\phi_N$, the Rayleigh quotient on their span is
$$
\frac{\alpha^\dagger\mathcal H\alpha}{\alpha^\dagger\alpha},
\qquad
\mathcal H_{nm}=\langle\phi_n|H|\phi_m\rangle.
$$
Its minimum is the smallest eigenvalue of $\mathcal H$, which is therefore the optimal variational upper bound available in that trial subspace.