Finding the optimal unit cell
For systems with a complex hopping graph, a smart choice of the unit cell reduces the number of hoppings connecting different unit cells, and speeds up the further calculations. We could adapt some version of mincut algorithm to perform the optimization of the unit cell shape automatically on attaching or finalization. This may lead to a non-trivial interplay with issue #4 (neat attaching of leads).
Action Steps
A master student in Grenoble (Adrien Sorgniard) implemented Karger's mincut algorithm that minimises the unit cell interface, however the code is not in a merge-worthy state. The person looking to address this issue will need to take the code that he has written, understand it, and modify it so that it is of merge-able quality. This will involve:
-
getting Adrien's code from his Kwant fork - understanding the algorithms used (Karger algorithm)
- understanding Adrien's implementation
-
adding comments / refactoring the code where necessary to make it readable -
adding tests, especially for edge cases