
Dear Yue, Thank you. If you see the figure in the FAQ, you have a square lattice. The primitive vectors are v1=[a, 0] and v2=[0, a], so the first site is at the discretized position (i=1, j=0, along the x axis) and the second site is at (i=1, j=1, along the y axis). That is why you see them lined along the y direction. you have several choices to adopt. syst[lat(0, 0)] = 4, syst[lat(0, 1)] = 4 It depends on the way you define your system. I guess the link is very useful to you in order to become familiar with kwant. best Le jeu. 28 déc. 2023 à 14:43, <araya0sun@gmail.com> a écrit :
Dear Adel,
Thank you very much for your advice, I am looking at this tutorial now, but I have a doubt.
From https://kwant-project.org/doc/dev/tutorial/faq, I saw an example code:
a = 1 lat = kwant.lattice.square(a) syst = kwant.Builder() syst[lat(1, 0)] = 4 syst[lat(1, 1)] = 4 kwant.plot(syst) --------------------------------------------- And explained, In the above snippet we added 2 sites: lat(1, 0) and lat(0, 1). Both of these sites belong to the same family, lat, but have different tags: (1, 0) and (0, 1) respectively. syst[lat(1, 0)] and syst[lat(1, 1)] are written in the Code, why is site lat(1, 0) and lat(1, 1)?
Sincerely, Yue Xiang