... | ... | @@ -3,7 +3,7 @@ This document specifies a proposal for the new low-level system format in Kwant- |
|
|
We will start by describing the format for a *finite* system, that is, a system with no symmetries.
|
|
|
We will then move on to *infinite* systems with symmetries. We will then list the operations
|
|
|
that the low-level system must efficiently support and sketch the implementation of these operations
|
|
|
given the low-level format.
|
|
|
given the low-level format. In the final section we briefly discuss a C-level interface to systems.
|
|
|
|
|
|
## Finite Systems
|
|
|
### Site Ordering
|
... | ... | @@ -163,3 +163,27 @@ This is just the current behaviour of `hamiltonian_submatrix`. This is not easy |
|
|
If the sites of the submatrix are known before finalization then the user can define a site family
|
|
|
that contains the sites for which they wish to extract a submatrix. As the sites are ordered by
|
|
|
site family, this enables efficient construction of the submatrix.
|
|
|
|
|
|
|
|
|
## C API
|
|
|
In addition to the new low-level format, systems in Kwant-2 should have a C API.
|
|
|
This is needed in order to interface Kwant systems with external codes
|
|
|
(e.g. existing RGF codes, DFT...) and also so that users may write their own
|
|
|
low-level systems directly in C that can be used with the Kwant solvers.
|
|
|
There are four possible "combinations" of systems and solvers which should be
|
|
|
possible:
|
|
|
|
|
|
+ Python system, Python solver
|
|
|
+ Python system, C solver
|
|
|
+ C system, Python Solver
|
|
|
+ C system, C solver
|
|
|
|
|
|
In order to "drive" calculations from the Python level all the C-level
|
|
|
components will have to be wrapped. Ideally the manual wrapping that has
|
|
|
to be done by the end user should be minimal; to this end we provide a set of
|
|
|
Cython classes that may be subclassed by the end user.
|
|
|
|
|
|
In addition the case where a C solver uses a C system should be efficient
|
|
|
in the sense that the solver should be able to call the C-API of the
|
|
|
system directly without passing through the Python level. A toy example for
|
|
|
such a framework was written by Christoph in 2011. |