pub enum TensorTrainError {
Empty,
SiteOutOfBounds {
site: usize,
length: usize,
},
BondDimensionMismatch {
site: usize,
left_dim: usize,
right_dim: usize,
},
NoOrthogonalityCenter {
start: usize,
end: usize,
},
InvalidStructure {
message: String,
},
Factorize(FactorizeError),
OperationError {
message: String,
},
}Expand description
Errors that can occur in TensorTrain operations.
Variants§
Empty
Tensor train is empty (has no tensors).
SiteOutOfBounds
Site index is out of bounds.
Fields
BondDimensionMismatch
Bond dimension mismatch between adjacent tensors.
Fields
NoOrthogonalityCenter
Tensor train does not have a well-defined orthogonality center.
Fields
InvalidStructure
Invalid tensor structure for tensor train.
Factorize(FactorizeError)
Factorization error.
OperationError
General operation error.
Trait Implementations§
Source§impl Debug for TensorTrainError
impl Debug for TensorTrainError
Source§impl Display for TensorTrainError
impl Display for TensorTrainError
Source§impl Error for TensorTrainError
impl Error for TensorTrainError
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<FactorizeError> for TensorTrainError
impl From<FactorizeError> for TensorTrainError
Source§fn from(source: FactorizeError) -> Self
fn from(source: FactorizeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TensorTrainError
impl RefUnwindSafe for TensorTrainError
impl Send for TensorTrainError
impl Sync for TensorTrainError
impl Unpin for TensorTrainError
impl UnsafeUnpin for TensorTrainError
impl UnwindSafe for TensorTrainError
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>,
§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