cirq.SingleQubitPauliStringGateOperation

class cirq.SingleQubitPauliStringGateOperation(pauli: cirq.ops.pauli_gates.Pauli, qubit: cirq.Qid)[source]

A Pauli operation applied to a qubit.

Satisfies the contract of both GateOperation and PauliString. Relies
implicitly on the fact that PauliString({q: X}) compares as equal to
GateOperation(X, [q]).
__init__(pauli: cirq.ops.pauli_gates.Pauli, qubit: cirq.Qid)[source]
Args:
gate: The gate to apply.
qubits: The qubits to operate on.

Methods

conjugated_by(clifford)

Returns the Pauli string conjugated by a clifford operation.

controlled_by(*control_qubits[, control_values])

Returns a controlled version of this operation. If no control_qubits

dense(qubits)

Returns a cirq.DensePauliString version of this Pauli string.

equal_up_to_coefficient(other)

expectation_from_density_matrix(state, …)

Evaluate the expectation of this PauliString given a density matrix.

expectation_from_wavefunction(state, …[, …])

Evaluate the expectation of this PauliString given a wavefunction.

get(key[, default])

items()

keys()

map_qubits(qubit_map)

pass_operations_over(ops[, after_to_before])

Determines how the Pauli string changes when conjugated by Cliffords.

to_z_basis_ops()

Returns operations to convert the qubits to the computational basis.

transform_qubits(func)

Returns the same operation, but with different qubits.

validate_args(qubits)

Raises an exception if the qubits don’t match this operation’s qid

values()

with_gate(new_gate)

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.

zip_items(other)

zip_paulis(other)

Attributes

coefficient

gate

The gate applied by the operation.

pauli

qubit

qubits

The qubits targeted by the operation.

tags

Returns a tuple of the operation’s tags.

untagged

Returns the underlying operation without any tags.