Vectorized operators and systems interface
Here I propose the low-level interface for vectorized systems, possibly suitable for Kwant 2.
The proposal (naming may be changed later after discussion, of course) is to organize the code as follows:
kwant/problems.pydescribes what problems can be solved in Kwant. Essentially, it is what
kwant/system.pywas, but in this way adding possible new problems (other than 1D scattering) is straightforward. Currently it has scattering and Green's function problem. Problems are relatively simple and incapsulate
kwant/operators(contrary to Kwant 1 systems, that require inheritance), which makes code structure more straightforward.
kwant/operatorsmodule has essentially all the functionality, that was in
kwant/operators/abc.pydefines interfaces of general
Termis a vectorized data storage and
TermOperatoris an operator defined by a set of terms.
SelfEnergyare essentially the interfaces for "something that has modes" and "something that has selfenergy".