pub struct PlanStimOptions<'a> { /* private fields */ }Expand description
How emit_plan_stim should render a plan.
Implementations§
Source§impl<'a> PlanStimOptions<'a>
impl<'a> PlanStimOptions<'a>
Sourcepub fn new(qubit_map: &'a FxHashMap<IVec2, u32>) -> Self
pub fn new(qubit_map: &'a FxHashMap<IVec2, u32>) -> Self
Render against qubit_map, in the default StimDialect and with no
tag.
qubit_map addresses the emitted circuit: every qubit coordinate the
plan touches must appear in it, and the index it maps to is the qubit
number written out. Passing the caller’s own global layout is what lets
several plans be emitted into one shared index space.
Sparse indices in 0..=16_777_215 are supported without allocating entries
for missing indices. Both dialects share Stim’s 24-bit qubit targets.
Sourcepub fn with_dialect(self, dialect: StimDialect) -> Self
pub fn with_dialect(self, dialect: StimDialect) -> Self
Choose how non-Clifford T gates are spelled.
Sourcepub fn with_tag(self, tag: &'a str) -> Self
pub fn with_tag(self, tag: &'a str) -> Self
Tag every emitted instruction with tag, so the caller can find this
plan’s slice of a larger circuit structurally instead of by position.
The HONEST_T tag wins on the gates it marks: it is load-bearing for
the StimDialect round trip, whereas this tag is the caller’s own
bookkeeping.
Trait Implementations§
Source§impl<'a> Clone for PlanStimOptions<'a>
impl<'a> Clone for PlanStimOptions<'a>
Source§fn clone(&self) -> PlanStimOptions<'a>
fn clone(&self) -> PlanStimOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for PlanStimOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for PlanStimOptions<'a>
impl<'a> RefUnwindSafe for PlanStimOptions<'a>
impl<'a> Send for PlanStimOptions<'a>
impl<'a> Sync for PlanStimOptions<'a>
impl<'a> Unpin for PlanStimOptions<'a>
impl<'a> UnsafeUnpin for PlanStimOptions<'a>
impl<'a> UnwindSafe for PlanStimOptions<'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
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> ⓘ
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 more