pub enum DetectorTerm<M = u32> {
Measurement(M),
LoopState(LoopStateId),
}Expand description
One term of a DetectorParity: either a measurement outcome or a
loop-carried state.
Generic over the measurement type M so parities can be built over raw
record ids or over already-resolved terms.
Variants§
Trait Implementations§
Source§impl<M> Clone for DetectorTerm<M>where
M: Clone,
impl<M> Clone for DetectorTerm<M>where
M: Clone,
Source§fn clone(&self) -> DetectorTerm<M>
fn clone(&self) -> DetectorTerm<M>
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<M> Copy for DetectorTerm<M>where
M: Copy,
Source§impl<M> Debug for DetectorTerm<M>where
M: Debug,
impl<M> Debug for DetectorTerm<M>where
M: Debug,
Source§impl<'de, M> Deserialize<'de> for DetectorTerm<M>where
M: Deserialize<'de>,
impl<'de, M> Deserialize<'de> for DetectorTerm<M>where
M: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DetectorTerm<M>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DetectorTerm<M>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<M> Eq for DetectorTerm<M>where
M: Eq,
Source§impl<M> Hash for DetectorTerm<M>where
M: Hash,
impl<M> Hash for DetectorTerm<M>where
M: Hash,
Source§impl<M> Ord for DetectorTerm<M>where
M: Ord,
impl<M> Ord for DetectorTerm<M>where
M: Ord,
Source§fn cmp(&self, other: &DetectorTerm<M>) -> Ordering
fn cmp(&self, other: &DetectorTerm<M>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<M> PartialEq for DetectorTerm<M>where
M: PartialEq,
impl<M> PartialEq for DetectorTerm<M>where
M: PartialEq,
Source§impl<M> PartialOrd for DetectorTerm<M>where
M: PartialOrd,
impl<M> PartialOrd for DetectorTerm<M>where
M: PartialOrd,
Source§impl<M> Serialize for DetectorTerm<M>where
M: Serialize,
impl<M> Serialize for DetectorTerm<M>where
M: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<M> StructuralPartialEq for DetectorTerm<M>where
M: PartialEq,
Auto Trait Implementations§
impl<M> Freeze for DetectorTerm<M>where
M: Freeze,
impl<M> RefUnwindSafe for DetectorTerm<M>where
M: RefUnwindSafe,
impl<M> Send for DetectorTerm<M>where
M: Send,
impl<M> Sync for DetectorTerm<M>where
M: Sync,
impl<M> Unpin for DetectorTerm<M>where
M: Unpin,
impl<M> UnsafeUnpin for DetectorTerm<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for DetectorTerm<M>where
M: UnwindSafe,
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.