pub struct SampleCounts {
pub shots: u64,
pub discarded: u64,
pub accepted: u64,
pub logical_errors: u64,
}Expand description
Aggregate outcomes from a batch sampling call.
Counts satisfy shots == discarded + accepted. logical_errors counts
accepted shots where the selected observable parity is one.
Fields§
§shots: u64Total attempted shots.
discarded: u64Shots rejected by detector postselection.
accepted: u64Shots retained after detector postselection.
logical_errors: u64Accepted shots where SamplerOptions::observable was one.
Implementations§
Source§impl SampleCounts
impl SampleCounts
Sourcepub fn discard_rate(&self) -> f64
pub fn discard_rate(&self) -> f64
Returns discarded / shots, or NaN when no shots were attempted.
Sourcepub fn logical_error_rate(&self) -> f64
pub fn logical_error_rate(&self) -> f64
Returns logical_errors / accepted, or NaN when no shots were accepted.
Trait Implementations§
Source§impl Clone for SampleCounts
impl Clone for SampleCounts
Source§fn clone(&self) -> SampleCounts
fn clone(&self) -> SampleCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SampleCounts
Source§impl Debug for SampleCounts
impl Debug for SampleCounts
Source§impl Default for SampleCounts
impl Default for SampleCounts
Source§fn default() -> SampleCounts
fn default() -> SampleCounts
Returns the “default value” for a type. Read more
impl Eq for SampleCounts
Source§impl PartialEq for SampleCounts
impl PartialEq for SampleCounts
impl StructuralPartialEq for SampleCounts
Auto Trait Implementations§
impl Freeze for SampleCounts
impl RefUnwindSafe for SampleCounts
impl Send for SampleCounts
impl Sync for SampleCounts
impl Unpin for SampleCounts
impl UnsafeUnpin for SampleCounts
impl UnwindSafe for SampleCounts
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