# cirq.PauliStringPhasor¶

class cirq.PauliStringPhasor(pauli_string: cirq.ops.pauli_string.PauliString, *, exponent_neg: Union[int, float, sympy.core.basic.Basic] = 1, exponent_pos: Union[int, float, sympy.core.basic.Basic] = 0)[source]

An operation that phases the eigenstates of a Pauli string.

The -1 eigenstates of the Pauli string will have their amplitude multiplied
by e^(i pi exponent_neg) while +1 eigenstates of the Pauli string will have
their amplitude multiplied by e^(i pi exponent_pos).
__init__(pauli_string: cirq.ops.pauli_string.PauliString, *, exponent_neg: Union[int, float, sympy.core.basic.Basic] = 1, exponent_pos: Union[int, float, sympy.core.basic.Basic] = 0) → None[source]

Initializes the operation.

Parameters
• pauli_string – The PauliString defining the positive and negative eigenspaces that will be independently phased.

• exponent_neg – How much to phase vectors in the negative eigenspace, in the form of the t in (-1)**t = exp(i pi t).

• exponent_pos – How much to phase vectors in the positive eigenspace, in the form of the t in (-1)**t = exp(i pi t).

Methods

 controlled_by(*control_qubits[, control_values]) Returns a controlled version of this operation. If no control_qubits map_qubits(qubit_map) Return an equivalent operation on new qubits with its Pauli string pass_operations_over(ops[, after_to_before]) Returns the same operation, but with different qubits. validate_args(qubits) Raises an exception if the qubits don’t match this operation’s qid with_qubits(*new_qubits) Returns the same operation, but applied to different qubits. with_tags(*new_tags) Creates a new TaggedOperation, with this op and the specified tags.

Attributes

 exponent_relative gate qubits tags Returns a tuple of the operation’s tags. untagged Returns the underlying operation without any tags.