![]() |
Prepare a Slater determinant from a computational basis state.
openfermion.circuits.prepare_slater_determinant(
qubits: Sequence[cirq.Qid],
slater_determinant_matrix: numpy.ndarray,
initial_state: Union[int, Sequence[int]] = 0
) -> cirq.OP_TREE
A Slater determinant is described by an :math:\eta \times N
matrix
:math:Q
with orthonormal rows, where :math:\eta
is the particle number
and :math:N
is the total number of modes. The state corresponding to this
matrix is
.. math::
b^\dagger_1 \cdots b^\dagger_{\eta} \lvert \text{vac} \rangle,
where
.. math::
b^\dagger_j = \sum_{k = 1}^N Q_{jk} a^\dagger_k.
The algorithm used is described in arXiv:1711.05395. It assumes the Jordan-Wigner transform.
Args | |
---|---|
qubits
|
The qubits to which to apply the circuit. |
slater_determinant_matrix
|
The matrix :math:Q which describes the
Slater determinant to be prepared.
|
initial_state
|
The computational basis state that the qubits start in. This can be either an integer or a container of integers. If an integer, it is mapped to a computational basis state via "big endian" ordering of the binary representation of the integer. For example, the computational basis state on five qubits with the first and second qubits set to one is 0b11000, which is 24 in decimal. If a container of integers, then it contains the indices of the qubits that are set to one (indexing starts from 0). For example, the list [2, 3] represents qubits 2 and 3 being set to one. Default is 0, the all zeros state. |