Hi, I am trying to simulate a finite size quantum hall strip with periodic boundary in one direction. I am using a modified code from Edx course on Topology in Condensed Matter. The system hangs when sys.finalized is called. Is it possible to have periodic system finite system in kwant? I don't want to resort to TranslationalSymmetry in the periodic direction. Here is the code snippet. # Building system lat = kwant.lattice.square() sys = kwant.Builder() sys[(lat(x, y) for x in range(L) for y in range(W))] = 4*par.t-par.mu def hopx(y, par): return -par.t*np.exp(-1j * par.B * y) for i in xrange(L): for j in xrange(W): if j > 0: sys[lat(i, j), lat(i, j - 1)] = -par.t # Hopping in x-direction if i > 0: sys[lat(i, j), lat(i - 1, j)] = hopx(j, par) #Making the system periodic for j in range(W): sys[lat(L-1, j), lat(0, j)] = hopx(j, par)*np.exp(1j * par.phi) Thanks
Hi, This should work no problem, and it does work for me. Can you attach a full example script that can be run? Thanks, Joe On 22 October 2015 at 23:13, R Mathew <ranchu@gmail.com> wrote:
Hi,
I am trying to simulate a finite size quantum hall strip with periodic boundary in one direction. I am using a modified code from Edx course on Topology in Condensed Matter.
The system hangs when sys.finalized is called.
Is it possible to have periodic system finite system in kwant? I don't want to resort to TranslationalSymmetry in the periodic direction.
Here is the code snippet. # Building system lat = kwant.lattice.square() sys = kwant.Builder()
sys[(lat(x, y) for x in range(L) for y in range(W))] = 4*par.t-par.mu
def hopx(y, par): return -par.t*np.exp(-1j * par.B * y)
for i in xrange(L): for j in xrange(W): if j > 0: sys[lat(i, j), lat(i, j - 1)] = -par.t
# Hopping in x-direction if i > 0: sys[lat(i, j), lat(i - 1, j)] = hopx(j, par)
#Making the system periodic for j in range(W): sys[lat(L-1, j), lat(0, j)] = hopx(j, par)*np.exp(1j * par.phi)
Thanks
Joseph Weston <joseph.weston08 <at> gmail.com> writes:
Hi,
This should work no problem, and it does work for me.Can you attach a full
example script that can be run?
Thanks,
Joe
Thans Joe. I was bit hasty in raising the issue. I apologize for that. I was missing an argument in the function the snippet is part of. I will try to remove this thread as it of not much value, expect for the fact that you should try to more careful before raising an issue :)
Hi,
I was bit hasty in raising the issue. I apologize for that. I was missing an argument in the function the snippet is part of. I will try to remove this thread as it of not much value, expect for the fact that you should try to more careful before raising an issue :)
No need to apologize! I think trying to remove the thread will be more complicated than not; don't worry about it. Joe
participants (3)
-
Joseph Weston
-
Joseph Weston
-
R Mathew