pub struct BloqStimOptions<'a> { /* private fields */ }Expand description
Options for noise, input validation, and whole-program moment alignment.
Alignment rejects noise and segmented output with
StimEmissionError::AlignMomentsWithNoise and
StimEmissionError::AlignMomentsWithSegments.
§Examples
use bloq_stim::{BloqStimOptions, InputTrust, emit_bloq_stim_with};
let graph = bloq_graph::GalleryItem::CNOT.build();
let program = bloq_compile::compile(&graph, 3)?;
let noise = bloq_circuit::NoiseModel::uniform_depolarizing(1e-3);
let options = BloqStimOptions::new()
.with_noise(&noise)
.with_trust(InputTrust::Checked);
assert!(emit_bloq_stim_with(&program, &options)?.contains("DEPOLARIZE1"));Implementations§
Source§impl<'a> BloqStimOptions<'a>
impl<'a> BloqStimOptions<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Noiseless emission without a full input audit, as emit_bloq_stim uses.
Sourcepub fn with_noise(self, noise: &'a NoiseModel) -> Self
pub fn with_noise(self, noise: &'a NoiseModel) -> Self
Annotate every instantiated circuit with noise before emitting.
Sourcepub fn with_trust(self, trust: InputTrust) -> Self
pub fn with_trust(self, trust: InputTrust) -> Self
Whether to run the full T2 audit first; see InputTrust.
Sourcepub fn with_align_moments(self, align: bool) -> Self
pub fn with_align_moments(self, align: bool) -> Self
Align compatible node moments across each block layer.
Trait Implementations§
Source§impl<'a> Clone for BloqStimOptions<'a>
impl<'a> Clone for BloqStimOptions<'a>
Source§fn clone(&self) -> BloqStimOptions<'a>
fn clone(&self) -> BloqStimOptions<'a>
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 moreimpl<'a> Copy for BloqStimOptions<'a>
Source§impl<'a> Debug for BloqStimOptions<'a>
impl<'a> Debug for BloqStimOptions<'a>
Source§impl<'a> Default for BloqStimOptions<'a>
impl<'a> Default for BloqStimOptions<'a>
Source§fn default() -> BloqStimOptions<'a>
fn default() -> BloqStimOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for BloqStimOptions<'a>
impl<'a> RefUnwindSafe for BloqStimOptions<'a>
impl<'a> Send for BloqStimOptions<'a>
impl<'a> Sync for BloqStimOptions<'a>
impl<'a> Unpin for BloqStimOptions<'a>
impl<'a> UnsafeUnpin for BloqStimOptions<'a>
impl<'a> UnwindSafe for BloqStimOptions<'a>
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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