Hopping directions are wrong in printed _DiscretizedBuilder
For example:
>>> import kwant
>>> print(kwant.continuum.discretize('k_x'))
# Discrete coordinates: x
# Onsite element:
0j
# Hopping in direction (1,):
-0.5j
when actually it is hopping from (1, )
to (0, )
.
Hoppings are however correctly set in template, e.g. hopping from 0
to 1
is set to
>>> print(template[template.lattice(1,), template.lattice(0,)])
0.5j
Edited by Rafal Skolasinski