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).
|