Dear Kwant developer,
Is it possible to combine the s matrices for two structures to obtain the s matrix of a large system? The evanescent modes in a lead can be excited, does the s matrix or some other object contain the evanescent mode information so that it can be used for combining two s matrices?
KS Chan
Disclaimer: This email (including any attachments) is for the use of the intended recipient only and may contain confidential information and/or copyright material. If you are not the intended recipient, please notify the sender immediately and delete this email and all copies from your system. Any unauthorized use, disclosure, reproduction, copying, distribution, or other form of unauthorized dissemination of the contents is expressly prohibited.

Good day
I am trying to make a simple 3D geometry; a cylinder. Now, the only
tutorial available for 3D is
https://kwant-project.org/doc/1.0/tutorial/tutorial6#d-example-zincblende-s…
so there is a chance my problems come from that.
The thing is that I cannot seem to attach any leads. The scattering region
code works just fine, but when I try to attach the leads I get the error
Site family <unnamed Monatomic lattice, vectors [0.0 1.0 1.0], [1.0
0.0 1.0], [1.0 1.0 0.0], origin [0.0 0.0 0.0]> does not have
commensurate periods with symmetry
<kwant.lattice.TranslationalSymmetry object at 0x00000000093B17F0>.
The error is not completely opague of course; something seems to be
problematic about the lattice vectors and the proposed symmetry. For
that it is perhaps good to include the full code:
def make_system(a=1, t=1.0, W=10, L=5, r2=20):
lat = kwant.lattice.general([(0, a, a), (a, 0, a), (a, a, 0)])
sys = kwant.Builder()
def ring(pos):
(x, y,z) = pos
rsq = x ** 2 + y ** 2
return rsq < r2 ** 2 and 0 <= z < L
sys[lat.shape(ring, (1, 1,1))] = 4 * t
sys[lat.neighbors()] = -t
sym_lead = kwant.TranslationalSymmetry((0, 0,-a))
lead = kwant.Builder(sym_lead)
def lead_shape(pos):
(x, y,z) = pos
rsq = x ** 2 + y ** 2
return rsq < r2 ** 2
lead[lat.shape(lead_shape, (0, 0,0))] = 4 * t
lead[lat.neighbors()] = -t
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
return sys
I personally do not see what is wrong with this, especially as the
scattering region looks fine without the leads. According to the error
there is something wrong with the lattice vectors themselves? Should I
change them in some way?
I don't care about any particular structure here really, I am just
looking for the 3D equivalent of the square lattice and according to
the source code that is defined as
def square(a=1, name=''):
"""Make a square lattice."""
return Monatomic(((a, 0), (0, a)), name=name)
so I figured my definition should work for 3D.
Could someone point out the obvious mistake I am making?

HI,
I'm interested in computing transverse spin currents and/or something
related to
spin-Hall conductivity in spin-orbit coupled wires.
Any example out there?
Thanks in advance.
Best,
Jose

Hello,
My question is based on the reply to
https://www.mail-archive.com/kwant-discuss@kwant-project.org/msg00983.html.
Here it is written that one can extend the KWANT zero temperature
infinitesimal source drain bias conductance to finite bias, finite
temperature by numerical integration. The answer refers the user to the
Datta book to see how exactly this is done.
However, I have looked at the Datta book and I cannot figure out how to
implement it in KWANT. My problem has a few parts, so below I will build it
up step by step so that one can see if perhaps I make a mistake somewhere.
However, I can start with a very simple question:
In order to account for finite temp, you need the fermi dirac distribution
(or its derivative). Inside the distribution we have k_B*T; how do you
rescale k_B*T to agree with the units of the kinetic term? The kinetic term
is t = hbar^2/(2m a^2). If I set t = 1, what do I do to kB*T? I don’t
understand this as a (the lattice constant) enters the expression, but
changing a and keeping t fixed does not change any of my results. So
somehow I need to relate hbar^2/2m with kB*T as these are the fixed
constants? It is the fact that a enters into t but not into kb*T that makes
it difficult to understand I think.
Now, for my main question, lets start from the basics. If I am not
mistaken, in the default zero T zero bias case KWANT essentially calculates
G = 2e^2/h * T(E_fermi), where T(E_fermi) is the quantity calculated from
smatrix = kwant.smatrix(sys, energy)
T = smatrix.transmission(1, 0)
This makes sense in the context of linear response. Now if we want to go to
finite temp, finite bias we take the expression from Datta
I = 2e/h \int{dE T(E) (f_L(E) - f_R(E))}
where L,R is the left and right leads at potentials \mu_L, \mu_R abd f_L is
then the fermi-dirac distribution of the left lead.
Now this is the current; we don’t want the current, we want the
conductance. So let us set \mu_L = E_f – eV_sd/2 and \mu_R = E_f + eV_sd/2
(which I suppose one should be able to do without loss of generality, but
correct me if I am wrong). If we then want to find the conductance we
simply take the derivative with respect to V_sd giving us
G = 2e^2/h \int{dE T(E) d(f_L(E) - f_R(E))/dVsd}
One simple limit here is to take T = 0, in which case the fermi-dirac
distribution becomes a step function, its derivative a delta function, and
we (not forgetting to carry the minus sign and the ½) get that
G = e^2/h (T(E_f+V_sd/2) + T(E_f-V_sd/2)
So if I am not mistaken, one can calculate the finite-bias zero-temperature
conductance without numerical integration; you simply have to evaluate
smatrix.transmission(1,0) at two different energies.This seems correct as
it recovers the standard KWANT expression for zero bias.
Now for finite temperature and zero bias things are different of course.
One can taylor expand (f_L(E) - f_R(E)) as df_L/dV_sd *eV_sd = -df_L/dE
*eV_sd so that
G = e^2/h \int{dE T(E) -df_L(E) /dE}
Now here things get a bit tricky: the interval is over all energies. Of
course the fermi-dirac derivative is strongly peaked around E_fermi, but
numerically this will still be annoying, will it not? If I were to
numerically calculate the above current I’d need to evaluate
smatrix.transmission(1, 0) for a huge range of energies, right?
Could you tell me something about how one would go about this in a smart
way? Do you use the trapezoid method? How do you keep it from taking ages?
What I would come up with myself is something like
data = []
integ = []
for energy in energies:
for erange in np.linspace(0.5*energy,1.5*energy,num=100):
smatrix = kwant.smatrix(sys, erange,args=[params])
integ.append(smatrix.transmission(1,0)*-dfd(erange,energy,T))
data.append(1.5*energy/100*(integ[0]+integ[100-1]+2*sum(integ[1:100-2])))
integ = []
where in the above dfd(energy,mu,temp) is the derivative of the fermi-dirac
distribution. But this seems horribly inefficient, and I don't see how this
would recover the KWANT limit (as we get some delta-like peak around E_f),
but perhaps that is too much to ask.
Finally we return to the full expression for finite bias and finite T:
G = 2e^2/h \int{dE T(E) d(f_L(E) - f_R(E))/dVsd}
I suppose evaluating this is equally difficult/easy as finite T with zero
bias; all that changes is that one now has to calculate two derivatives of
the fermi-dirac distribution which will form some sort of window around
E_fermi. Here my question this repeats itself; how does one compute such
an integral efficiently?
Kind regards,
John

Dear Sir/Madam，
Hello, I am interested in Green Function, so I read related Kwant codes (kwant.solver.greens_function, make_linear_system, solve_linear_system, etc.). I found a lot of optimizations in Kwant, such as LU Decomposition and Matrix Partition, which make Kwant more efficient. To calculate Green Function, we need to calculate the self-energy of leads. Though I know how to get self-energy by using command "lead.selfenergy(energy)". I want to know how this command works, the codes in "leads.py" are too diffcult to me.
Sincerely,
Hu Yongliang

Dear Kwant-team,
I have a question regarding impurities. I have a system where I want to add a random impurity potential between -w/2 and w/2. I do this using
w_imp*uniform(repr(s), salt)*s0 - w_imp/2 * s0
which seems to be working fine. Then, I want the impurity averaged conductance. So I make a list of salts using range(0,200) and loop through the salts, and find the smatrix for all of them:
smatrix= kwant.smatrix(syst, energy=energy, args=(str(salts[n]))
and then calculate the transmission for each salt and take the average. I guess I just want to know if this is the correct way to do it? Have I understood correctly how salt and this uniform-function works?
Best regards,
Camilla

Hi, sorry to bother you again.
How interface parameter of class kwant.builder.BuilderLead(builder, interface) is specified? How to define a sequence of sites which were attached to the lead?
С уважением, Татьяна Григоренко

Dear Reader,
I am new to KWANT and trying to figure out if it is suitable for calculating transport properties of gate-defined quantum dots made out of nanowires, along the lines of the structure used in https://arxiv.org/abs/cond-mat/0609463. Now, I understand that the mailing list is not a place to ask people to do my work for me, and my question is also not for someone to do this. What I am looking for is some insights into if this is possible (and not all that difficult) with the package.
At first sight (and going through the tutorials as well as the APS March Meeting material) this does not seem straightforward; what I struggle with is how to define this type of dot in KWANT. Now, one way would of course be to built the entire 3D geometry of the system, but this will be computationally expensive, and probably also rather tricky to do in terms of defining everything, from the hexagonal wire itself to all of the gates and oxide layers and such. Some abstraction would be preferred, perhaps even reducing the dimensionality and making a 2D system, such as often done in the tutorial. Is this a good idea?
My problem is that if one does this, then I run into the problem of how to model the 'half wrap-around' type gates typically used in these devices. In the transport through barrier section of the APS March Meeting material there is a section on how to model realistic potentials, but this would not work all that well for these wrap around type gates.
On the other hand, in a way they are perhaps not so different from the QPC in that section. One could model the three gates as something like https://i.imgur.com/WZC983c.png as they do essentially form channels in the wire. Apart from if this sacrifices too much of the nanowire nature in favor of a 2DEG system, I do suppose such a system should in principle be able to be treated as a quantum dot.
I haven't been able to confirm this as I am not yet sure how one can apply a source-drain voltage in KWANT; I first thought that this would probably be related to the energy of the modes, but then again I have not been able to produce Coulomb diamonds in this way.
The question is getting rather lenghty, and also a bit unclear at this point. Perhaps I should finish up by stating it in a concise form; would you think that it is possible to simulate the transport of such a gate defined nanowire quantum dot device with KWANT, and if so, is the approach I am suggesting above a viable one, or would you go about it very differently?
Kind regards
Jonathan
<http://aka.ms/weboutlook>