Dear Adel,
    Many thanks for your kind help. Your suggestions indeed work quite well. 
Previously, the length scale in my calculation was too small. When increasing 
the length and the width, magnetic field plays an important role to modify the 
energy level and conductance.
    Before closing this thread, I have a final question that I need your help. 
I have tested a simply model, say H(k_x, k_y)=A * ((k_x+c*B*y)**2 + k_y**2) * 
sigma_0 [magnetic field along z direction, and the leads are parallel to x 
direction]. My question is: how to find the appropriate grid to discretize the 
model?
    I consider a system with length L = 2000 Ang, and width W = 500 Ang. When 
discretizing the effective Hamiltonian model, I use the grid a1 = 10 Ang and a2 
= 20 Ang, respectively. I find that using a1 and a2 (to discretize the model) 
results in very different conductance. 
    In my mind, this "strange" thing comes from the following facts:
    - Using a smaller grid value create more lattice sites along the width 
direction (e.g., a1=10 => 500/10=50 sites; a2=20 => 500/20 = 25 sites). More 
sites along the width direction imply more band channels for contributing to 
the conductance.
    - I also check the discretized Hamiltonian, and find that the onsite 
energies are very different for a1 = 10 and a2 = 20 grid. Consequently, the 
band structures for a1 and a2 cases look very different (for e.g., the energy 
scale, etc).
    - For a fixed concentration of carriers, the Fermi level for a1 and a2 
cases should be different as well.

    In several tutorials, I find that people use a = 1 or a = 10 to discretize 
the continuum model. However, I do not know why these two values are 
meaningful. I was also trying to decrease the grid value a, so that the 
computed conductance can be converged. However, my guess is that the 
calculations seem not be converged with decreased a value, possibly because of 
the points mentioned above.

    Now, I feel quite confused about how to discretize the continuum model (for 
example, with which grid value). Could you please give me some hints to solve 
this issue? 
    I appreciate it very much for your help.


PS: I show below my python script

Appendix I: Python script


import numpy as np
from matplotlib import pyplot
import kwant
import kwant.continuum

import copy
import ipywidgets
from tqdm.notebook import tqdm
import scipy.sparse.linalg as sla


pi = np.pi

def make_system(W = 500, L = 2000, a = 10.0):

     
    hamiltonian = """
                 + A * ((k_x+c*B*y)**2 + k_y**2) * sigma_0
                  """

    hamiltonian = kwant.continuum.sympify(hamiltonian)
    print(hamiltonian)
    template = kwant.continuum.discretize(hamiltonian, grid=a)
    print(template)


    def scatter_shape(site):
        x, y = site.pos
        return 0 <= y < W and 0 < x < L

    def lead_shape(site):
        x, y = site.pos
        return 0 <= y < W
    
    syst = kwant.Builder()
    syst.fill(template, scatter_shape, (a, a))

# We use the trick from the lecture setting Delta=0 in the leads
    lead_left = kwant.Builder(kwant.TranslationalSymmetry([-a, 0]))
    lead_left.fill(template.substituted(B='B_lead'), lead_shape, (0, a))

    lead_right = kwant.Builder(kwant.TranslationalSymmetry([a, 0]))
    lead_right.fill(template.substituted(B='B_lead'), lead_shape, (0, a))


    syst.attach_lead(lead_left)
    syst.attach_lead(lead_right)

    syst = syst.finalized()
    kwant.plot(syst);

    return syst,lead_left,lead_right


syst1,left1,right1=make_system(W = 1000,L = 6000,a = 10.0)
syst2,left2,right2=make_system(W = 1000,L = 6000,a = 20.0)


kwant.plotter.bands(left1.finalized(), params=dict(A=3.8, c=-1.519266e-05, 
B_lead=0.0))
kwant.plotter.bands(left2.finalized(), params=dict(A=3.8, c=-1.519266e-05, 
B_lead=0.0))
pyplot.show()


Bfield = np.linspace(0, 5, 501)

Gs1=[]
Gs2=[]

paramsB=dict(A=3.8, c=-1.519266e-05)


for B1 in tqdm(Bfield):
    Beff=dict(B=B1,B_lead=0)
    smat1 = kwant.smatrix(syst1, energy=0.02, params={**paramsB, **Beff})
    Gs1.append(smat1.transmission(1, 0))
    smat2 = kwant.smatrix(syst2, energy=0.02, params={**paramsB, **Beff})
    Gs2.append(smat2.transmission(1, 0))
    
    
pyplot.plot(Bfield, Gs1, label='2')
pyplot.plot(Bfield, Gs2, label='4')
pyplot.legend()
pyplot.ylabel("G [$e^2/h$]")
pyplot.xlabel("B [T]")





Appendix II: the onsite energy for models discretized with different grid values
     ______________for a1 = 10, we have the following output ______
_cache_0 = (
array([[1.+0.j, 0.+0.j],
       [0.+0.j, 1.+0.j]]))
_cache_1 = (
array([[0.04+0.j, 0.  +0.j],
       [0.  +0.j, 0.04+0.j]]))
_cache_2 = (
array([[0.+0.j, 0.+0.j],
       [0.+0.j, 0.+0.j]]))
def onsite(site, A, B, c):
    (x, y, ) = site.pos
    return (A*B**2*c**2*y**2) * (_cache_0) + (A) * (_cache_1) + (1) * (_cache_2)


     ______________for a2 = 20, we have the following output ______
_cache_0 = (
array([[1.+0.j, 0.+0.j],
       [0.+0.j, 1.+0.j]]))
_cache_1 = (
array([[0.01+0.j, 0.  +0.j],
       [0.  +0.j, 0.01+0.j]]))
_cache_2 = (
array([[0.+0.j, 0.+0.j],
       [0.+0.j, 0.+0.j]]))
def onsite(site, A, B, c):
    (x, y, ) = site.pos
    return (A*B**2*c**2*y**2) * (_cache_0) + (A) * (_cache_1) + (1) * (_cache_2)

Reply via email to