openfermion.circuits.bogoliubov_transform

Perform a Bogoliubov transformation.

Main aliases

openfermion.bogoliubov_transform, openfermion.circuits.primitives.bogoliubov_transform

Used in the notebooks

This circuit performs the transformation to a basis determined by a new set of fermionic ladder operators. It performs the unitary U such that

UapU1=bp

where the ap are the original creation operators and the bp 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×N matrix, then the bp are given by

bp=Nq=1Wpqaq.

If W is an N×2N matrix, then the bp 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.