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) mu_i = 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)
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
print("") N = 45 #Making square lattice, nothing has changed with this method coor = shps.square(N, N) print("size: ", coor.shape[0]) print("") ########################################### #General NN_arr method start = time.time() NN_gen = nb.NN_Arr(coor) end = time.time() print("Time to create Nbr_Arr with general method = {} [s]".format(end - start)) ########################################### start = time.time() NN_sq = nb.NN_sqr(coor) end = time.time() print("Time to create Nbr_Arr with specific square method = {} [s]".format( end - start)) ########################################### #Verifying that the new method creates the same neighbor array as the old one for i in [0, 1, 2, 3]: print("Same Values? ", all(NN_sq[:, i] == NN_gen[:, i]))