pub struct CompiledDetectorSampler { /* private fields */ }Expand description
Compiled sampler for measurement, detector, and observable records.
Implementations§
Source§impl CompiledDetectorSampler
impl CompiledDetectorSampler
pub fn num_measurements(&self) -> usize
pub fn num_detectors(&self) -> usize
pub fn num_observables(&self) -> usize
pub fn rank(&self) -> usize
pub fn detector_rows(&self) -> &[Vec<usize>]
pub fn observable_rows(&self) -> &[Vec<usize>]
pub fn sample_measurements_packed( &mut self, num_shots: usize, ) -> Result<PackedShots>
pub fn sample_detectors_packed( &mut self, num_shots: usize, ) -> Result<PackedShots>
pub fn sample_observables_packed( &mut self, num_shots: usize, ) -> Result<PackedShots>
pub fn sample_packed(&mut self, num_shots: usize) -> Result<DetectorSampleBatch>
pub fn sample_detectors_chunked<A: ShotAccumulator>( &mut self, total_shots: usize, acc: &mut A, ) -> Result<()>
pub fn sample_detector_counts( &mut self, total_shots: usize, ) -> Result<HashMap<Vec<u64>, u64>>
Auto Trait Implementations§
impl Freeze for CompiledDetectorSampler
impl RefUnwindSafe for CompiledDetectorSampler
impl Send for CompiledDetectorSampler
impl Sync for CompiledDetectorSampler
impl Unpin for CompiledDetectorSampler
impl UnsafeUnpin for CompiledDetectorSampler
impl UnwindSafe for CompiledDetectorSampler
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