pub struct FaultSet { /* private fields */ }Expand description
A finite signature of fault queries over the low-level model.
Implementations§
Source§impl FaultSet
impl FaultSet
Sourcepub fn count_pauli_weight(n: usize, t: usize) -> Option<u64>
pub fn count_pauli_weight(n: usize, t: usize) -> Option<u64>
The number of faults pauli_weight(t) enumerates on n locations, C(n, t) · 3^t, or
None when it does not fit in a u64.
Sourcepub fn pauli_weight(
locations: &[WireId],
after: Option<NodeId>,
t: usize,
cap: u64,
) -> Result<Self, QuantumError>
pub fn pauli_weight( locations: &[WireId], after: Option<NodeId>, t: usize, cap: u64, ) -> Result<Self, QuantumError>
Every Pauli of weight exactly t on the locations, inserted after after, refused above
cap before any fault is allocated.
§Errors
QuantumError::CalculationError naming the count and the cap when the count exceeds the
cap or overflows; QuantumError::DimensionMismatch on repeated locations or t = 0.
Sourcepub fn from_dem(
mechanisms: &[Vec<(WireId, PauliKind)>],
after: Option<NodeId>,
) -> Result<Self, QuantumError>
pub fn from_dem( mechanisms: &[Vec<(WireId, PauliKind)>], after: Option<NodeId>, ) -> Result<Self, QuantumError>
One fault per mechanism of a detector error model, each mechanism given as the wires and Paulis it flips; empty mechanisms are skipped and duplicates removed.
§Errors
Fault::new’s errors.
Sourcepub fn origin(&self) -> FaultOrigin
pub fn origin(&self) -> FaultOrigin
The constructor.
Trait Implementations§
impl Eq for FaultSet
impl StructuralPartialEq for FaultSet
Auto Trait Implementations§
impl Freeze for FaultSet
impl RefUnwindSafe for FaultSet
impl Send for FaultSet
impl Sync for FaultSet
impl Unpin for FaultSet
impl UnsafeUnpin for FaultSet
impl UnwindSafe for FaultSet
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