qml.qchem.hf_state

hf_state(electrons, orbitals)[source]

Generates the occupation-number vector representing the Hartree-Fock state.

The many-particle wave function in the Hartree-Fock (HF) approximation is a Slater determinant. In Fock space, a Slater determinant for \(N\) electrons is represented by the occupation-number vector:

\[\begin{split}\vert {\bf n} \rangle = \vert n_1, n_2, \dots, n_\mathrm{orbs} \rangle, n_i = \left\lbrace \begin{array}{ll} 1 & i \leq N \\ 0 & i > N \end{array} \right.,\end{split}\]

where \(n_i\) indicates the occupation of the \(i\)-th orbital.

Parameters
  • electrons (int) – Number of electrons. If an active space is defined, this is the number of active electrons.

  • orbitals (int) – Number of spin orbitals. If an active space is defined, this is the number of active spin-orbitals.

Returns

NumPy array containing the vector \(\vert {\bf n} \rangle\)

Return type

array

Example

>>> state = hf_state(2, 6)
>>> print(state)
[1 1 0 0 0 0]