#[non_exhaustive]pub struct EvolutionOptions {
pub times: Vec<f64>,
pub krylov_dimension: usize,
pub tolerance: f64,
pub max_substeps: usize,
pub hamiltonian: bool,
}Expand description
Time grid and adaptive Krylov controls for state evolution.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.times: Vec<f64>Finite nondecreasing output times measured from the initial state.
krylov_dimension: usizeMaximum dimension of each Krylov projection.
tolerance: f64Local error tolerance.
max_substeps: usizeMaximum accepted and rejected trial intervals.
hamiltonian: boolInterpret the generator as H and apply exp(-i H t) when true.
Implementations§
Source§impl EvolutionOptions
impl EvolutionOptions
Sourcepub fn new(times: impl Into<Vec<f64>>) -> Self
pub fn new(times: impl Into<Vec<f64>>) -> Self
Construct Hamiltonian evolution controls on the supplied output grid.
Sourcepub fn with_krylov_dimension(self, dimension: usize) -> Self
pub fn with_krylov_dimension(self, dimension: usize) -> Self
Set the maximum dimension of each Krylov projection.
Sourcepub fn with_tolerance(self, tolerance: f64) -> Self
pub fn with_tolerance(self, tolerance: f64) -> Self
Set the local error tolerance.
Sourcepub fn with_max_substeps(self, max_substeps: usize) -> Self
pub fn with_max_substeps(self, max_substeps: usize) -> Self
Set the maximum accepted and rejected trial intervals.
Sourcepub fn with_hamiltonian(self, hamiltonian: bool) -> Self
pub fn with_hamiltonian(self, hamiltonian: bool) -> Self
Select Hamiltonian (exp(-iHt)) or direct-generator evolution.
Trait Implementations§
Source§impl Clone for EvolutionOptions
impl Clone for EvolutionOptions
Source§fn clone(&self) -> EvolutionOptions
fn clone(&self) -> EvolutionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EvolutionOptions
impl Debug for EvolutionOptions
Source§impl PartialEq for EvolutionOptions
impl PartialEq for EvolutionOptions
Source§fn eq(&self, other: &EvolutionOptions) -> bool
fn eq(&self, other: &EvolutionOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EvolutionOptions
Auto Trait Implementations§
impl Freeze for EvolutionOptions
impl RefUnwindSafe for EvolutionOptions
impl Send for EvolutionOptions
impl Sync for EvolutionOptions
impl Unpin for EvolutionOptions
impl UnsafeUnpin for EvolutionOptions
impl UnwindSafe for EvolutionOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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).§fn to_subset_unchecked(&self) -> SS
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.