tqec.circuit.operations.measurement.Measurement

class Measurement(qubit: GridQubit, offset: int)[source]

A unique representation for each measurement in a quantum circuit.

This class aims at being able to represent measurements in a quantum circuit in a unique and easily usable way.

Note

This is not a global representation as the offset is always relative to the end of the quantum circuit considered.

qubit

qubit on which the represented measurement is performed.

Type:

cirq.devices.grid_qubit.GridQubit

offset

negative offset representing the number of measurements performed on the provided qubit after the represented measurement. A value of -1 means that the represented measurement is the last one applied on qubit.

Type:

int

Raises:

TQECException – if the provided offset is not strictly negative.

__init__(qubit: GridQubit, offset: int) None

Methods

__init__(qubit, offset)

map_qubit(qubit_map)

offset_spatially_by(x, y)

offset_temporally_by(t)

Attributes

qubit

offset