Skip to main content

TwoTerminal

Struct TwoTerminal 

Source
pub struct TwoTerminal {
    pub slices: Vec<CMat>,
    pub couplings: Vec<CMat>,
    pub left: Lead,
    pub right: Lead,
    pub regions: Vec<Region>,
}
Expand description

A device of N slices between a left lead (towards −∞) and a right lead (towards +∞).

couplings[n] = ⟨n| H |n+1⟩. The left lead couples to slice 0 through left.h01 (⟨lead| H |0⟩) and the right lead to slice N−1 through right.h01 (⟨N−1| H |lead⟩): leads and device share the cross-section at the interfaces.

Fields§

§slices: Vec<CMat>

Hamiltonian ⟨n| H |n⟩ of each slice, n = 0..N.

§couplings: Vec<CMat>

Couplings ⟨n| H |n+1⟩ between consecutive slices (N − 1 of them).

§left: Lead

Lead towards −∞, coupled to slice 0 through left.h01.

§right: Lead

Lead towards +∞, coupled to slice N−1 through right.h01.

§regions: Vec<Region>

Sites of each slice (orbital layout of slices[n]), when built from a model; empty for systems assembled by hand.

Implementations§

Source§

impl TwoTerminal

Source

pub fn from_model( device: &Model, lead: &Model, region: &Region, axis: usize, ) -> Self

Two-terminal system built from a model on a region cut along primitive vector axis; both leads continue the first and last slices of the region with the clean lead model (the region’s own model may carry disorder).

Source

pub fn with_lead_potentials(self, left: f64, right: f64) -> Self

Shifts the electrostatic potential of the left and right leads (bias): adds v·1 to their cell Hamiltonians.

Source

pub fn transmissions( &self, energies: &[f64], method: SelfEnergyMethod, ) -> Vec<Result<f64, GreenError>>

Transmissions at many energies, in parallel, by independent blocks.

Source

pub fn sweeps( &self, energy: f64, method: SelfEnergyMethod, ) -> Result<Sweeps, GreenError>

Recursive sweeps from both ends at one energy (see Sweeps).

Source

pub fn self_energies( &self, energy: f64, method: SelfEnergyMethod, ) -> Result<(CMat, CMat), GreenError>

Lead self-energies (Σ_L, Σ_R) on the first and last slices.

Source

pub fn transmission(&self, energy: f64) -> Result<f64, GreenError>

Transmission T(E) = Tr[Γ_L G_1N Γ_R G_1N†] with mode-matching self-energies.

Source

pub fn transmission_with( &self, energy: f64, method: SelfEnergyMethod, ) -> Result<f64, GreenError>

Transmission with a chosen self-energy method.

Source

pub fn blocks(&self) -> Vec<Vec<usize>>

Orbitals of the cross-section that no slice, coupling or lead matrix connects, as independent sets (e.g. the two spin blocks of BHZ with spin-conserving disorder). One set if the slices differ in size.

Source

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

The system restricted to orbitals of every slice (one of Self::blocks).

Source

pub fn transmission_by_blocks( &self, energy: f64, method: SelfEnergyMethod, ) -> Result<f64, GreenError>

Transmission summed over the independent Self::blocks, each solved on its own: for b equal blocks the recursion costs b² times less.

Source

pub fn solve( &self, energy: f64, method: SelfEnergyMethod, ) -> Result<EndToEnd, GreenError>

Lead self-energies and the Green’s function G_1N between the first and last slices.

Trait Implementations§

Source§

impl Clone for TwoTerminal

Source§

fn clone(&self) -> TwoTerminal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TwoTerminal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.