pub enum QuantumError {
Malformed(String),
Invalid(String),
TooManyQubits(u8),
}Expand description
Errors from parsing a WQC container or building an out-of-range circuit.
Variants§
Malformed(String)
Bad magic, truncated section, or malformed op-log.
Invalid(String)
A qubit index ≥ n_qubits, a control equal to the target, or a P(k) with
k outside 1..=DYADIC_MAX.
TooManyQubits(u8)
n_qubits exceeds what this build will materialize (2^n amplitudes).
Trait Implementations§
Source§impl Debug for QuantumError
impl Debug for QuantumError
Source§impl Display for QuantumError
impl Display for QuantumError
impl Eq for QuantumError
Source§impl Error for QuantumError
impl Error for QuantumError
1.30.0 · 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 PartialEq for QuantumError
impl PartialEq for QuantumError
impl StructuralPartialEq for QuantumError
Auto Trait Implementations§
impl Freeze for QuantumError
impl RefUnwindSafe for QuantumError
impl Send for QuantumError
impl Sync for QuantumError
impl Unpin for QuantumError
impl UnsafeUnpin for QuantumError
impl UnwindSafe for QuantumError
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.