Skip to content

Vectorized operators and systems interface

Viacheslav Ostroukh requested to merge feature/vectorized_interface into master

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:

  1. kwant/problems.py describes what problems can be solved in Kwant. Essentially, it is what kwant/system.py was, 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.
  2. kwant/operators module has essentially all the functionality, that was in FiniteSystem and InfiniteSystem classes. kwant/operators/abc.py defines interfaces of general Operator, Term, TermOperator, Modes and SelfEnergy. Term is a vectorized data storage and TermOperator is an operator defined by a set of terms. Modes and SelfEnergy are essentially the interfaces for "something that has modes" and "something that has selfenergy".
Edited by Viacheslav Ostroukh

Merge request reports

Loading