detector_experiment#
Full path: iqm.qrisp_iqm.qec.detector_experiment
DetectorExperiment — zero-boilerplate QEC detector experiments.
Wraps a Jasp-traceable quantum function that returns detector and observable parity checks, and automates the full LER workflow:
Trace the function → Stim circuit with detector error model (DEM)
Sample via Stim or any hardware backend
Decode with PyMatching
Compare predictions against observables → logical error rate
Also provides batched hardware submission and circuit extraction (to Stim / to IQM) for inspection and visualisation.
Usage#
@DetectorExperiment
def my_experiment(*args):
...
return detectors, observables
# Pure Stim (fast)
ler = my_experiment.compute_LER(arg, shots=10_000)
# With a hardware backend
ler = my_experiment.compute_LER(arg, shots=10_000, backend=backend)
Classes
Decorator that turns a Jasp function into a detector-experiment handle. |
Inheritance
