View source on GitHub |
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 \(\eta \times N\) matrix \(Q\) with orthonormal rows, where \(\eta\) is the particle number and \(N\) is the total number of modes. The state corresponding to this matrix is
\[ b^\dagger_1 \cdots b^\dagger_{\eta} \lvert \text{vac} \rangle, \]
where
\[ 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.