pub struct CompiledDemSamplingPlan { /* private fields */ }Expand description
Precomputed detector and observable layouts for repeated DEM sampling.
The plan is immutable and independent of DemHotspotEstimator, so it
remains valid even when callers mutate the estimator’s public fields.
Implementations§
Source§impl CompiledDemSamplingPlan
impl CompiledDemSamplingPlan
Sourcepub fn detector_ids(&self) -> &[i64]
pub fn detector_ids(&self) -> &[i64]
Detector ids in the packed output order.
Sourcepub fn observable_ids(&self) -> &[i64]
pub fn observable_ids(&self) -> &[i64]
Observable ids in the packed output order.
pub fn format(&self) -> DetectorBatchFormat
pub fn detail_detector_ids(&self) -> &[i64]
pub fn records_attribution(&self) -> bool
Sourcepub fn run_sampling_result_with_rng(
&self,
shots: usize,
rng: &mut SmallRng,
) -> NpResult<DemSamplingResult>
pub fn run_sampling_result_with_rng( &self, shots: usize, rng: &mut SmallRng, ) -> NpResult<DemSamplingResult>
Sample syndrome, observable truth, optional detector detail, and an optional attribution trace in a single RNG pass.
Sourcepub fn run_packed_shot_batch_with_rng(
&self,
shots: usize,
rng: &mut SmallRng,
) -> PackedDemShotBatch
pub fn run_packed_shot_batch_with_rng( &self, shots: usize, rng: &mut SmallRng, ) -> PackedDemShotBatch
Sample a shot-major bit-packed detector and observable batch.
Sourcepub fn run_detector_event_shot_batch_with_rng(
&self,
shots: usize,
rng: &mut SmallRng,
) -> DetectorEventDemShotBatch
pub fn run_detector_event_shot_batch_with_rng( &self, shots: usize, rng: &mut SmallRng, ) -> DetectorEventDemShotBatch
Sample a detector-event batch using the precomputed detector indices.
Trait Implementations§
Source§impl Clone for CompiledDemSamplingPlan
impl Clone for CompiledDemSamplingPlan
Source§impl Debug for CompiledDemSamplingPlan
impl Debug for CompiledDemSamplingPlan
Source§impl PartialEq for CompiledDemSamplingPlan
impl PartialEq for CompiledDemSamplingPlan
impl StructuralPartialEq for CompiledDemSamplingPlan
Auto Trait Implementations§
impl Freeze for CompiledDemSamplingPlan
impl RefUnwindSafe for CompiledDemSamplingPlan
impl Send for CompiledDemSamplingPlan
impl Sync for CompiledDemSamplingPlan
impl Unpin for CompiledDemSamplingPlan
impl UnsafeUnpin for CompiledDemSamplingPlan
impl UnwindSafe for CompiledDemSamplingPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more