deltakit.circuit.Detector#

class deltakit.circuit.Detector(measurements: MeasurementRecord | Iterable[MeasurementRecord], coordinate: Iterable[float] | None = None, *, tag: str | None = None)#

Bases: object

Annotates that a set of measurements can be used to detect errors, because the set’s parity should be deterministic.

Parameters:
  • measurements (MeasurementRecord | Iterable[MeasurementRecord]) – The measurements that this is the detectors of.

  • coordinate (Iterable[float] | None) – An optional coordinate to associate with this detector.

  • tag (str | None) – An optional instruction tag.

Methods#

Detector.permute_stim_circuit

Updates stim_circuit with the stim circuit which specifies this single detector.

Detector.transform_coordinates

Transform this detectors coordinates according to the coordinate mapping.