pub struct SampleStatistics {
pub num_shots: usize,
pub num_detectors: usize,
pub num_measurements: usize,
pub detector_fire_counts: Vec<usize>,
pub measurement_one_counts: Vec<usize>,
pub total_detector_fires: usize,
pub logical_error_rate: f64,
}Expand description
Statistics from batch sampling
Fields§
§num_shots: usizeNumber of shots taken
num_detectors: usizeNumber of detectors
num_measurements: usizeNumber of measurements per shot
detector_fire_counts: Vec<usize>Number of times each detector fired
measurement_one_counts: Vec<usize>Number of times each measurement was 1
total_detector_fires: usizeTotal number of detector fires across all shots
logical_error_rate: f64Estimated logical error rate (if observables tracked)
Implementations§
Source§impl SampleStatistics
impl SampleStatistics
Sourcepub fn detector_fire_rate(&self, detector_idx: usize) -> f64
pub fn detector_fire_rate(&self, detector_idx: usize) -> f64
Get the fire rate for a specific detector
Sourcepub fn average_detector_fires(&self) -> f64
pub fn average_detector_fires(&self) -> f64
Get the average number of detector fires per shot
Sourcepub fn any_detector_fire_rate(&self) -> f64
pub fn any_detector_fire_rate(&self) -> f64
Get the probability of any detector firing
Trait Implementations§
Source§impl Clone for SampleStatistics
impl Clone for SampleStatistics
Source§fn clone(&self) -> SampleStatistics
fn clone(&self) -> SampleStatistics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SampleStatistics
impl RefUnwindSafe for SampleStatistics
impl Send for SampleStatistics
impl Sync for SampleStatistics
impl Unpin for SampleStatistics
impl UnwindSafe for SampleStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.