pub struct RunMetadata {
pub backend: ResolvedBackend,
pub engine: Option<Engine>,
pub exactness: Exactness,
pub placement: Placement,
pub shots: Option<usize>,
}Expand description
How a result was produced, attached to every Simulate result type.
A GPU-attached run below the device crossover reports Placement::Host,
and automatic dispatch onto an approximate backend reports
Exactness::Approximate.
Fields§
§backend: ResolvedBackend§engine: Option<Engine>Which sampler ran, when backend is a label several share. None
when the backend is the whole answer, which is every backend other than
ResolvedBackend::CompiledStabilizer.
exactness: Exactness§placement: Placement§shots: Option<usize>Shots drawn, for a result estimated by sampling. None for an analytic
result.
Implementations§
Source§impl RunMetadata
impl RunMetadata
pub fn is_exact(&self) -> bool
Sourcepub fn fidelity_lower_bound(&self) -> Option<f64>
pub fn fidelity_lower_bound(&self) -> Option<f64>
Reported fidelity floor for the produced state, None when the result
is exact or the engine reports none.
For the MPS backend this is 1 minus the summed per-SVD relative
discarded weights: a first-order truncation estimate, not a
certificate. Errors compound across SVDs, and summing the weights
understates the compounded error, since the strict bound on the
infidelity is the square of the summed square roots. The two agree
only when a single SVD truncates. The sparse backend at a raised
pruning threshold reports 1 minus the absolute squared weight it
dropped, the same first-order estimate; it renormalizes what it keeps,
so the dropped weight is the whole of the error it reports. The
budgeted Pauli engines leave this None and report their additive
observable bound on the result types instead.
Trait Implementations§
Source§impl Clone for RunMetadata
impl Clone for RunMetadata
Source§fn clone(&self) -> RunMetadata
fn clone(&self) -> RunMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RunMetadata
impl RefUnwindSafe for RunMetadata
impl Send for RunMetadata
impl Sync for RunMetadata
impl Unpin for RunMetadata
impl UnsafeUnpin for RunMetadata
impl UnwindSafe for RunMetadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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