Hi all. I would like to know how to compute Hall conductance in a honeycomb lattice using Kwant. In my attempt, I started with the construction of the honeycomb lattice: import kwantimport matplotlib.pyplot as pltimport numpyfrom cmath import expfrom kwant.digest import gauss lat = kwant.lattice.honeycomb()sys = kwant.Builder() def rectangle(pos): x, y = pos return 0 < x < 40 and 0 < y < 20 sys[lat.shape(rectangle, (1, 1))] = 0sys[lat.neighbors()] = 1 sym = kwant.TranslationalSymmetry((1, 0))sym.add_site_family(lat.sublattices[0], other_vectors=[(1, 2)])sym.add_site_family(lat.sublattices[1], other_vectors=[(1, 2)]) lead = kwant.Builder(sym) def lead_shape(pos): x, y = pos return 0 < y < 20 lead[lat.shape(lead_shape, (1,1))] = 4lead[lat.neighbors()] = 1 sys.attach_lead(lead)sys.attach_lead(lead.reversed()) My questions are: How to attach another pair of leads at 13 < x < 15 and 23 < x < 25 with y = 10 and y =0? I tried # For the 2nd Lead sym2 = kwant.TranslationalSymmetry((1, 0)) sym2.add_site_family(lat.sublattices[0], other_vectors=[(1, 2)]) sym2.add_site_family(lat.sublattices[1], other_vectors=[(1, 2)]) lead2 = kwant.Builder(sym) def lead2_shape(pos2): x, y = pos2 return 13 < x < 15, 10 < y < 10 lead[lat.shape(lead2_shape, (1,1))] = 4 lead[lat.neighbors()] = 1 sys.attach_lead(lead2) sys.attach_lead(lead2.reversed()) but nothing works. Also How to calculate hall conductance from these leads (assuming hopping is by Peierls substitution where t is replaced by an exponential)? I am very new to the kwant program, as this is for an undergraduate research.Regards, James
Hi James, Welcome! * Can you be more specific when saying "nothing works"? What exactly goes opposite to your expectations? * Hall conductance: take a look at this thread: http://thread.gmane.org/gmane.comp.science.kwant.user/276 Best, Anton On Tue, Aug 25, 2015 at 1:12 PM, james edward hernandez <kibwiw@yahoo.com.ph> wrote:
Hi all.
I would like to know how to compute Hall conductance in a honeycomb lattice using Kwant. In my attempt, I started with the construction of the honeycomb lattice:
import kwant import matplotlib.pyplot as plt import numpy from cmath import exp from kwant.digest import gauss
lat = kwant.lattice.honeycomb() sys = kwant.Builder()
def rectangle(pos): x, y = pos return 0 < x < 40 and 0 < y < 20
sys[lat.shape(rectangle, (1, 1))] = 0 sys[lat.neighbors()] = 1
sym = kwant.TranslationalSymmetry((1, 0)) sym.add_site_family(lat.sublattices[0], other_vectors=[(1, 2)]) sym.add_site_family(lat.sublattices[1], other_vectors=[(1, 2)])
lead = kwant.Builder(sym)
def lead_shape(pos): x, y = pos return 0 < y < 20
lead[lat.shape(lead_shape, (1,1))] = 4 lead[lat.neighbors()] = 1
sys.attach_lead(lead) sys.attach_lead(lead.reversed())
My questions are: How to attach another pair of leads at 13 < x < 15 and 23 < x < 25 with y = 10 and y =0? I tried # For the 2nd Lead sym2 = kwant.TranslationalSymmetry((1, 0))
sym2.add_site_family(lat.sublattices[0], other_vectors=[(1, 2)]) sym2.add_site_family(lat.sublattices[1], other_vectors=[(1, 2)])
lead2 = kwant.Builder(sym)
def lead2_shape(pos2): x, y = pos2 return 13 < x < 15, 10 < y < 10
lead[lat.shape(lead2_shape, (1,1))] = 4 lead[lat.neighbors()] = 1
sys.attach_lead(lead2) sys.attach_lead(lead2.reversed())
but nothing works.
Also How to calculate hall conductance from these leads (assuming hopping is by Peierls substitution where t is replaced by an exponential)?
I am very new to the kwant program, as this is for an undergraduate research. Regards, James
Hi, Did you already do a search on the mailing list for calculating Hall conductance? I remember that a similar question has been asked before, and you may get a more comprehensive answer there.
How to attach another pair of leads at 13 < x < 15 and 23 < x < 25 with y = 10 and y =0?
I'm not entirely sure what you are trying to achieve; you seem to want a lead that is attached to the centre of the sample, but you are working with a 2D material. In any case, the shape function you posted
def lead2_shape(pos2): x, y = pos2 return 13 < x < 15, 10 < y < 10
cannot possibly work because: a) you return a tuple instead of a True or False value; b) even if the condition were `13 < x < 15 and 10 < y < 10`, this will always evaluate to False as `y` cannot be simultaneously less than and greater than 10. I would suggest that you define exactly what it is that you are trying to do, maybe posting a followup question to the mailing list
Also How to calculate hall conductance from these leads (assuming hopping is by Peierls substitution where t is replaced by an exponential)?
This is more of a physics question; I suggest you ask your professors about how to obtain the conductance matrix from the scattering matrix or else look online (maybe on https://physics.stackexchange.com/) or in a book. Happy kwanting, Joe
Hi, thanks for the quick reply. Correct. I wanted to attach the lead at the center of the sample. The reason for inputting 13 < x < 15 is by an analogy with the first pair of leads (which were placed at the edges). On Tuesday, August 25, 2015 10:45 PM, Joseph Weston <joseph.weston08@gmail.com> wrote: Hi, Did you already do a search on the mailing list for calculating Hall conductance? I remember that a similar question has been asked before, and you may get a more comprehensive answer there.
How to attach another pair of leads at 13 < x < 15 and 23 < x < 25 with y = 10 and y =0?
I'm not entirely sure what you are trying to achieve; you seem to want a lead that is attached to the centre of the sample, but you are working with a 2D material. In any case, the shape function you posted
def lead2_shape(pos2): x, y = pos2 return 13 < x < 15, 10 < y < 10
cannot possibly work because: a) you return a tuple instead of a True or False value; b) even if the condition were `13 < x < 15 and 10 < y < 10`, this will always evaluate to False as `y` cannot be simultaneously less than and greater than 10. I would suggest that you define exactly what it is that you are trying to do, maybe posting a followup question to the mailing list
Also How to calculate hall conductance from these leads (assuming hopping is by Peierls substitution where t is replaced by an exponential)?
This is more of a physics question; I suggest you ask your professors about how to obtain the conductance matrix from the scattering matrix or else look online (maybe on https://physics.stackexchange.com/) or in a book. Happy kwanting, Joe
Hi,
Hi, thanks for the quick reply. Correct. I wanted to attach the lead at the center of the sample. The reason for inputting 13 < x < 15 is by an analogy with the first pair of leads (which were placed at the edges).
OK, I've never seen anyone want to do this, especially for QHE in graphene where usually you just want some 4 or 6 terminal setup with the leads placed at the edges of the sample. To do what you want you're going to have to attach the lead manually. the `attach_lead` method is for attaching leads that come from infinity and interrupt the system at the edge; this is not the case that you have. It's kind of annoying to attach the lead manually so what you can do is the following. Attach the lead at the edge of the sample using `attach_lead`, and then move the sites in the interface to where you want them to be. You will then need to delete the sites which (may) have been added to the system in order to attach the lead at the edge. There is a minimal example as an attachment that just attaches the lead in the middle of the system and moves the interface. I hope that helps. Happy kwanting, Joe
participants (3)

Anton Akhmerov

james edward hernandez

Joseph Weston