Skip to content

loqs.backends.model

Noise model backend classes.

For LoQS, a noise model is a mapping from a circuit label (i.e. gate name and target qubits) into some operator representation that can be applied to a state. We need some way to enforce that a model's output can act on a state. GateRep is the abstract base class for representations that can be used for gates. Similarly, InstrumentRep is the abstract base class for representations that can be used for quantum instruments (often used to describe midcircuit measurements).

The model backend interface is enforced by the abstract BaseNoiseModel class, which generally has the capabilities:

  • Property getters for:
  • Allowed input circuit types
  • Output representation types
  • Representation getter that converts a circuit into a list of gate/instrument representations

The packages currently available as noise models:

Warning

For backends that depend on optional third-party packages, it is recommended to not import from the module/class file directly. Instead, try to import from backends, which dynamically checks if that backend is available.

Attributes

Name Type Value Doc
STIMDictNoiseModel make_legacy_construction_shim('STIMDictNoiseModel', build=build_legacy_stim_dict_model, message='STIMDictNoiseModel is deprecated; DictNoiseModel now natively handles STIM circuits. Constructing a DictNoiseModel on your behalf for now.')