add warning that wraparound doesn't copy particle_hole symmetry
Reproduce with:
import kwant
import numpy as np
template = kwant.continuum.discretize('k_x**2 * sigma_z + Delta * sigma_x')
syst = kwant.Builder(kwant.TranslationalSymmetry([1]), particle_hole=np.array([[0, -1j], [1j, 0]]))
syst.fill(template, lambda x: True, (0,))
print(syst.finalized().discrete_symmetry().particle_hole)
syst = kwant.wraparound.wraparound(syst)
print(syst.finalized().discrete_symmetry().particle_hole)
this prints:
(0, 0) 0j
(1, 0) 1j
(0, 1) (-0-1j)
(1, 1) 0j
None
It took me and @anton-akhmerov some time to figure out what was going on.
I think it is smart to issue a warning whenever the user specified a particle_hole
or time_reversal
operator and he/she uses wraparound
on that system.
Edited by Bas Nijholt