Requirements
Such a composite system should enable the treatment of general scattering problems in arbitrary dimensions. Examples include:
 Finite scattering region attached to 1D leads

1D scattering region attached to 2D leads (+ higher dimensional generalizations)

Finite scattering region embedded in 2D bulk (+ higher dimensional generalizations)
CompositeSystem
API
A CompositeSystem
is essentially a collection of System
s arranged in a
directed graph, where systems of higher symmetry are attached to systems of a
lower symmetry. The interface between two systems is specified by a sequence of
two bits of information:

a term of the system with higher symmetry that joins a unit cell of the system with lower symmetry to the system with higher symmetry.

a symmetry group element that specifies which unit cell of the system with higher symmetry should be attached to the system of lower symmetry.

a sequence of sites in the system with lower symmetry that constitute the interface.
The above information allows the selfenergy matrix (defined over the interface sites in the system with lower symmetry) to be defined.
The symmetry group of the system with lower symmetry must be a subgroup of the symmetry group of the system with higher symmetry.
In the following illustrations, the circles correspond to a single unit cell of the system under consideration. Circles with dashed outline represent the image of the unit cell under the action of the symmetry of the system; they are shown for clarity. Full lines denote a set of terms associated with the symmetry group element that takes us from the fundamental unit cell to the unit cell joined by the line. Crosses on lines denote that the lines should be "cut" and joined instead to the system (of lower symmetry) to which we are attaching. Note that the "cuts" are also applied to all lines under the action of the symmetry group of the system with lower symmetry.
Finite scattering region attached to 1D leads
This is the simplest and most common case. This is the only case that Kwant could treat in version 1.x.
Nearest neighbor hoppings
We have a lead and a finite scattering region. We want to attach the lead by cutting the hopping between a unit cell and the cell on the left. As the finite scattering region has the trivial symmetry group, only one hopping of the infinite lead is cut. This produces 2 semiinfinite leads that are disconnected. The "cut" hopping is then attached to the finite scattering region. The figure below represents this schematically. The resultant system has two disconnected parts; we are interested in the outlined part, the other part is discarded.
Nextnearest neighbor hoppings
We have a lead with nextnearest neighbor hoppings, in addition to nearest neighbor hoppings. This is essentially the same as the previous case.
1D scattering region attached to 2D leads
Here we have a system that is translationally invariant in 2 dimensions that we want to attach to a system that is translationally invariant in 1 direction. We specify that we wish to cut the hopping to the left. Due to the (1D) translational invariance of the system to which we are attaching, this also cuts all the hoppings to the left for the cells above and below. We see that the resultant system is translationally invariant in the vertical direction
Finite scattering region embedded in 2D bulk
Here we have a 2D translationally invariant system into which we wish to embed a finite scattering region. We accomplish this by cutting all the hoppings to a unit cell.
We could also have a weirder configuration, where we do not cut all the hoppings. This means that we do not cut the higherdimensional system into disjoint parts. This would look like the following:
Scattering region with Hole
We may also wish to join pieces of a finite system via a region with some translational symmetry. Even though we could achieve a system that looks the same by just having a single, finite, system we can use the fact that the joining piece is translationally invariant to performa mode decomposition here. In the example below we have a ring which is cut through by a translationally invariant bridge.
Corner
Another example which shows the generality of this approach is a corner. This may be used to represent a macroscopic 2D lead that we will then attach to some finite scattering region.
The example below shows how to construct such a thing from a 2D translationally invariant part with 2 1D translationally invariant boundaries and finally a 0D part that connects the 2 1D boundaries.