DEMSampler#
-
class cuquantum.
stabilizer. DEMSampler( - dem: Any,
- max_shots: int,
- options: Options | None = None,
- stream: int | Stream | None = None,
- *,
- package: Literal['numpy', 'cupy'] = 'cupy',
- seed: int | None = None,
High-level sampler that takes a
stim.DetectorErrorModeldirectly.Parses the DEM into a binary matrix and probability array, then delegates to
BitMatrixSparseSampler.Methods
- __init__(
- dem: Any,
- max_shots: int,
- options: Options | None = None,
- stream: int | Stream | None = None,
- *,
- package: Literal['numpy', 'cupy'] = 'cupy',
- seed: int | None = None,
- get_detector_samples(
- bit_packed: bool = True,
Retrieve detector outcomes from the last
sample()call.- Parameters:
bit_packed – If
True, return a bit-packeduint8array; otherwise return an unpacked denseuint8array.
- get_errors(
- **kwargs,
Retrieve sampled errors as
BitMatrixCSRfrom the lastsample()call.