pub struct Outcomes {
pub gid: u64,
pub outcomes: Option<BitVector>,
pub modifiers: Vec<ProbabilityModifier>,
pub loss_mask: Option<BitVector>,
pub decoder_seed: Option<u64>,
}Fields§
§gid: u64the gid of the gadget
outcomes: Option<BitVector>the measurement outcomes, length must be equal to the number of measurements of the gadget type
modifiers: Vec<ProbabilityModifier>modify the probabilities based on soft information; note that later modifications will overwrite the existing ones, so use sparse modifier as much as possible to avoid potential issues; the length of the modifier must be less than the number of error models attached to the gadget. Here we implicitly enforce that each gadget can only modify local error models, which makes sense as modifying history error model probabilities complicates the decoding system coordination (e.g., do we recompute the committed part or not?)
loss_mask: Option<BitVector>optional per-measurement loss flags, one bit per measurement in outcomes.
A set bit means the corresponding qubit was lost during that measurement,
and the bit in outcomes is therefore unreliable (typically a random
substitute filled in by the simulator). When absent, no loss information
is available for this batch and the decoder should treat every measurement
bit as reliable. Decoders are free to ignore this field; no decoder is
required to consume it.
decoder_seed: Option<u64>Optional deterministic seed for decoder randomness. All Outcomes messages contributing to one decoding problem must either omit the seed or use the same value; disagreement returns INVALID_ARGUMENT. Zero is valid.
Implementations§
Trait Implementations§
Source§impl Message for Outcomes
impl Message for Outcomes
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Outcomes
Auto Trait Implementations§
impl Forget for Outcomes
impl Freeze for Outcomes
impl Move for Outcomes
impl RefUnwindSafe for Outcomes
impl Send for Outcomes
impl Sync for Outcomes
impl Unpin for Outcomes
impl UnsafeUnpin for Outcomes
impl UnwindSafe for Outcomes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request