openfermion.circuits.gaussian_state_preparation_circuit

Obtain the description of a circuit which prepares a fermionic Gaussian

Used in the notebooks

Used in the tutorials

state.

Fermionic Gaussian states can be regarded as eigenstates of quadratic Hamiltonians. If the Hamiltonian conserves particle number, then these are just Slater determinants. See arXiv:1711.05395 for a detailed description of how this procedure works.

The circuit description is returned as a sequence of elementary operations; operations that can be performed in parallel are grouped together. Each elementary operation is either

• the string 'pht', indicating the particle-hole transformation on the last fermionic mode, which is the operator $$\mathcal{B}$$ such that

\begin{align} \mathcal{B} a_N \mathcal{B}^\dagger &= a_N^\dagger,\\ \mathcal{B} a_j \mathcal{B}^\dagger &= a_j, \quad j = 1, \ldots, N-1, \end{align}

or

• a tuple $$(i, j, \theta, \varphi)$$, indicating the operation

$\exp[i \varphi a_j^\dagger a_j] \exp[\theta (a_i^\dagger a_j - a_j^\dagger a_i)],$

a Givens rotation of modes $$i$$ and $$j$$ by angles $$\theta$$ and $$\varphi$$.

quadratic_hamiltonian(QuadraticHamiltonian): The Hamiltonian whose eigenstate is desired. occupied_orbitals(list): A list of integers representing the indices of the occupied orbitals in the desired Gaussian state. If this is None (the default), then it is assumed that the ground state is desired, i.e., the orbitals with negative energies are filled. spin_sector (optional str): An optional integer specifying a spin sector to restrict to: 0 for spin-up and 1 for spin-down. If specified, the returned circuit acts on modes indexed by spatial indices (rather than spin indices). Should only be specified if the Hamiltonian includes a spin degree of freedom and spin-up modes do not interact with spin-down modes.

Returns

circuit_description (list[tuple]):
A list of operations describing the circuit. Each operation
is a tuple of objects describing elementary operations that
can be performed in parallel. Each elementary operation
is either the string 'pht', indicating a particle-hole
transformation on the last fermionic mode, or a tuple of
the form \$$(i, j, \theta, \varphi)\$$,
indicating a Givens rotation
of modes \$$i\$$ and \$$j\$$ by angles \$$\theta\$$
and \$$\varphi\$$.
start_orbitals (list):