pub enum PrismError {
Parse {
line: usize,
message: String,
},
UnsupportedConstruct {
construct: String,
line: usize,
},
InvalidQubit {
index: usize,
register_size: usize,
},
InvalidClassicalBit {
index: usize,
register_size: usize,
},
GateArity {
gate: String,
expected: usize,
got: usize,
},
BackendUnsupported {
backend: String,
operation: String,
},
InvalidParameter {
message: String,
},
UndefinedRegister {
name: String,
line: usize,
},
ExportUnsupported {
index: usize,
reason: String,
},
IncompatibleBackend {
backend: String,
reason: String,
},
}Expand description
Top-level error type for PRISM-Q operations.
Variants§
Parse
OpenQASM parse error with source line number.
UnsupportedConstruct
Encountered a valid OpenQASM construct that PRISM-Q v0 does not support.
InvalidQubit
Qubit index exceeds register size.
InvalidClassicalBit
Classical bit index exceeds register size.
GateArity
Gate applied to wrong number of qubits.
BackendUnsupported
Backend does not support the requested operation.
InvalidParameter
Invalid gate parameter (e.g., NaN rotation angle).
UndefinedRegister
Reference to a register name that was never declared.
ExportUnsupported
Circuit holds an instruction with no OpenQASM 3.0 spelling.
IncompatibleBackend
Incompatible backend for the given circuit.
Trait Implementations§
Source§impl Clone for PrismError
impl Clone for PrismError
Source§fn clone(&self) -> PrismError
fn clone(&self) -> PrismError
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 PrismError
impl Debug for PrismError
Source§impl Display for PrismError
impl Display for PrismError
Source§impl Error for PrismError
impl Error for PrismError
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 PrismError
impl PartialEq for PrismError
impl StructuralPartialEq for PrismError
Auto Trait Implementations§
impl Freeze for PrismError
impl RefUnwindSafe for PrismError
impl Send for PrismError
impl Sync for PrismError
impl Unpin for PrismError
impl UnsafeUnpin for PrismError
impl UnwindSafe for PrismError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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> ⓘ
Converts
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> ⓘ
Converts
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