openfermion.transforms.rotate_qubit_by_pauli
Rotate qubit operator by exponential of Pauli.
openfermion.transforms.rotate_qubit_by_pauli(
qop, pauli, angle
)
Perform the rotation e^{-i \theta * P}Qe^{i \theta * P}
on a qubitoperator Q and a Pauli operator P.
Args |
qop
|
the QubitOperator to be rotated
|
pauli
|
a single Pauli operator - a QubitOperator with
a single term, and a coefficient equal to 1.
|
angle
|
the angle to be rotated by.
|
Returns |
rotated_op - the rotated QubitOperator following the
above formula.
|
Raises |
TypeError
|
qop must be a QubitOperator
|
TypeError
|
pauli must be a Pauli Operator (QubitOperator
with single term and coefficient equal to 1).
|
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."],[],[]]