openfermion.transforms.freeze_orbitals

Fix some orbitals to be occupied and others unoccupied.

Removes all operators acting on the specified orbitals, and optionally renumbers the remaining orbitals to eliminate unused indices. The sign of each term is modified according to the ladder operator anti-commutation relations in order to preserve the expectation value of the operator.

occupied A list containing the indices of the orbitals that are to be assumed to be occupied.
unoccupied A list containing the indices of the orbitals that are to be assumed to be unoccupied.
prune A flag that determines whether the orbitals will be renumbered to eliminate unused indices.