pub struct ShotsResult {
pub shots: Vec<Vec<bool>>,
/* private fields */
}Expand description
Result of a multi-shot simulation run.
Fields§
§shots: Vec<Vec<bool>>Classical measurement outcomes for each shot.
shots[i][j] is the j-th classical bit from the i-th shot.
Implementations§
Source§impl ShotsResult
impl ShotsResult
Sourcepub fn counts(&self) -> HashMap<Vec<u64>, u64>
pub fn counts(&self) -> HashMap<Vec<u64>, u64>
Build a frequency histogram of measurement outcomes.
Keys are packed Vec<u64> where bit i of word i/64 corresponds
to classical bit i. Use bitstring to format keys for display.
pub fn num_shots(&self) -> usize
pub fn num_classical_bits(&self) -> usize
Trait Implementations§
Source§impl Clone for ShotsResult
impl Clone for ShotsResult
Source§fn clone(&self) -> ShotsResult
fn clone(&self) -> ShotsResult
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 moreSource§impl Debug for ShotsResult
impl Debug for ShotsResult
Auto Trait Implementations§
impl Freeze for ShotsResult
impl RefUnwindSafe for ShotsResult
impl Send for ShotsResult
impl Sync for ShotsResult
impl Unpin for ShotsResult
impl UnsafeUnpin for ShotsResult
impl UnwindSafe for ShotsResult
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