Dear Kwant community, I am a physics student and I am approaching to Kwant to solve simple problems of scattering. I am new in Kwant and, for this reason, I'm trying to use Kwnat for basic problems of scattering. The most simple problem in my mind is the scattering of a plane-wave (1 dimension) from the left of a potential barrier. If we now suppose the potential barrier is 'zero' everywhere, the scattering matrix, according to the scattering theory, should be 'S={{0,1},{1,0}}'. If I try to compute the reflection and transmission coefficient, I obtained the correct values (1 for reflection and 0 for transmission). But it occurs only for some energies. For example in the code I attached, if I put the value of '10' in 'S=kwant.solvers.default.smatrix(syst,10)' I obtaine for reflection and transmission the value of '0'. Where is my errors? And, is there a way to print the entire elements of the scattering matrix ?
Yours sincerely Lorenzo Bagnasacco
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().system('pip install kwant') get_ipython().system('pip install SymPy') # In[2]: import kwant from matplotlib import pyplot import numpy as np import kwant.continuum import math # In[3]: template1 = kwant.continuum.discretize('k_x * k_x') print(template1) # In[4]: syst = kwant.Builder() # In[5]: a=1 lat=kwant.lattice.square(a) # In[6]: t=1 leng=20 # In[7]: for i in range(leng): #On-site Hamiltonian syst[lat(i,0)] = 2 * t #Hopping in x-direction if i > 0: syst[lat(i,0),lat(i-1,0)] = - t # In[8]: kwant.plot(syst); # In[9]: sym_left_lead = kwant.TranslationalSymmetry((-a,0)) left_lead=kwant.Builder(sym_left_lead) left_lead[lat(-1,0)]= 2 * t left_lead[lat(-1,0),lat(0,0)]= - t # In[10]: kwant.plot(left_lead); # In[11]: syst.attach_lead(left_lead) kwant.plot(syst); # In[12]: sym_right_lead = kwant.TranslationalSymmetry((a,0)) right_lead=kwant.Builder(sym_right_lead) right_lead[lat(leng,0)]= 2 * t right_lead[lat(leng,0),lat(leng-1,0)]= - t # In[13]: kwant.plot(right_lead); # In[14]: syst.attach_lead(right_lead) kwant.plot(syst); # In[15]: syst=syst.finalized() # In[20]: S=kwant.solvers.default.smatrix(syst,10) # In[21]: trans = [] refl = [] trans.append(S.transmission(1, 0)) refl.append(S.transmission(0, 0)) # In[22]: trans # In[23]: refl # In[ ]: