Enum quil_rs::instruction::GateError
source · pub enum GateError {
InvalidIdentifier(IdentifierValidationError),
EmptyQubits,
ForkedParameterLength {
expected: usize,
actual: usize,
},
PauliTermArgumentLength {
expected: usize,
actual: usize,
},
PauliSumArgumentMismatch {
mismatches: Vec<String>,
expected_arguments: Vec<String>,
},
UndefinedGate {
name: String,
parameterized: bool,
},
MatrixArgumentLength {
expected: usize,
actual: usize,
},
MatrixNonConstantParams {
name: String,
parameters: Vec<Expression>,
},
MatrixVariableQubit {
name: String,
qubit: Qubit,
},
ForkedGateOddNumParams {
name: String,
parameters: Vec<Expression>,
},
UnresolvedQubitPlaceholder {
name: String,
},
}
Variants§
InvalidIdentifier(IdentifierValidationError)
EmptyQubits
ForkedParameterLength
PauliTermArgumentLength
PauliSumArgumentMismatch
UndefinedGate
MatrixArgumentLength
MatrixNonConstantParams
MatrixVariableQubit
ForkedGateOddNumParams
UnresolvedQubitPlaceholder
Trait Implementations§
source§impl Error for GateError
impl Error for GateError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<GateError> for ProgramError
impl From<GateError> for ProgramError
source§impl From<GateError> for ValidationError
impl From<GateError> for ValidationError
source§impl From<IdentifierValidationError> for GateError
impl From<IdentifierValidationError> for GateError
source§fn from(source: IdentifierValidationError) -> Self
fn from(source: IdentifierValidationError) -> Self
Converts to this type from the input type.
source§impl PartialEq<GateError> for GateError
impl PartialEq<GateError> for GateError
impl Eq for GateError
impl StructuralEq for GateError
impl StructuralPartialEq for GateError
Auto Trait Implementations§
impl RefUnwindSafe for GateError
impl Send for GateError
impl Sync for GateError
impl Unpin for GateError
impl UnwindSafe for GateError
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.