pub enum StruqtureError {
Show 16 variants
FromStringFailed {
msg: String,
},
IncorrectPauliEntry {
pauli: String,
},
ProductIndexAlreadyOccupied {
index: usize,
},
MismatchedNumberSubsystems {
target_number_spin_subsystems: usize,
target_number_boson_subsystems: usize,
target_number_fermion_subsystems: usize,
actual_number_spin_subsystems: usize,
actual_number_boson_subsystems: usize,
actual_number_fermion_subsystems: usize,
},
IndicesNotNormalOrdered {
index_i: usize,
index_j: usize,
},
IndicesContainDoubles,
IncorrectlyOrderedIndices,
CreatorsAnnihilatorsMinimumIndex {
creators_min: Option<usize>,
annihilators_min: Option<usize>,
},
NonHermitianOperator,
ParsingError {
target_type: String,
msg: String,
},
VersionMismatch {
library_major_version: u32,
library_minor_version: u32,
data_major_version: u32,
data_minor_version: u32,
},
NewVersionMismatch {
library_major_version: u32,
library_minor_version: u32,
data_major_version: u32,
data_minor_version: u32,
name_type: String,
},
TypeMismatch {
source_type: String,
target_type: String,
},
CalculatorError(CalculatorError),
InvalidLindbladTerms,
GenericError {
msg: String,
},
}Expand description
Errors that can occur in struqture.
Variants§
FromStringFailed
Error when using from_str.
IncorrectPauliEntry
Error the Pauli matrix set is not in the allowed matrices.
ProductIndexAlreadyOccupied
Error when adding a key to an object as the index key already exists.
MismatchedNumberSubsystems
Error when the number of subsystems in a mixed system does not match.
Fields
IndicesNotNormalOrdered
Error when the indices of the object being added are not Normal Ordered.
IndicesContainDoubles
Error when the indices of the object being added are not Normal Ordered.
IncorrectlyOrderedIndices
Error when the creator indices of the object being added are not Normal Ordered or contain a double.
CreatorsAnnihilatorsMinimumIndex
Error when the minimum index of the creators of the object is larger than the minimum index of the annihilators object.
Fields
NonHermitianOperator
Error when the key is naturally hermitian (on-diagonal term), but its corresponding value is not real.
ParsingError
Error when parsing from str
VersionMismatch
Error when trying to deserialize struqture data created with an incompatible version of struqture
Fields
NewVersionMismatch
Fields
TypeMismatch
Fields
CalculatorError(CalculatorError)
Transparent propagation of CalculatorError.
InvalidLindbladTerms
Error when trying to insert identities into noise operators
GenericError
Gerneric Error in struqture.
Trait Implementations§
Source§impl Debug for StruqtureError
impl Debug for StruqtureError
Source§impl Display for StruqtureError
impl Display for StruqtureError
Source§impl Error for StruqtureError
impl Error for StruqtureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<CalculatorError> for StruqtureError
impl From<CalculatorError> for StruqtureError
Source§fn from(source: CalculatorError) -> Self
fn from(source: CalculatorError) -> Self
Source§impl PartialEq for StruqtureError
impl PartialEq for StruqtureError
impl StructuralPartialEq for StruqtureError
Auto Trait Implementations§
impl Freeze for StruqtureError
impl RefUnwindSafe for StruqtureError
impl Send for StruqtureError
impl Sync for StruqtureError
impl Unpin for StruqtureError
impl UnwindSafe for StruqtureError
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
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>
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>
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