tkwant.manybody.calc_tasks¶
-
tkwant.manybody.
calc_tasks
(intervals, spectra, occupations, keys=None, task_type=<class 'tkwant.onebody.onebody.Task'>, tol=1e-10)[source]¶ Return all tasks (set of quantum numbers that uniquely identify a onebody state) that will form the manybody state.
- Parameters
intervals (
tkwant.manybody.Interval
or sequence thereof) –Momentum intervals with quadrature rules for each interval. Each element of
intervals
must have at least the following attributes:lead : int or tuple of int, lead index
band : int, band index (n)
kmin : float, lower momentum bound
kmax : float, upper momentum bound, must be larger than kmin
order : int, quadrature order. See
tkwant.integration.calc_abscissas_and_weights
quadrature : string, quadrature rule to use. See
tkwant.integration.calc_abscissas_and_weights
integration_variable : string, variable of integration. Possible values: “energy” : integrate over energy, “momentum”: integrate over momentum
spectra (
kwantspectrum.spectrum
or sequence thereof) – Energy dispersion \(E_n(k)\) of one lead or list thereof in case of several leads.occupations (
tkwant.manybody.Occupation
or sequence thereof) –Each sequence element represents the occupation of a lead. If
occupations
consistst of only one element or if the sequence has only one element, the occupation is assumed to be identical in each lead. Ifoccupations
is a sequence with more than one element, such that the occupation for each lead is different,occupations
must have the same length asspectra
. Each element ofoccupations
must have at least the following attribute:distribution : callable, thermal distribution function with calling signature (energy)
If a lead is not occupied, the corresponding element of
occupations
must be None or False.keys (iterable, optional) – Iterable to generate keys for the
tasks
dict. Default: Ascending integer sequence (0, 1, 2..), starting at zero.task_type (
dataclass
, optional) – Data format to store a task in the returnedtasks
dict. Default:tkwant.onebody.Task
tol (float, optional) – Numerical tolerance to remove tasks when their weights are almost zero. Condition to remove a task is |weights| < tol.
- Returns
tasks – Dict of all tasks (set of quantum numbers that uniquely identify a onebody state) to set up the manybody wavefunction. Attributes of each
tasks
element that are modified by this routine:lead : int, lead index
mode : int, scattering mode index
energy : float, energy of the onebody state
momentum : float, momentum of the onebody state; None if unknown
weight : float, weighting factor of the one-body state in the manybody sum (weight = math_weight * phys_weight)
math_weight : float, mathematical weighting factor
phys_weight : float, physical weighting factor
Tasks are ordered as
intervals
and for each interval by increasing energy.- Return type
dict of
task_type
Notes
Momentum values in
tasks
are only present if integration is performed over momentum (intervals.integration_variable
== ‘momentum’).