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:
- Native
dict-based model viaDictNoiseModel, which natively handles bothListPhysicalCircuitandSTIMPhysicalCircuitinputs. It does not requireloqs[stim]itself, but itsSTIMPhysicalCircuit-specific behavior does requireloqs[stim]. ExplicitOpModelandImplicitOpModelviaPyGSTiNoiseModel(requiresloqs[pygsti])
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(' |