deltakit.circuit.gates.OneQubitMeasurementGate#

class deltakit.circuit.gates.OneQubitMeasurementGate(qubit: Qubit[T] | T, probability: float = 0.0, invert: bool = False, *, tag: str | None = None)#

Bases: OneQubitGate[T]

Gate for the abstract single qubit measurement gate.

Parameters:

qubit (Qubit[T] | T) – The qubit that this gate acts on.

stim_string#

The string that stim associates to this gate.

Type:

str

basis#

The basis for the measurement.

Type:

PauliBasis

Methods#

OneQubitMeasurementGate.approx_equals

Determine whether two measurement gates are approximately equal within a tolerance.

OneQubitMeasurementGate.stim_targets

Convert the qubits this gate acts on to equivalent stim targets.

OneQubitMeasurementGate.transform_qubits

Transform this gates's qubits according to the id mapping.