pub struct SimulatorCompact {
pub error_sources: Vec<ErrorSource>,
pub rng: Xoroshiro128StarStar,
/* private fields */
}Fields§
§error_sources: Vec<ErrorSource>each error source is an independent probabilistic Pauli or erasure error
rng: Xoroshiro128StarStaruse embedded random number generator
Implementations§
Trait Implementations§
Source§impl Clone for SimulatorCompact
impl Clone for SimulatorCompact
Source§impl Debug for SimulatorCompact
impl Debug for SimulatorCompact
Source§impl<'de> Deserialize<'de> for SimulatorCompact
impl<'de> Deserialize<'de> for SimulatorCompact
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SimulatorCompact> for GeneralSimulator
impl From<SimulatorCompact> for GeneralSimulator
Source§fn from(v: SimulatorCompact) -> GeneralSimulator
fn from(v: SimulatorCompact) -> GeneralSimulator
Converts to this type from the input type.
Source§impl PartialEq for SimulatorCompact
impl PartialEq for SimulatorCompact
Source§impl Serialize for SimulatorCompact
impl Serialize for SimulatorCompact
Source§impl SimulatorGenerics for SimulatorCompact
impl SimulatorGenerics for SimulatorCompact
fn set_rng(&mut self, rng: Xoroshiro128StarStar)
fn generate_random_errors( &mut self, _noise_model: &NoiseModel, ) -> (usize, usize)
fn generate_sparse_detected_erasures(&self) -> SparseErasures
fn generate_sparse_error_pattern(&self) -> SparseErrorPattern
fn generate_sparse_measurement(&self) -> SparseMeasurement
fn validate_correction(&mut self, correction: &SparseCorrection) -> (bool, bool)
Source§impl TryInto<SimulatorCompact> for GeneralSimulator
impl TryInto<SimulatorCompact> for GeneralSimulator
Auto Trait Implementations§
impl Freeze for SimulatorCompact
impl RefUnwindSafe for SimulatorCompact
impl Send for SimulatorCompact
impl Sync for SimulatorCompact
impl Unpin for SimulatorCompact
impl UnsafeUnpin for SimulatorCompact
impl UnwindSafe for SimulatorCompact
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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