pub struct ContractionOptions {
pub method: ContractionMethod,
pub max_rank: Option<usize>,
pub svd_policy: Option<SvdTruncationPolicy>,
pub qr_rtol: Option<f64>,
pub nfullsweeps: usize,
pub convergence_tol: Option<f64>,
pub factorize_alg: FactorizeAlg,
}Expand description
Options for the generic contract function.
Fields§
§method: ContractionMethodContraction method to use.
max_rank: Option<usize>Maximum bond dimension (optional).
svd_policy: Option<SvdTruncationPolicy>Explicit SVD truncation policy (optional).
qr_rtol: Option<f64>QR-specific relative tolerance (optional).
nfullsweeps: usizeNumber of full sweeps for Fit method.
A full sweep visits each edge twice (forward and backward) using an Euler tour.
convergence_tol: Option<f64>Convergence tolerance for Fit method (None = fixed sweeps).
factorize_alg: FactorizeAlgFactorization algorithm for Fit method.
Implementations§
Source§impl ContractionOptions
impl ContractionOptions
Sourcepub fn new(method: ContractionMethod) -> Self
pub fn new(method: ContractionMethod) -> Self
Create options with specified method.
Sourcepub fn with_max_rank(self, max_rank: usize) -> Self
pub fn with_max_rank(self, max_rank: usize) -> Self
Set maximum bond dimension.
Sourcepub fn with_svd_policy(self, policy: SvdTruncationPolicy) -> Self
pub fn with_svd_policy(self, policy: SvdTruncationPolicy) -> Self
Set the SVD truncation policy.
Sourcepub fn with_qr_rtol(self, rtol: f64) -> Self
pub fn with_qr_rtol(self, rtol: f64) -> Self
Set the QR-specific relative tolerance.
Sourcepub fn with_nfullsweeps(self, nfullsweeps: usize) -> Self
pub fn with_nfullsweeps(self, nfullsweeps: usize) -> Self
Set number of full sweeps for Fit method.
Sourcepub fn with_convergence_tol(self, tol: f64) -> Self
pub fn with_convergence_tol(self, tol: f64) -> Self
Set convergence tolerance for Fit method.
Sourcepub fn with_factorize_alg(self, alg: FactorizeAlg) -> Self
pub fn with_factorize_alg(self, alg: FactorizeAlg) -> Self
Set factorization algorithm for Fit method.
Trait Implementations§
Source§impl Clone for ContractionOptions
impl Clone for ContractionOptions
Source§fn clone(&self) -> ContractionOptions
fn clone(&self) -> ContractionOptions
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 ContractionOptions
impl Debug for ContractionOptions
Auto Trait Implementations§
impl Freeze for ContractionOptions
impl RefUnwindSafe for ContractionOptions
impl Send for ContractionOptions
impl Sync for ContractionOptions
impl Unpin for ContractionOptions
impl UnsafeUnpin for ContractionOptions
impl UnwindSafe for ContractionOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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