openfermion.transforms.taper_off_qubits
Remove qubits from given operator.
openfermion.transforms.taper_off_qubits(
operator,
stabilizers,
manual_input=False,
fixed_positions=None,
output_tapered_positions=False
)
Qubits are removed by eliminating an equivalent number of
stabilizer conditions. Which qubits that are can either be determined
automatically or their positions can be set manually.
Qubits can be disregarded from the Hamiltonian when the effect of all its
terms on them is rendered trivial. This algorithm employs a stabilizers
like \(\pm X \otimes p\) to fix the action of every Pauli
string on the first qubit to \(Z\) or the identity. A string
\(X \otimes h\) would for instance be multiplied with the stabilizer
to obtain \(1 \otimes (\pm h\cdot p)\) while a string
\(Z \otimes h^\prime\) would pass without correction. The first
qubit can subsequently be removed as it must be in the computational basis
in Hamiltonian eigenstates.
For stabilizers acting as \(Y\) (\(Z\)) on selected qubits,
the algorithm would fix the action of every Hamiltonian string to
\(Z\) (\(X\)). Updating also the list of remaining stabilizer
generators, the algorithm is run iteratively.
Args |
operator
|
QubitOperator
Operator of which qubits will be removed.
|
stabilizers
|
QubitOperator
Stabilizer generators for the tapering.
Can also be passed as a list of
QubitOperator.
|
manual_input
|
Boolean
Option to pass the list of fixed qubits
positions manually. Set to False by default.
|
fixed_positions
|
list
(optional) List of fixed qubit positions.
Passing a list is only effective if
manual_input is True.
|
output_tapered_positions
|
Boolean
Option to output the positions of
qubits that have been removed.
|
Returns |
skimmed_operator
|
QubitOperator
Operator with fewer qubits.
|
removed_positions
|
list
(optional) List of removed qubit positions.
For the qubits to be gone in the qubit count,
the remaining qubits have been moved up to
those indices.
|
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 2024-04-26 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 2024-04-26 UTC."],[],[]]