pub enum CircuitError {
InvalidMeasurementId(u32),
InvalidCircuitBody(BodyId),
BodyIdOutOfRange {
index: usize,
},
InvalidLoopDetectorState(LoopStateId),
QubitNotFoundInLayout(IVec2),
QubitIndexOutOfRange {
index: usize,
num_qubits: usize,
},
MeasurementFrame(MeasurementFrameError),
InvalidGateTargetCount {
gate: GateType,
targets: usize,
},
EmptyPauliProduct,
FlattenMeasurementIdOverflow,
FlattenResourceLimit {
observed: usize,
limit: usize,
},
}Expand description
An error building, validating, or lowering a CoordCircuit.
Variants§
InvalidMeasurementId(u32)
A measurement id is absent from the circuit registry.
InvalidCircuitBody(BodyId)
A circuit body id is absent.
BodyIdOutOfRange
A circuit body index cannot be represented by a body id.
InvalidLoopDetectorState(LoopStateId)
A loop detector state id is absent.
QubitNotFoundInLayout(IVec2)
A coordinate is absent from the output layout.
QubitIndexOutOfRange
A qubit index is outside the output layout.
MeasurementFrame(MeasurementFrameError)
Measurement-frame accounting failed.
InvalidGateTargetCount
A paired gate received an odd number of targets.
EmptyPauliProduct
An MPP operation contains no non-identity target.
FlattenMeasurementIdOverflow
Repeat expansion exceeds the measurement-id space.
FlattenResourceLimit
The expanded operation stream, targets, or replay events exceed the
caller’s work allowance. observed saturates if the estimate overflows.
Trait Implementations§
Source§impl Clone for CircuitError
impl Clone for CircuitError
Source§fn clone(&self) -> CircuitError
fn clone(&self) -> CircuitError
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 moreSource§impl Debug for CircuitError
impl Debug for CircuitError
Source§impl Display for CircuitError
impl Display for CircuitError
impl Eq for CircuitError
Source§impl Error for CircuitError
impl Error for CircuitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CircuitError> for FlattenError
impl From<CircuitError> for FlattenError
Source§fn from(source: CircuitError) -> Self
fn from(source: CircuitError) -> Self
Converts to this type from the input type.
Source§impl From<MeasurementFrameError> for CircuitError
impl From<MeasurementFrameError> for CircuitError
Source§fn from(source: MeasurementFrameError) -> CircuitError
fn from(source: MeasurementFrameError) -> CircuitError
Converts to this type from the input type.
Source§impl PartialEq for CircuitError
impl PartialEq for CircuitError
impl StructuralPartialEq for CircuitError
Auto Trait Implementations§
impl Freeze for CircuitError
impl RefUnwindSafe for CircuitError
impl Send for CircuitError
impl Sync for CircuitError
impl Unpin for CircuitError
impl UnsafeUnpin for CircuitError
impl UnwindSafe for CircuitError
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> 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.