cirq.measure_single_paulistring

Returns a single PauliMeasurementGate which measures the pauli observable

Used in the notebooks

Used in the tutorials

pauli_observable The cirq.PauliString observable to measure.
key Optional str or cirq.MeasurementKey that gate should use. If none provided, it defaults to a comma-separated list of str(qubit) for each of the target qubits.

An operation measuring the pauli observable.

ValueError if the observable is not an instance of PauliString or if the coefficient is not +1 or -1.