pub enum SimulatorError {
Show 26 variants
InvalidQubits(usize),
InvalidGate(String),
ComputationError(String),
IndexOutOfBounds(usize),
InvalidOperation(String),
GPUNotAvailable,
ShaderCompilationError(String),
GPUExecutionError(String),
GpuError(String),
DimensionMismatch(String),
InvalidInput(String),
InvalidConfiguration(String),
NumericalError(String),
CoreError(QuantRS2Error),
UnsupportedOperation(String),
LinalgError(String),
InitializationFailed(String),
MemoryError(String),
InitializationError(String),
OperationNotSupported(String),
InvalidParameter(String),
NotImplemented(String),
MemoryAllocationFailed(String),
ResourceExhausted(String),
InvalidState(String),
BackendError(String),
}
Expand description
Error types for quantum simulation
Variants§
InvalidQubits(usize)
Invalid number of qubits
InvalidGate(String)
Invalid gate specification
ComputationError(String)
Computation error during simulation
IndexOutOfBounds(usize)
Gate target out of bounds
InvalidOperation(String)
Invalid operation
GPUNotAvailable
GPU not available
ShaderCompilationError(String)
Shader compilation failed
GPUExecutionError(String)
GPU execution error
GpuError(String)
General GPU error
DimensionMismatch(String)
Dimension mismatch
InvalidInput(String)
Invalid input
InvalidConfiguration(String)
Invalid configuration
NumericalError(String)
Numerical error
CoreError(QuantRS2Error)
Core error
UnsupportedOperation(String)
Unsupported operation
LinalgError(String)
Linear algebra error
InitializationFailed(String)
Initialization failed
MemoryError(String)
Memory allocation error
InitializationError(String)
Initialization error
OperationNotSupported(String)
Operation not supported
InvalidParameter(String)
Invalid parameter
NotImplemented(String)
Not implemented
MemoryAllocationFailed(String)
Memory allocation failed
ResourceExhausted(String)
Resource exhausted
InvalidState(String)
Invalid state
BackendError(String)
Backend error
Trait Implementations§
Source§impl Clone for SimulatorError
impl Clone for SimulatorError
Source§fn clone(&self) -> SimulatorError
fn clone(&self) -> SimulatorError
Returns a duplicate of the value. Read more
1.0.0 · 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 SimulatorError
impl Debug for SimulatorError
Source§impl Display for SimulatorError
impl Display for SimulatorError
Source§impl Error for SimulatorError
impl Error for SimulatorError
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<QuantRS2Error> for SimulatorError
impl From<QuantRS2Error> for SimulatorError
Source§fn from(source: QuantRS2Error) -> Self
fn from(source: QuantRS2Error) -> Self
Converts to this type from the input type.
Source§impl From<ShapeError> for SimulatorError
impl From<ShapeError> for SimulatorError
Source§fn from(err: ShapeError) -> Self
fn from(err: ShapeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SimulatorError
impl RefUnwindSafe for SimulatorError
impl Send for SimulatorError
impl Sync for SimulatorError
impl Unpin for SimulatorError
impl UnwindSafe for SimulatorError
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.