openfermion.hamiltonians.HartreeFockFunctional

Implementation of the objective function code for Restricted Hartree-Fock

The object transforms a variety of input types into the appropriate output. It does this by analyzing the type and size of the input based on its knowledge of each type.

one_body_integrals integrals in the atomic orbital basis for the one-body potential.
two_body_integrals integrals in the atomic obrital basis for the two-body potential ordered according to phi{p}(r1)^{*}phi{q}^{*}(r2) x phi{r}(r2)phi{s}(r1)
overlap overlap integrals in the atomic orbital basis
n_electrons number of electrons total
model Optional flag for performing restricted-, unrestricted-, or generalized- hartree-fock.
nuclear_repulsion Optional nuclear repulsion term. Energy is shifted by this amount. default is 0.
initial_orbitals Method for producing the initial orbitals from the atomic orbitals. Default is defining the core orbitals.

Methods

energy_from_rhf_opdm

View source

Compute the energy given a spin-up opdm

Args
opdm_aa spin-up opdm. Should be an n x n matrix where n is the number of spatial orbitals

Returns: RHF energy

rdms_from_rhf_opdm

View source

Generate spin-orbital InteractionRDM object from the alpha-spin opdm.

Args
opdm_aa single spin sector of the 1-particle denstiy matrix

Returns: InteractionRDM object for full spin-orbital 1-RDM and 2-RDM

rhf_global_gradient

View source

Compute rhf global gradient

Args
params rhf-parameters for rotation matrix.
alpha_opdm 1-RDM corresponding to results of basis rotation parameterized by `params'.

Returns: gradient vector the same size as the input `params'