pub struct ObservableExpectation {
pub mean: f64,
pub variance: Option<f64>,
pub group_variances: Option<Vec<f64>>,
pub std_error: Option<f64>,
pub metadata: RunMetadata,
}Expand description
Weighted-observable expectation with the grouped-measurement variance.
Fields§
§mean: f64<H> = sum_k c_k <P_k>, including identity-term constants.
variance: Option<f64>Sum of per-group variances Var(H_g) = <H_g^2> - <H_g>^2, each exact
in the output state. This is the variance of a grouped measurement
estimate drawing one shot per commuting group; with S_g shots on
group g the estimator variance is sum_g Var(H_g) / S_g. It equals
Var(H) of the full operator only when one group covers every term,
since cross-group covariances are excluded. None on a route that
evaluates term by term without the grouped traversal.
group_variances: Option<Vec<f64>>Per-group Var(H_g) in grouping order, the input to shot allocation.
std_error: Option<f64>Standard error of mean when a sampling route estimated the per-term
values, None for analytic routes.
metadata: RunMetadataTrait Implementations§
Source§impl Clone for ObservableExpectation
impl Clone for ObservableExpectation
Source§fn clone(&self) -> ObservableExpectation
fn clone(&self) -> ObservableExpectation
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 moreAuto Trait Implementations§
impl Freeze for ObservableExpectation
impl RefUnwindSafe for ObservableExpectation
impl Send for ObservableExpectation
impl Sync for ObservableExpectation
impl Unpin for ObservableExpectation
impl UnsafeUnpin for ObservableExpectation
impl UnwindSafe for ObservableExpectation
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
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> ⓘ
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