|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
The algorithm used is described in arXiv:1711.05395. It assumes the Jordan-Wigner transform.
||The qubits to which to apply the circuit.|
||The matrix $Q$ which describes the Slater determinant to be prepared.|
||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.|