pub enum MPOError {
DimensionMismatch {
site: usize,
},
BondDimensionMismatch {
site: usize,
left_right: usize,
right_left: usize,
},
SharedDimensionMismatch {
site: usize,
dim_a: usize,
dim_b: usize,
},
LengthMismatch {
expected: usize,
got: usize,
},
IndexOutOfBounds {
site: usize,
index: usize,
max: usize,
},
Empty,
InvalidBoundary,
InvalidCenter {
center: usize,
max: usize,
},
FactorizationError {
message: String,
},
InvalidOperation {
message: String,
},
MatrixCI(MatrixCIError),
ConvergenceFailure {
sweeps: usize,
error: f64,
},
}Expand description
Errors that can occur during MPO operations
Variants§
DimensionMismatch
Dimension mismatch between tensors
BondDimensionMismatch
Bond dimension mismatch between adjacent tensors
Fields
Shared dimension mismatch between two MPOs
LengthMismatch
Length mismatch between two MPOs
IndexOutOfBounds
Invalid index provided
Fields
Empty
Empty MPO
InvalidBoundary
Invalid boundary conditions
InvalidCenter
Invalid orthogonality center
FactorizationError
Factorization error
InvalidOperation
Invalid operation
MatrixCI(MatrixCIError)
Matrix CI error
ConvergenceFailure
Convergence failure
Trait Implementations§
Source§impl Error for MPOError
impl Error for MPOError
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()
Auto Trait Implementations§
impl Freeze for MPOError
impl RefUnwindSafe for MPOError
impl Send for MPOError
impl Sync for MPOError
impl Unpin for MPOError
impl UnsafeUnpin for MPOError
impl UnwindSafe for MPOError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<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>
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