Dear Joseph,

As per your instructions I have build the system, but the code is not
giving the desired result.
Here is the code please have a look on it.

import kwant
import matplotlib.pyplot as plt
import tinyarray
import numpy as np
from numpy import cos, sin, pi
import cmath
from cmath import exp

sigma_0 = tinyarray.array([[1, 0], [0, 1]])
sigma_x = tinyarray.array([[0, 1], [1, 0]])
sigma_y = tinyarray.array([[0, -1j], [1j, 0]])
sigma_z = tinyarray.array([[1, 0], [0, -1]])


def make_system(a=1, L=10, W=50, H=5, t=1.0, t_x=1.0, t_y=1.0, t_z=1.0,
lamda=0.2, beta=1.05, B=0, y=1):
    def onsite(site):
        return (1.0 * cos(beta) + 2 * 1.0) * sigma_z

    def hoppingx(site0, site1):
        return -0.5 * t * sigma_z - 0.5 * 1j * t_x * sigma_x

    def hoppingy(site0, site1):
        return -0.5 * t_z * sigma_z - 0.5 * 1j * t_y * sigma_y

    def hoppingz(site0, site1):
        return (-0.5 * t_z * sigma_z - 0.5 * 1j * lamda * sigma_0) * exp(2
* pi * 1j * B * a * y)


    syst = kwant.Builder()
    lat = kwant.lattice.cubic(a)
    syst[(lat(z, y, x) for z in range(H) for y in range(W) for x in
range(L))] = onsite
    syst[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingx
    syst[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy
    syst[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingz

    lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0, 0)))

    lead[(lat(z, y, x) for z in range(H) for y in range(W) for x in
range(L))] = onsite
    lead[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingx
    lead[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy
    lead[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingz

    syst.attach_lead(lead)
    syst.attach_lead(lead.reversed())
    syst = syst.finalized()
    return syst
def analyze_system():
    syst = make_system()
    kwant.plot(syst)
    kwant.plotter.bands(syst.leads[0],
                        momenta=np.linspace(-3, 3, 201), show=False)

    plt.grid()
    plt.xlim(-3, 3)
    plt.ylim(-0.2, 0.2)
    plt.xlabel('momentum [1/A]')
    plt.ylabel('energy [E]')
    plt.show()
analyze_system()

best regards,
Naveen

On Mon, May 6, 2019 at 3:12 PM Naveen Yadav <naveengunwa...@gmail.com>
wrote:

> Thanks, I'll check it out.
>
>
>
>
>
>
>
>
>
>
>
>
>
> Naveen
> Department of Physics & Astrophysics
> University of Delhi
> New Delhi-110007
>
> On Mon, May 6, 2019, 15:10 Joseph Weston <joseph.westo...@gmail.com>
> wrote:
>
>>
>>
>>
>> Then as you said I have to multiply the hopping in z direction by exp(2 *
>> pi * 1j *  B * a* y). But how can I build a 3D system from here. I know
>> that 2D systems can be written as *lat = kwant.lattice.square(a), *but I
>> don't know how should I proceed to bulid a lattice in 3D using the above
>> onsite and hoppings? Please help me regarding this.
>>
>>
>> The tutorials explain how to make lattices in arbitrary numbers of
>> dimensions. How about making a cubic lattice in 3D?
>>
>>
>> Happy Kwanting,
>>
>>
>> Joe
>>
>

-- 


With Best Regards
NAVEEN YADAV
Ph.D Research Scholar
Deptt. Of Physics & Astrophysics
University Of Delhi.

Reply via email to