openfermion.circuits.bogoliubov_transform

Perform a Bogoliubov transformation.

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

\[ U a^\dagger_p U^{-1} = b^\dagger_p \]

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

\[ b^\dagger_p = \sum_{q=1}^N W_{pq} a^\dagger_q. \]

If \(W\) is an \(N \times 2N\) matrix, then the \(b^\dagger_p\) are given by

$$ b^\daggerp = \sum{q=1}^N W_{pq} a^\dagger_q

              + \sum_{q=N+1}^{2N} W_{pq} a_q.

$$

This algorithm assumes the Jordan-Wigner Transform.

qubits The qubits to which to apply the circuit.
transformation_matrix 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.
initial_state 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.