A.1 Final Form for the Gradient Finally, we can write down the electronic gradient. A CASSCF ansatz is a function of coefficients and orbital rotations. The gradients with respect to coefficients are easy to extract; one merely diagonalizes the Hamiltonian for a fixed set of orbitals. As far as the optimization of the orbitals is concerned, as for any CASSCF calculation, there are 6 classes of orbital rotations (see a schematic matrix below):