|View source on GitHub|
Perform a Bogoliubov transformation.
openfermion.circuits.bogoliubov_transform( qubits: Sequence[cirq.Qid], transformation_matrix: numpy.ndarray, initial_state: Optional[Union[int, Sequence[int]]] = None ) -> cirq.OP_TREE
Used in the notebooks
|Used in the tutorials|
This circuit performs the transformation to a basis determined by a new set of fermionic ladder operators. It performs the unitary $U$ such that
where the $a^\dagger_p$ are the original creation operators and the
$b^\dagger_p$ are the new creation operators. The new creation
operators are linear combinations of the original ladder operators with
coefficients given by the matrix
transformation_matrix, which will be
referred to as $W$ in the following.
If $W$ is an $N \times N$ matrix, then the $b^\dagger_p$ are given by
If $W$ is an $N \times 2N$ matrix, then the $b^\dagger_p$ are given by
This algorithm assumes the Jordan-Wigner Transform.
||The qubits to which to apply the circuit.|
||The matrix $W$ holding the coefficients that describe the new creation operators in terms of the original ladder operators. Its shape should be either $NxN$ or $Nx(2N)$, where $N$ is the number of qubits.|
||Optionally specifies a computational basis state to assume that the qubits start in. This assumption enables optimizations that result in a circuit with fewer gates. This can be either an integer or a sequence 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 sequence 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.|