deltakit.core.decoding_graphs.DemParser#

class deltakit.core.decoding_graphs.DemParser(error_handler: EH, detector_handler: DH, observable_handler: ObservableHandler = <function observable_warning>)#

Bases: Generic[EH, DH]

Class which handles parsing a detector error model. This class tracks the detector and coordinate offsets as member data while parsing and passes this information into the relevant handlers.

The error handler is a function which takes a “error” type DEM instruction and the current detector offset and tracks the state of the errors.

The detector handler is a function which takes a “detector” type DEM instruction, the current detector offset and the coordinate offset and tracks the detectors.

Methods#

DemParser.parse

Parse a detector error model using the given error and detector handlers.