This MR implements part of the machinery required for proper treatment of discrete symmetries. Specifically, it extends the modes function to accept discrete symmetry operators:
kwant.physics.modes(h_cell, h_hop, tol=1e6, stabilization=None, particle_hole=None, time_reversal=None, chiral=None)
It mostly copies a part of @torosdahl's work from !15 (closed).
The important choice made here is the separation of conservation laws from antiunitary symmetries (conservation laws aren't implemented in this MR). The motivation for this is that it reduces the number of cases to handle. The case of modes with conservation laws + symmetries is handled by several calls to a modes function without conservation laws + post-processing. In !15 (closed) the conservation laws handling was performed on the
InfiniteSystem side, but not entirely sure where it must go in the end.
There are several points that aren't entirely clear:
- How to generate good test cases for systems with chiral symmetry? These systems are generically gapped and won't have any modes at the Fermi surface. Should we "cheat" and make use of a conservation law?
- What convention should the basis of propagating modes follow when there's particle-hole symmetry? For any mode with not time-reversal invariant momentum, there's a clearly defined particle-hole partner mode, but modes with momentum 0 or pi may be particle-hole partners of themselves. How to indicate in the
PropagatingModesobject that a certain mode is chosen to be its own particle-hole partner? Should we set its momentum to exactly
As far as the code changes go, most of the extra logic ends up in the
make_proper_modes function, so the additions are nicely localized.