Skip to main content

Torus

Struct Torus 

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

A periodic 2D model on an n × n torus of unit cells.

Implementations§

Source§

impl Torus

Source

pub fn new(model: &Model, n: usize) -> Self

The model on an n × n torus, without field. Its hoppings must be the same in every cell (no hopping term, no Peierls phase: use crate::Driven otherwise); its site-dependent on-site terms are read on every site of the torus.

Source

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

A constant force F from t = 0: A(t) = −F t, the crystal momentum moves as k + F t.

Source

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

Any uniform vector potential A(t).

Source

pub fn with_sector(self, orbitals: &[usize]) -> Self

Restricts Self::filled and the excited-carrier count to the band states on orbitals (of the unit cell), a union of groups of orbitals that M(k) does not couple to the others: one spin of a model whose hoppings conserve the spin, say. The evolution itself is unchanged (the disorder may carry the states out of the sector), and so is Self::fermi_sea.

Source

pub fn groups(&self) -> &[Vec<usize>]

The groups of orbitals of the cell that M(k) does not couple to one another (the blocks of a sector, see Self::with_sector).

Source

pub fn size(&self) -> usize

Side n of the torus, in unit cells (n × n of them).

Source

pub fn components(&self) -> usize

Orbitals per unit cell.

Source

pub fn area(&self) -> f64

Area of the torus.

Source

pub fn kinetic(&self, k: usize, a: Vec3) -> CMat

M(k, A) at the k point of FFT index k (kx + n·ky).

Source

pub fn velocity(&self, k: usize, a: Vec3, direction: Vec3) -> CMat

The velocity ∂M/∂k along direction at k index k: Σ i (d·direction) t e^{i(k·n − A·d)}.

Source

pub fn to_k(&self, psi: &mut [c64])

Forward FFT of every component.

Source

pub fn to_x(&self, psi: &mut [c64])

Backward FFT of every component divided by n² (inverse of Self::to_k).

Source

pub fn filled(&self, fermi: f64, vectors: usize, seed: u64) -> Vec<Vec<c64>>

The Fermi sea below fermi of the clean bands at t = 0, as vectors random-phase superpositions of the occupied band states (k space): for each of them ⟨ψ|O|ψ⟩ estimates Tr[P O], P the projector on the occupied states, and ⟨ψ|ψ⟩ is their number. Only the band states of the sector, if one is set (Self::with_sector).

Source

pub fn fermi_sea( &self, fermi: f64, vectors: usize, seed: u64, moments: usize, ) -> Vec<Vec<c64>>

The Fermi sea below fermi of the whole Hamiltonian at t = 0, site-dependent terms included: vectors random-phase vectors (in real space) projected by a Chebyshev expansion of θ(fermi − H) with moments terms and the Jackson kernel (k space, as Self::filled). The step is smeared over about π·ΔE/moments, ΔE the half-width of the spectrum. Without disorder it is Self::filled up to that smearing; with disorder it is the ground state, where Self::filled is the clean one, which the disorder sets in motion.

Source

pub fn localized( &self, cell: [usize; 2], orbital: usize, window: Option<(f64, f64)>, ) -> Vec<c64> ⓘ

The orbital orbital of cell cell (k space, unit norm), projected on the clean band states at t = 0 whose energy lies in window if one is given.

Source

pub fn evolve(&self, starts: &[Vec<c64>], ev: &Evolution) -> Record

Evolves each start state (k space, e.g. from Self::filled or Self::localized) from t = 0 and records the observables, averaged over the start states.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Torus

§

impl !UnwindSafe for Torus

§

impl Freeze for Torus

§

impl Send for Torus

§

impl Sync for Torus

§

impl Unpin for Torus

§

impl UnsafeUnpin for Torus

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.