pub struct DevicePackedShots { /* private fields */ }Available on crate feature
gpu only.Expand description
Device-resident packed shots emitted by the GPU BTS path.
The payload stays in measurement-major layout on the device until an
explicit host copy via Self::to_host. Marginals and exact counts can be
reduced first so higher-level workflows do not have to transfer the full
shot matrix.
Implementations§
Source§impl DevicePackedShots
impl DevicePackedShots
pub fn num_shots(&self) -> usize
pub fn num_measurements(&self) -> usize
pub fn layout(&self) -> ShotLayout
Sourcepub fn to_host(&self) -> Result<PackedShots>
pub fn to_host(&self) -> Result<PackedShots>
Copy the full packed payload back to host memory.
Sourcepub fn marginal_counts(&self) -> Result<Vec<u64>>
pub fn marginal_counts(&self) -> Result<Vec<u64>>
Return per-measurement one-counts without copying the full shot matrix.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DevicePackedShots
impl RefUnwindSafe for DevicePackedShots
impl Send for DevicePackedShots
impl Sync for DevicePackedShots
impl Unpin for DevicePackedShots
impl UnsafeUnpin for DevicePackedShots
impl UnwindSafe for DevicePackedShots
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, U> Imply<T> for U
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 more