support finalization and attaching of ND systems
Current status
- Vectorized low level systems store similar sites in
SiteArray
s, and similar terms of the Hamiltonian insyst.terms
. - With respect to translation symmetries, the data format of terms is correct (each term stores the associated symmetry element),
- Finalization uses site ordering enforced by the interface. This is impossible or hard to generalize symmetries that are more than 1D.
- When attaching a lead we compute the interface—sites that are connected to the lead by a hopping.
- A finalized system stores
lead_interfaces
—the indices of its low level sites that match the indices of the extra sites of the lead in the same order.
Goals
- We want to be able to finalize systems with ND translations, and therefore we won't be able to enforce a specific ordering on the sites.
- We still want to be able to attach the leads (duh).
- At this point we want to keep the logic of builder the same (attaching leads by flood fill).
Proposal
I think the apparent incompatibility between the goals is achieved by this format change:
Change lead_interfaces
to be a mapping between the scattering region sites and the lead sites that only includes the sites that are connected by a hopping, instead of relying on the ordering of the sites in the infinite system.
Change lead_interfaces
to be a 2D array of site numbers in the scattering region that correspond to specific sites in the lead unit cell upon translation by k
symmetry vectors of the lead. In other words if interface[n, k] == i
, that means that i
'th site of the scattering region corresponds to the n
'th site of the lead upon translation by k+1
lead symmetry vectors that aren't shared by the system. A value of -1
in the interface indicates that there is no site in the system that corresponds to the n
'th site of the lead upon translation by k+1
lead symmetry vectors. Finally, interface.shape == (N_lead_sites, max_hopping_range)
.
- This means that we finalize the systems without taking the interface into account (already a simplification), and have the same ordering of sites regardless of how the lead was attached.
- When computing the new format for the
lead_interfaces
we only need a single lookup (something likesearchsorted
). - In principle this means that attaching a 2D lead to a 1D scattering region becomes legal (although we must specify which generator to use for the remaining 1D symmetry).