Hi,

The theory can be found is many places, for instance in the
appendix of

http://journals.aps.org/prx/abstract/10.1103/PhysRevX.2.031004 
<http://journals.aps.org/prx/abstract/10.1103/PhysRevX.2.031004>

There is an example in the Kwant paper,
http://iopscience.iop.org/article/10.1088/1367-2630/16/6/063065;jsessionid=53C3B6B3509E716A9F862046AB11F60D.c4.iopscience.cld.iop.org
 
<http://iopscience.iop.org/article/10.1088/1367-2630/16/6/063065;jsessionid=53C3B6B3509E716A9F862046AB11F60D.c4.iopscience.cld.iop.org>

(figure 13 and 14)
with the full code given in Appendix D5.

Good luck,

Xavier

> Le 20 oct. 2016 à 16:34, Lee Kin <llwa...@gmail.com> a écrit :
> 
> Hi there,
>   I start to use kwant not long ago. I am still following the instruction to 
> learn the basic usage of the code. I have a simple code in hand to handle the 
> square lattices with some given potential of certain form. I am thinking to 
> add the constant magnetic field along z direction. In my text, it is said 
> that such field could be described by vector potential such that the 
> potential could be modified as alpha*(x**2 + y**2) in which alpha is 
> proportional to the magnitude of the field. I add this to each lattice site 
> but then it diverges in solution. I saw other material online and it said the 
> magnetic field could be added by modifying the hopping phase. I don't quite 
> follow that. Any suggestion is welcomed. Thanks.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to