Skip to main content

Driven

Struct Driven 

Source
pub struct Driven { /* private fields */ }
Expand description

The Hamiltonian H(t) of a region under a uniform vector potential, as a sparse matrix whose entries carry the displacement class of their bond.

Implementations§

Source§

impl Driven

Source

pub fn new(model: &Model, region: &Region, periods: &[Cell]) -> Self

The region repeated along periods (open if empty), without field.

Source

pub fn with_force(self, force: Vec3) -> Self

A constant force F from t = 0 (see constant_force).

Source

pub fn with_vector_potential(self, potential: VectorPotential) -> Self

Any uniform vector potential A(t).

Source

pub fn len(&self) -> usize

Dimension of the wave functions.

Source

pub fn is_empty(&self) -> bool

Whether the dimension is zero (a region without orbitals).

Source

pub fn hamiltonian(&self, t: f64) -> SparseMatrix

H(t) as a sparse matrix.

Source

pub fn velocity(&self, psi: &[c64], t: f64, direction: Vec3) -> f64

⟨ψ| v |ψ⟩ along direction at time t, with the velocity v = i[H(t), r] (v_ij = i H_ij(t) d_ij·direction).

Source

pub fn step(&self, psi: &mut [c64], t: f64, dt: f64, tol: f64)

One Magnus step ψ(t) → ψ(t + dt), the exponentials exact to tol.

Trait Implementations§

Source§

impl TimeDependent for Driven

Source§

fn apply(&self, stages: &[(f64, f64)], x: &[c64], y: &mut [c64])

y = Σ_i w_i H(t_i) x for stages = [(t_i, w_i)].
Source§

fn bounds(&self) -> (f64, f64)

Bounds (lower, upper) on the spectrum of H(t) at every t.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.