openfermion.circuits.bogoliubov_transform
Perform a Bogoliubov transformation.
View aliases
Main aliases
openfermion.bogoliubov_transform
, openfermion.circuits.primitives.bogoliubov_transform
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
This circuit performs the transformation to a basis determined by a new set
of fermionic ladder operators. It performs the unitary U such that
Ua†pU−1=b†p
where the a†p are the original creation operators and the
b†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×N matrix, then the b†p are
given by
b†p=N∑q=1Wpqa†q.
If W is an N×2N matrix, then the b†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.
Args |
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-12 UTC."],[],[]]