pub struct CommonSimulatorConfig {
pub seed: Option<u64>,
pub skip_shots: usize,
pub shots: usize,
pub errors: usize,
pub iterate_single_error: bool,
pub print_all: bool,
pub print_on_error: bool,
pub strict_timing: bool,
pub logical_assert_filepath: Option<String>,
pub simulator_trace_output: Option<String>,
pub preselect_max_attempts: u64,
}Expand description
Common configuration fields shared by all static-style simulators.
Fields§
§seed: Option<u64>the optional seed for the random number generator
skip_shots: usizeskipping the first N shots (without actually decoding them)
shots: usizethe number of shots to simulate, by default 4000; setting it to 0 means infinite shots until reaching the error limit
errors: usizethe number of logical errors before terminating, by default 4000; setting it to 0 means infinite errors until reaching the shot limit
iterate_single_error: booliterate single errors, helpful for testing if a decoder works properly
print_all: bool§print_on_error: bool§strict_timing: boolwhen true, (1) sampling is synchronous with decoding so that decoder
timing measurements are not distorted by concurrent sampling work,
and (2) measurement delays specified via #!delay directives in
the Stim file are respected (the simulator sleeps before delivering
each batch); when false, all measurements are delivered at once and
the sampler runs ahead in the background for throughput
logical_assert_filepath: Option<String>optional path to a Rhai script that defines
fn is_logical_error(shot, readouts, measurements);
when set, the script is the sole arbiter of logical errors instead of
the built-in readout comparison
simulator_trace_output: Option<String>Optional protobuf path for per-gadget readouts and decoding statistics, optional scores, and per-shot logical-error labels. No selection is applied.
preselect_max_attempts: u64Maximum number of resample attempts when preselect checks fail.
Only used when the Stim circuit contains SELECT { ... REQUIRE ... }
blocks (QDK v1.30+).
Trait Implementations§
Source§impl Clone for CommonSimulatorConfig
impl Clone for CommonSimulatorConfig
Source§impl Debug for CommonSimulatorConfig
impl Debug for CommonSimulatorConfig
Source§impl<'de> Deserialize<'de> for CommonSimulatorConfig
impl<'de> Deserialize<'de> for CommonSimulatorConfig
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>,
Auto Trait Implementations§
impl Forget for CommonSimulatorConfig
impl Freeze for CommonSimulatorConfig
impl Move for CommonSimulatorConfig
impl RefUnwindSafe for CommonSimulatorConfig
impl Send for CommonSimulatorConfig
impl Sync for CommonSimulatorConfig
impl Unpin for CommonSimulatorConfig
impl UnsafeUnpin for CommonSimulatorConfig
impl UnwindSafe for CommonSimulatorConfig
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,
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> ⓘ
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