openfermion.circuits.gaussian_state_preparation_circuit
Obtain the description of a circuit which prepares a fermionic Gaussian state.
openfermion.circuits.gaussian_state_preparation_circuit(
quadratic_hamiltonian, occupied_orbitals=None, spin_sector=None
)
Used in the notebooks
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\).
Args |
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):
The occupied orbitals to start with. This describes the
initial state that the circuit should be applied to: it should
be a Slater determinant (in the computational basis) with these
orbitals filled.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-04-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."]]