Пример #1
0
def Junc_eff_Ham_gen(omega,
                     Wj,
                     Lx,
                     cutxT,
                     cutyT,
                     cutxB,
                     cutyB,
                     ax,
                     ay,
                     kx,
                     m_eff,
                     alp_l,
                     alp_t,
                     mu,
                     Vj,
                     Gam,
                     delta,
                     phi,
                     Vsc=0,
                     Gam_SC_factor=0,
                     iter=50,
                     eta=0,
                     plot_junction=False):
    # Generates the effective Hamiltonian for the Junction, which includes the self-energy from both of the SC regions
    # * omega is the (real) energy that goes into the Green's function
    # * W is the width of the junction
    # * ay_targ is the targeted lattice constant
    # * kx is the wavevector along the length of the junction
    # * m_eff is the effective mass
    # * alp_l is the longitudinal spin-orbit coupling coefficient
    # * alp_t is the transverse spin-orbit coupling coefficient
    # * mu is the chemical potential
    # * Vj is an addition potential in the junction region (V = 0 in SC regions by convention)
    # * Gam is the Zeeman energy in the junction
    # * Gam_SC = Gam_SC_factor * Gam, which is the Zeeman energy in the SC regions
    # * delta is the magnitude of the SC pairing in the SC regions
    # * phi is the phase difference between the two SC regions
    # * iter is the number of iteration of the algorithm to perform
    # * eta is the imaginary component of the energy that is used for broadening
    if cutxT == 0 and cutxB == 0:
        Nx = 3
        Lx = Nx * ax
    else:
        Nx = int(Lx / ax)

    Wj_int = int(
        Wj / ay
    )  # number of lattice sites in the junction region (in the y-direction)
    Ny = Wj_int + 2  #add one SC site on each side

    coor = shps.square(Nx, Ny)  #square lattice
    NN = nb.NN_sqr(coor)
    NNb = nb.Bound_Arr(coor)

    Gam_SC = Gam_SC_factor * Gam

    H_J = spop.HBDG(coor=coor,
                    ax=ax,
                    ay=ay,
                    NN=NN,
                    NNb=NNb,
                    Wj=Wj_int,
                    cutxT=cutxT,
                    cutyB=cutyB,
                    cutxB=cutxB,
                    cutyT=cutyT,
                    Vj=Vj,
                    Vsc=Vsc,
                    mu=mu,
                    gamx=Gam,
                    alpha=alp_l,
                    delta=delta,
                    phi=phi,
                    qx=kx,
                    meff_sc=m_eff,
                    meff_normal=m_eff,
                    plot_junction=plot_junction)

    Gs, Gb, sNRG_bot = bot_SC_sNRG_calc(omega=omega,
                                        Wj=Wj,
                                        Lx=Lx,
                                        cutxT=cutxT,
                                        cutxB=cutxB,
                                        ax=ax,
                                        ay=ay,
                                        kx=kx,
                                        m_eff=m_eff,
                                        alp_l=alp_l,
                                        alp_t=alp_t,
                                        mu=mu,
                                        Gam_SC=Gam_SC,
                                        delta=delta,
                                        phi=phi,
                                        iter=iter,
                                        eta=eta)

    Gs, Gb, sNRG_top = top_SC_sNRG_calc(omega=omega,
                                        Wj=Wj,
                                        Lx=Lx,
                                        cutxT=cutxT,
                                        cutxB=cutxB,
                                        ax=ax,
                                        ay=ay,
                                        kx=kx,
                                        m_eff=m_eff,
                                        alp_l=alp_l,
                                        alp_t=alp_t,
                                        mu=mu,
                                        Gam_SC=Gam_SC,
                                        delta=delta,
                                        phi=phi,
                                        iter=iter,
                                        eta=eta)

    #print(H_J.shape)
    #print(sNRG_top.shape)
    #print(sNRG_bot.shape)
    H_eff = H_J + sNRG_bot + sNRG_top
    return H_eff
Пример #2
0
Wj = 10 #Junction region
cutx = 0 #width of nodule
cuty = 0 #height of nodule
Nx, Ny, cutx, cuty, Wj = check.junction_geometry_check(Nx, Ny, cutx, cuty, Wj)
print("Nx = {}, Ny = {}, cutx = {}, cuty = {}, Wj = {}".format(Nx, Ny, cutx, cuty, Wj))

Junc_width = Wj*ay*.10 #nm
SC_width = ((Ny - Wj)*ay*.10)/2 #nm
Nod_widthx = cutx*ax*.1 #nm
Nod_widthy = cuty*ay*.1 #nm
print("Nodule Width in x-direction = ", Nod_widthx, "(nm)")
print("Nodule Width in y-direction = ", Nod_widthy, "(nm)")
print("Junction Width = ", Junc_width, "(nm)")
print("Supercondicting Lead Width = ", SC_width, "(nm)")
###################################################coor = shps.square(Nx, Ny) #square lattice
coor = shps.square(Nx, Ny) #square lattice
NN = nb.NN_sqr(coor)
NNb = nb.Bound_Arr(coor)
lat_size = coor.shape[0]

Lx = (max(coor[:, 0]) - min(coor[:, 0]) + 1)*ax #Unit cell size in x-direction
Ly = (max(coor[:, 1]) - min(coor[:, 1]) + 1)*ay #Unit cell size in y-direction
###################################################
#Defining Hamiltonian parameters
alpha = 100 #Spin-Orbit Coupling constant: [meV*A]
phi = np.pi #SC phase difference
delta = 1 #Superconducting Gap: [meV]
Vsc = 0 #Amplitude of potential in SC region: [meV]
Vj = 0 #Amplitude of potential in junction region: [meV]
V = Vjj(coor, Wj = Wj, Vsc = Vsc, Vj = Vj, cutx = cutx, cuty = cuty)
Пример #3
0
import majoranaJJ.operators.sparse.qmsops as spop #sparse operators
import majoranaJJ.operators.dense.qmdops as dpop #dense operators

print(" ")

N = range(3, 20)
t_sparse = np.zeros(len(N))
t_dense = np.zeros(len(N))
ax = 2
ay = 2

for i in range(0, len(N)):

    Nx = N[i] #incrementing size of lattice
    Ny = N[i] #incrementing size of lattice
    coor = shps.square(Nx, Ny) #creating coordinate array
    NN = nbrs.NN_Arr(coor) #nearest neighbor array
    NNb = nbrs.Bound_Arr(coor) #boundary array

    H_sparse = spop.H0(coor, ax, ay, NN) #creating sparse hamiltonian

    start = time.time() #Time start for numpy

    H_dense = dpop.H0(coor, ax, ay, NN) #creating dense hamiltonian
    eigs, vecs = LA.eigh(H_dense) #diagonalizing

    end = time.time() #Time end for numpy
    t_dense[i] = end-start #append time taken to diagonalize

    start = time.time() #Time start for scipy
Пример #4
0
import majoranaJJ.operators.sparse.qmsops as spop  #sparse operators
import majoranaJJ.lattice.nbrs as nb  #neighbor arrays
import majoranaJJ.lattice.shapes as shps  #lattice shapes
import majoranaJJ.modules.plots as plots  #plotting functions

Ny = 25  #number of lattice sites in y direction
Nx = 25  #number of lattice sites in x direction
N = Ny * Nx
print(N)

coor = shps.square(Nx, Ny)  #square coordinate array
NN = nb.NN_Arr(coor)  #nearest neighbor array of square lattice
NN2 = nb.NN_sqr(coor)
NNb = nb.Bound_Arr(coor)

Lx = int(max(coor[:, 0]) + 1)
idx = 2 * Lx - 1
plots.lattice(idx, coor, NN=NN)
plots.lattice(idx, coor, NN=NN2)
plots.lattice(idx, coor, NNb=NNb)
Пример #5
0
import scipy.sparse.linalg as spLA

import majoranaJJ.lattice.nbrs as nb  #neighbor arrays
import majoranaJJ.lattice.shapes as shps  #lattice shapes
import majoranaJJ.modules.plots as plots  #plotting functions

#Compared packages
import majoranaJJ.operators.sparse.qmsops as spop  #sparse operators
import majoranaJJ.operators.dense.qmdops as dpop  #dense operators

Nx = 50
Ny = 50
ax = 2
ay = 2

coor = shps.square(Nx, Ny)
NN = nb.NN_Arr(coor)
NNb = nb.Bound_Arr(coor)

H_sparse = spop.H0(coor, ax, ay, NN)
H_dense = dpop.H0(coor, ax, ay, NN)

start = time.time()

eigs, vecs = LA.eigh(H_dense)

end = time.time()
t_dense = end - start
print(
    "DENSE time for diagonalization for Hamiltonian of size {} = ".format(
        H_dense.shape), t_dense, "[s]")
Пример #6
0
import time

import majoranaJJ.lattice.shapes as shps  #lattice shapes
import majoranaJJ.junk.lattice.neighbors as nb2
import majoranaJJ.lattice.nbrs as nb  #neighbor arrays
import majoranaJJ.modules.plots as plots  #plotting functions

print("")
N = 50

#Making square lattice, nothing has changed with this method.
#Finding neighbor array in the unit cell for the old method to find boundary array.
coor = shps.square(N, N)
NN = nb.NN_Arr(coor)
print("size: ", coor.shape[0])
print("")
###################################

#Using old method, scaled by N^2 due to a loop within a loop
start = time.time()
NNb2 = nb2.Bound_Arr(NN, coor)
end = time.time()
print("Time to create Bound_Arr with original method = {} [s]".format(end -
                                                                      start))
print(NNb2[0:5, :])

idx = 0
plots.lattice(idx, coor, NNb=NNb2)
print(" ")

###################################
Пример #7
0
from numpy import linalg as LA

import majoranaJJ.operators.densOP as dop
import majoranaJJ.lattice.neighbors as nb
import majoranaJJ.lattice.shapes as shps
import majoranaJJ.etc.plots as plot

ax = 10  #unit cell size along x-direction in [A]
ay = 10  #unit cell size along y-direction in [A]
Nx = 50
Ny = 50

coor = shps.square(Nx, Ny)  #donut coordinate array
NN = nb.NN_Arr(coor)
NNb = nb.Bound_Arr(coor)
print("lattice size", coor.shape[0])
""" This Hamiltonians is defined in operators/densOP.py. The basis is of spin up and spin down, so for a system without spin coupling the wavefunctions should only be different for every other excited state
"""

alpha = 0.0  #Spin-Orbit Coupling constant: [eV*A]
gammaz = 0  #Zeeman field energy contribution: [T]
V0 = 0.0  #Amplitude of potential : [eV]
mu = 0  #Chemical Potential: [eV]

H_dense = dop.H0(coor, ax, ay, NN, mu=mu, gammaz=gammaz, alpha=alpha)
print("H shape: ", H_dense.shape)

energy_dense, states_dense = LA.eigh(H_dense)
n = 0
plot.state_cmap(coor,
                energy_dense,