Dear Sir,
I am a PhD student of Hong Kong University of Science and Technology. I
want to use KWANT to caculate Hall resistance of a Hall bar structure.We
can get the conductance between 6 electrodes, but how to get hall
resistance? Can you give me some help? Thank you very much.
Best Regards,
Zhang Bing

Dear all,
I am using Kwant to study a system with both spins and electron and hole,
so the hopping matrix is 4X4. Now I want to know how to separate the spins,
electron and hole. I study this through the "2.6. Superconductors: orbital
degrees of freedom, conservation laws and symmetries"
smatrix = kwant.smatrix(syst, energy)
data.append(smatrix.submatrix((0, 0), (0, 0)).shape[0]
-smatrix.transmission((0, 0), (0, 0)) +smatrix.transmission((0, 1), (0, 0)))
I do not find more information about this for kwant.
For my system, if I have 3 leads, and the hopping and onsite energy is set
in this order:
(e↑,0,0,0)- spin up electron,first row of the 4X4matrix
(0,e↓,0,0)- spin down electron,second row of the 4X4matrix
(0,0, h↑ ,0)- spin up hole,third row of the 4X4matrix
(0,0, 0, h ↓ )- spin down hole,fourth row of the 4X4matrix
I want to obtain the transmissions from 0 →2.
smatrix = kwant.smatrix(syst, energy)
The transmission from h↑ to e↑ is: smatrix.transmission((2, 1), (0, 2))
The transmission from h ↓ to e↑ is: smatrix.transmission((2, 1), (0, 3))
Is my understanding correct?
Thanks very much in advance!
Hosein Khani

Dear Kwant developers,
I am having a error with "gauge" when I am adding 1D leads (Chains)
to my 3D system. (I have both Chain leads, where I do not need gauge,
of course,
and nirmal leads, where I do need gauge)
The call:
gauge = kwant.physics.magnetic_gauge(sys)
returns a error:
'not enough values to unpack (expected 2, got 0)',
coming from the
rows, cols = np.array([(i, j)for i, jin syst.graph
if i < nand j < n]).transpose()
in
_check_infinite_syst(syst)
in gauge.py
In my case, n = 1 for a simple chain and so rows, cols are empty.
Best wishes,
Sergey

Dear all,
I am new to Kwant and try to play a little with some of the examples. I have a bit of experience in calculating the transmission in SN- or SNS-junction so I tried to play a little with the example in 2.6. "Superconductors: orbital degrees of freedom, conservation laws and symmetries".
Something strange come up with it.
If I try to calculate the transmission into the superconductor lead by exchanging the calculation of the conductance in line 74 of the example file by
data.append(smatrix.transmission((1, 1), (0, 1)))
I get an error message which tells me that there exists no second subblock. Nevertheless, it should be possible to calculate the transmission of holes from the normal lead into hole-like quasiparticles in the superconductor lead. (This is what I have intended to do there.)
So the question rather is why is there a hole degree of freedom in the normal conductor but not in the superconductor lead?

Hi,
I'm trying to calculate the conductance as a function of energy in a normal metal - superconductor junction with a hexagonal lattice (instead of a square lattice). The figure I want to reproduce and the Hamiltonian is given in the PDF attachment.
In the attached .py file I have tried to calculate the conductance, taking inspiration from tutorial 2.6 in the documentation. However, the conductance I obtain is not what I expect. Is there an issue with how I define my scattering region and leads?
Any feedback would be highly appreciated.
Best,
Martin

Dear user
I hope you are doing well.
I am having troubles when using parallel distribution to run my python
script using kwant.
I went through kwant discuss mailing list and tried to read about similar
issues. I have red for instance the comment made by hristoph Groth Mon, 08 *Aug
2016 08:12:46 -0700.*
*add "from mpi4py import MPI" in the preamble,• substitute kwant.smatrix(…)
-> kwant.smatrix(…, comm=MPI.COMM_WORLD), • execute the script using
"mpiexec", *
I have got an error while using kwant.smatrix(comm=MPI.COMM_WORLD).
kwant does not recognize comm
TypeError: got an unexpected keyword argument 'comm'
I have also tried without comm but with the following command
OMP_NUM_THREADS=1
mpiexec -n 4 python file.py
or
mpirun.openmpi -n 4 -x OMP_NUM_THREADS=1 python file.py
but I got the result 4 times
Regards
BELAYADI

Dear colleagues,
It is our pleasure to announce the first release of the free software
TKwant for time-resolved quantum transport. An introduction to TKwant can be
found in TKwant paper: https://arxiv.org/abs/2009.03132 <https://arxiv.org/abs/2009.03132> . The software itself and its
tutorials can be found here: https://tkwant.kwant-project.org <https://tkwant.kwant-project.org/> .
TKwant is an extension of Kwant (http://kwant-project.org <http://kwant-project.org/>) to time-dependent problems.
A system is defined in TKwant in the same way as in Kwant except that some terms in the Hamiltonian may depend on the time parameter. Any system that can be studied in Kwant (e.g. graphene, metals, superconductors, topological insulators, magnetic systems, 2DEGs, any combination of the above and more) can be extended to TKwant. Typical problems where TKwant can be used include the propagation of voltage pulses, spectroscopy of interferometers, Floquet topological insulators, time resolved Andreev reflection and more.
We had a lot of fun in making this package and we hope that many of you will have a lot of fun using it.
Kind regards,
Xavier and Thomas on behalf of TKwant authors.
___________________________________
Xavier Waintal
Research Director
University Grenoble Alpes
CEA-IRIG, PHELIQS,
17 rue des Martyrs,
38054 Grenoble CEDEX 9, FRANCE
Tel: 33 (0)4 38 78 03 27
email: xavier.waintal(a)cea.fr <mailto:xavier.waintal@cea.fr>
http://www.pheliqs.fr/en/Pages/Portrait/Xavier-Waintal.aspx <http://www.pheliqs.fr/en/Pages/Portrait/Xavier-Waintal.aspx>
http://kwant-project.org <http://kwant-project.org/>
https://tkwant.kwant-project.org <https://tkwant.kwant-project.org/>
___________________________________

Dear all,
I want to calculate the transmission vs incident angle in graphene with a
potential barrier. I use sys = kwant.wraparound.wraparound(sys) and lead
= kwant.wraparound.wraparound(lead, keep=0) to construct the periodical
system. I almost get the correct results, but I find that the definition of
angle is different. Could you please help me to find out the reason. The
results comparison is also attached.
Regards,
Khani Hosein
my code is:
import numpy as np
import matplotlib.pyplot as plt
from numpy import pi,sqrt
import kwant
import sys
from numpy import pi
from math import asin
from matplotlib import pyplot
a = 1.
V0 = 0.0
W = 2.
L = 448
t = 3
def Rectangle(pos):
x,y=pos
return 0<=x<=L and -0.5<=y<=W
sin_30, cos_30 = (1 / 2, sqrt(3) / 2)
lat = kwant.lattice.general([(1, 0), (sin_30, cos_30)],
[(0, 0), (1/2, 1 / (2*sqrt(3)))])
a,b= lat.sublattices
sys = kwant.Builder(kwant.TranslationalSymmetry(lat.vec((-1, 2))))
sys[lat.shape(Rectangle,(0,0.6))]= 0.2
sys[lat.neighbors(1)] = -t
sys = kwant.wraparound.wraparound(sys)
def lead_shape(pos):
x,y=pos
return -0.5<=y<=W
lead = kwant.Builder(kwant.TranslationalSymmetry((1, 0), lat.vec((-1, 2))))
lead[lat.shape(lead_shape,(0,0.6))] = 0.
lead[lat.neighbors(1)] = -t
lead = kwant.wraparound.wraparound(lead, keep=0)
kwant.plot(sys)
sys.attach_lead(lead)
sys.attach_lead(lead.reversed())
kwant.plot(sys)
sys = sys.finalized()
ky=0.
momenta = [-2*pi + 0.002 * 2*pi * i for i in range(1001)]
bands = kwant.physics.Bands(sys.leads[0],[ky])
energies = [bands(k) for k in momenta]
pyplot.figure()
pyplot.plot(momenta, energies)
pyplot.xlabel("momentum [(lattice constant)^-1]")
pyplot.ylabel("energy [t]")
pyplot.show()
kys = np.arange(-0.08, 0.08, 0.0002)
kysp =np.arange(-90, 90, 0.225)
energy=0.08
transmission = []
num_prop = []
thetap=[]
for ky in kys:
theta=180.*asin(ky/energy)/pi
thetap.append(theta)
smatrix = kwant.smatrix(sys, energy, [ky])
transmission.append(smatrix.transmission(1, 0))
num_prop.append(smatrix.num_propagating(0))
print (ky)
plt.plot(thetap, transmission)
plt.show()

Dear Kwant developers,
I would like to ask the following questions about mode wave functions.
1. The mode wave functions can be obtained in three ways: using the smatrix.lead_info, using finalised_lead.mode.wavefunction and using the physics.Progatingmodes. Are they the same? To find the modes used to obtain the s matrix, we should use the modes of matrix.lead_info. Am I correct?
2. I want to find the sites of the mode wave functions obtained from s matrix. Is it correct to use finalised_system.leads[n].sites as mentioned in one of the discussions. I print out finalised_system.leads[n].sites, which is a long list of
Site(kwant.lattice.Monatomic([[1.7320508075688772, 0.0], [0.0, 1.0]], [0.2886751345948129, 0.0], '1', 1), array([0, 0]))
Could you please help me to find out what the information represents?
3. Is it correct to use finalised_system.leads to find the sites information for the mode wave function obtained from the s matrix?
I should be grateful, if you could help me in this regard. Thank you in advance.
Your sincerely,
KS
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.

Dear participants of the kwant-discuss list,
This morning, a person or bot subscribed to this list and sent four
unsolicited messages. We apologize for the disturbance that this has
caused.
As a consequence, we changed the moderation rules of this list. Up to
now, new members who went through the subscription process could post to
the list immediately. From now on, the first posting of new members
will be put on hold for moderation, just like it is already the case for
postings by non-members.
Christoph on behalf of the Kwant team