pub struct FourierOptions {
pub sign: f64,
pub maxbonddim: usize,
pub tolerance: f64,
pub k: usize,
pub normalize: bool,
}Expand description
Options for Fourier transform construction.
Controls the sign convention, compression parameters, and normalization of the quantics Fourier transform MPO.
§Examples
use tensor4all_quanticstransform::FourierOptions;
// Forward transform (default): sign = -1
let fwd = FourierOptions::forward();
assert_eq!(fwd.sign, -1.0);
assert!(fwd.normalize);
// Inverse transform: sign = +1
let inv = FourierOptions::inverse();
assert_eq!(inv.sign, 1.0);
// Custom options
let opts = FourierOptions {
maxbonddim: 20,
tolerance: 1e-12,
..FourierOptions::forward()
};
assert_eq!(opts.maxbonddim, 20);Fields§
§sign: f64Sign in the exponent: -1.0 (forward) or 1.0 (inverse)
maxbonddim: usizeMaximum bond dimension after compression
tolerance: f64Tolerance for compression
k: usizeNumber of Chebyshev basis functions (K+1 points)
normalize: boolWhether to normalize as an isometry
Implementations§
Trait Implementations§
Source§impl Clone for FourierOptions
impl Clone for FourierOptions
Source§fn clone(&self) -> FourierOptions
fn clone(&self) -> FourierOptions
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 FourierOptions
impl Debug for FourierOptions
Auto Trait Implementations§
impl Freeze for FourierOptions
impl RefUnwindSafe for FourierOptions
impl Send for FourierOptions
impl Sync for FourierOptions
impl Unpin for FourierOptions
impl UnsafeUnpin for FourierOptions
impl UnwindSafe for FourierOptions
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.