tkwantoperator.
LeadHeatCurrent
(syst: kwant.system.FiniteSystem, double chemical_potential: float, added_lead_sites: Union[Iterable[int], Iterable[kwant.builder.Site]], unicode baseOperator: str = u'Kinetic+', customOnsite: Optional[Callable[[kwant.builder.Site, Dict[str, Union[float, complex]]], Union[complex, ta.matrix]]] = None, dt_hamiltonian: Optional[Callable[[Tuple[kwant.builder.Site, kwant.builder.Site], Dict[str, Union[float, complex]]], Union[complex, ta.matrix]]] = None, dt_customOnsite: Optional[Callable[[kwant.builder.Site, Dict[str, Union[float, complex]]], Union[complex, ta.matrix]]] = None, double dt: float = 1E-3)¶An operator that calculates the heat current out of a specific lead, into the central system.
syst (FiniteSystem
) – The finalized Kwant system on which the heat current will be calculated.
chemical_potential (float
) – The chemical potential of the considered lead, save in the
chemical_potential
class attribute.
added_lead_sites (sequence of int
or Site
) – A set of sites from the lead that have been added to the system
by the user. Saved in added_lead_sites
attribute, this list is
used to determine the hoppings used to calculate the heat current,
which are at the interface between this list and the central system.
The hoppings are stored in the hoppings
attribute.
baseOperator (str
) – Can be Hamiltonian
, Kinetic+
or Custom
(case unsensitive).
It tells the operator which onsite term to use when calculating the
energy current.
customOnsite (None
(default) or (Site
, dict
) \(\rightarrow\) complex matrix-like object) – Overwrites the value of the energy operator \(ε\) on sites:
\(\forall i \, \forall t \; ~ ε_{ii}(t) = \text{customOnsite}(i, t)\),
but only when baseOperator
is set to Custom
. In practice, its signature
should be customOnsite(site, params)
where site
is a Site
instance and params
is a dict
containing the parameters
values (including the current time). The method must return a matrix-like
object (e.g. a tinyarray
instance) of the right dimensions at each site
(the same as the onsite hamiltonian). It is saved in the customOnsite
attribute of this class.
dt_customOnsite (None
(default) or (Site
, dict
) \(\rightarrow\) complex matrix-like object) – The time derivative of the custom onsite, to be (optionally) given only
when baseOperator
is set to Custom
. Saved in the dt_customOnsite
attribute of this class. If specified, its signature
should be dt_customOnsite(site, params)
where site
is a
Site
instance and params
is a dict
containing the parameters values (including the current time).
The method must return a matrix-like object (e.g. a tinyarray
instance) of the right dimensions at each site (the same as the
onsite hamiltonian). If not specified (thus
defaulting to None
), finite difference will be used
to estimate the time derivative using the “small” time step dt.
dt_hamiltonian (None
(default) or (Site
, Site
, dict
) \(\rightarrow\) complex matrix-like object) – The time derivative of the hamiltonian. Saved in the dt_hamiltonian
attribute of this class. If specified, its signature
should be dt_hamiltonian(site1, site2, params)
where site1
and
site2
are Site
instances ; params
is a dict
containing the parameters values (including the current time). The method
must return a matrix-like object (e.g. a tinyarray
instance) of the right
dimensions for each hopping (site1, site2)
(the same size as the
hamiltonian). If not specified (thus defaulting to None
),
finite difference will be used to estimate it using the “small” time step dt.
dt (float
, default value: \(10^{-3}\)) – The time step used to estimate the time derivative of the custom onsite (if dt_customOnsite=None
)
or the Hamiltonian (if dt_hamiltonian=None
).
Notes
This class calculates the heat current \(I_L^H(t)\) flowing out of a given lead \(L\) to the central system \(C\):
where \(I^ε_{ji}\) is local the energy current flowing from
\(i\) to \(j\) (calculated by the EnergyCurrent
class); \(S^ε_i\) is the input power
on site \(i\) (calculated by the EnergySource
class);
and \(I^{N}_{ji}\) is the particle current flowing from site \(i\)
to site \(j\) (calculated by the Current
class). \(μ\)
is the chemical potential of the lead, given by chemical_potential
.
Please note that the value of the heat current \(I_L^H(t)\) depends on the position of the interface between the lead and the central system. The user is free to choose this position by adding an arbitrary number of (first) cells of the lead into the central system.
Moreover, the calculation of \(I^ε_{ij}\), \(S^ε_i\), and \(I^{N}_{ij}\) involve
the sites \(i\) and \(j\), and also their neighbors (a neighbor of site \(i\)
is a site \(k \neq i\) with \(H_{ik} \neq 0\). It is not necessarily a first nearest-neighbor
but it is directly connected to \(i\)). Since the wavefunction can be only accessed on sites
that lie in the central region, sites \(i\), \(j\), and their neighbors must belong to the
central region. A simple way to achieve this is to call attach_lead
with the additional optional parameter add_cells
set to
\(2\). This method adds automatically
two cells from the lead to the central system and returns
the list of the added sites:
added_lead_sites = syst.attach_lead(lead, add_cells=2)
Before attaching the lead: After attaching the lead:
-------------------------- -------------------------
--O----O----O----O C----C---- --O----O--|--O----O----C----C----
_________________| |__________ _______| |____|
lead central lead added lead
system sites
|___________________
Central system
The list of sites added_lead_sites
is given as an input parameter of LeadHeatCurrent
and it is used to determine the list of hoppings \((j, i)\), saved in the
attribute hoppings
, where \(i\) belongs to added_lead_sites
and \(j\) to the central region for example:
i____j
| |
--O----O--|--O----O----C----C----
______| |____|
lead added lead
sites
|___________________
Central system
Note that added_lead_sites
can be defined by hand by the user without calling attach_lead
.
It must contain sites that belonged originally to the lead (in particular the on-site potential
on these sites is spatially uniform and time-independent).
More precisely, for a given position of the \(L-C\) interface
at which the heat current \(I_L^H(t)\) will be calculated,
added_lead_sites
must contain the neighbors that are in \(L\) of the sites in \(C\)
and the neighbors that are in \(L\) of those former neighbors.
It should form one unique closed surface (i.e. a connected graph), and without “holes”.
Eventually, for each hopping \((j, i)\) from hoppings
a heat current
contribution \(I_{ji}^H(t) = I^ε_{ji} - S^ε_i - μ I^N_{ji}\) is calculated
and the sum over all heat current contributions is done to deduce \(I_L^H(t)\).
Attributes
syst
¶The finalized Kwant system on which the heat current will be calculated.
_particle_current_op
¶An instance of Kwant’s particle current, used internally to calculate
the heat current. The attribute hoppings
are given to it as a
where
at instantiation.
_energy_source_op
¶An instance of tKwant’s energy source, used internally to calculate
the heat current. The attribute source_sites
are given to it as a
where
at instantiation.
_energy_current_op
¶An instance of tKwant’s energy current, used internally to calculate
the heat current. The attribute hoppings
are given to it as a
where
at instantiation.
chemical_potential
¶The chemical potential of the considered lead.
double (a Python float
compatible value)
added_lead_sites
¶List of sites \(i\) (accessed as i = where[n, 0]
) that contains sites
at the interface with the chosen lead.
2D array of gint (a python int
compatible type) of shape \(n \times 2\)
hoppings
¶Hoppings that are effectively used to calculate the heat current, calculated from added_lead_sites
,
as described in the Notes above.
Methods
__call__
()¶Returns the contribution \(I_L^H(ψ, t)\) of psi
to the expectation value
of the lead’s outgoing heat current.
This method enables calling an instance A of this class like a function, with a wave function and the “params” dictionary as parameters :
>>> A(psi, params)
It calculates the following sum, with psi
written as “\(ψ\)” :
psi (array of complex values) – The wave function to use for calculation. Must have the same length as the total number of orbitals in the system.
params (dict
, optional) – Dictionary of parameter names and their values.
The contribution \(I_L^H(ψ, t)\) of psi
to the expectation value
of the lead’s outgoing heat current.