tkwant.onebody.WaveFunction¶

class
tkwant.onebody.
WaveFunction
(H0, W, psi_init, energy=None, params=None, time_start=0, time_name='time', kernel_type=<class 'tkwant.onebody.kernels.Simple'>, solver_type=<class 'tkwant.onebody.solvers.Scipy'>, work=None, inplace=False, tmax=None)[source]¶ A class to solve the timedependent singleparticle wavefunction.
The timedependent singleparticle Schrödinger equation is
\(i \partial_t \psi = (H_0 + W(t)) \psi\),
where the total Hamiltonian \(H(t) = H_0 + W(t)\) has been splitted into a static part \(H_0\) and a timedependent perturbation \(W(t)\). Moreover, the initial condition is \(\psi(t_0)\) and \(W(t)\) is expected to be absent before the initial time \(t_0\):
\(W(t) = 0 \,\, \text{for} \,\, t \leq t_0\).
If an energy \(E\) is provided, this routine expects that the initial condition represents the scattering state \(\psi_{st}\) that solves the timeindependent Schrödinger equation
\(H_0 \psi_{st} = E \psi_{st}, \, \psi_{st} = \psi(t_0)\).
For numerical reasons, the evolution is then performed in the variable
\(i \partial_t \bar{\psi} = (H_0 + W(t)  E) \bar{\psi} + W(t) \psi_{st}\),
where
\(\psi = (\bar{\psi}  \psi_{st}) e^{i E (t  t_0)}\).
See J. Weston and X. Waintal, Phys. Rev. B 93, 134506 (2016).
 Parameters
H0 (arraylike) – The static part of the Hamiltonian matrix, \(H_0\).
W (callable or None) – Timedependent part of the Hamiltonian matrix, \(W(t)\). Typically the object returned by tkwant.system.extract_perturbation.
psi_init (array of complex) – The state \(\psi(t_0)\) from which to start, defined over the central region.
energy (float, optional) – If provided, then
psi_init
is assumed to be an eigenstate of energy \(E\). If the Hamiltonian represents an open quantum system with leads, thenpsi_init
is assumed to be the projection of a scattering state at energy \(E\) on to the central part of the system.params (dict, optional) – Extra arguments to pass to the timedependent Hamiltonian function \(W(t)\), excluding time.
time_start (float, optional) – The initial time \(t_0\). Default value is zero.
time_name (str, optional) – The name of the time argument \(t\). Default name: time.
kernel_type (
tkwant.onebody.solvers.default
, optional) – The kernel to calculate the righthandsite of the Schrödinger equation.solver_type (
tkwant.onebody.solvers.default
, optional) – The solver used to evolve the wavefunction forward in time.work (
ndarray
of complex, optional) – Workarray of sizeH0.shape[0]
for performance and memory optimization.inplace (bool, optional) – If true and
energy
is not None, the termH0  E
is calculated inplace in order to save memory. Ifenergy
is None,inplace
has no effect.tmax (float, optional) – Optional maximal time until when the boundary is valid.
Methods

add_perturbation
(qt)[source]¶ Add a timedependent perturbation to the Hamiltonian
H(t) = H_0 + W(t)
it is modified to
H(t) = H_0 + W(t) + Q(t)

evaluate
(observable)[source]¶ Evaluate the expectation value of an operator at the current time t.
For an operator \(\hat{O}\) the expectation value is \(O(t) = \langle \psi(t)  \hat{O} \psi(t) \rangle\).
 Parameters
observable (callable or
kwant.operator
) – An operator \(\hat{O}\) to evaluate the expectation value. Must have the calling signature ofkwant.operator
. Returns
result – The expectation value \(O(t)\) of
observable
. Return type
numpy array

classmethod
from_kwant
(syst, psi_init, boundaries=None, energy=None, params=None, time_start=0, time_name='time', kernel_type=<class 'tkwant.onebody.kernels.Simple'>, solver_type=<class 'tkwant.onebody.solvers.Scipy'>, perturbation_type=<class 'tkwant.onebody.kernels.PerturbationInterpolator'>)[source]¶ Set up a timedependent onebody wavefunction from a kwant system.
 Parameters
syst (
kwant.builder.FiniteSystem
) – The low level system for which the wave functions are to be calculated.psi_init (array of complex) – The state from which to start, defined over the central region.
boundaries (sequence of BoundaryBase, optional) – The boundary conditions for each lead attached to
syst
. Must be provided for a system with leads.energy (float, optional) – If provided, then
psi_init
is assumed to be an eigenstate of energy E. Ifsyst
has leads, thenpsi_init
is assumed to be the projection of a scattering state at energy E on to the central part of the system.params (dict, optional) – Extra arguments to pass to the Hamiltonian of
syst
, excluding time.time_start (float, optional) – The initial time \(t_0\). Default value is zero.
time_name (str, optional) – The name of the time argument \(t\). Default name: time.
kernel_type (
tkwant.onebody.solvers.default
, optional) – The kernel to calculate the righthandsite of the Schrödinger equation.solver_type (
tkwant.onebody.solvers.default
, optional) – The solver used to evolve the wavefunction forward in time.perturbation_type (tkwant.onebody.kernels.ExtractPerturbation, optional) – Class to extract the time dependent perturbation \(W(t)\) out of
syst
.
 Returns
wave_function – A timedependent onebody wavefunction at the initial time.
 Return type