Solution (source code)

= Solution

Orthogonality of the determinants gives $\langle\Phi^{(1)}|\Phi^{(1)}\rangle=1+O(\lambda^2)$. To first order the normalized energy is therefore
$$
E^{(1)}=E_0+2\sum_{ia}\lambda_i^a
\langle\Phi_0|\hat H|\Phi_i^a\rangle+O(\lambda^2).
$$
<Slater-Condon rules> give the matrix element as the occupied-virtual Fock element
$$
F_{ia}=h_{ia}+\sum_{j\ {\rm occ}}
\left(\langle ij|aj\rangle-\langle ij|ja\rangle\right).
$$
Stationarity for independently variable real $\lambda_i^a$ requires every $F_{ia}=0$. This is <Brillouin's theorem>. Because $F$ is Hermitian, occupied and virtual blocks can separately be diagonalized; canonical orbitals then satisfy $\hat F\phi_p=\gamma_p\phi_p$.