def get_LE_basis(coor, ax, ay, NN, NNb, Wj, cutx, cuty, V, mu, gz, alpha, delta, phi): H0 = spop.HBDG(coor, ax, ay, NN, NNb=NNb, Wj=Wj, cutx=cutx, cuty=cuty, V=V, mu=mu, gammaz=gz, alpha=alpha, delta=delta, phi=phi, qx=1e-4*(np.pi/Lx), periodicX=True) #gives low energy basis eigs_0, vecs_0 = spLA.eigsh(H0, k=k, sigma=0, which='LM') vecs_0_hc = np.conjugate(np.transpose(vecs_0)) #hermitian conjugate H_M0 = spop.HBDG(coor, ax, ay, NN, NNb = NNb, Wj = Wj, cutx = cutx, cuty = cuty, V = V, mu = 0, alpha = alpha, delta = delta, phi = phi, qx = 0, periodicX = True) H_M1 = spop.HBDG(coor, ax, ay, NN, NNb = NNb, Wj = Wj, cutx = cutx, cuty = cuty, V = V, mu = 1, alpha = alpha, delta = delta, phi = phi, qx = 0, periodicX =True) HM = H_M1 - H_M0 HM0_DB = np.dot(vecs_0_hc, H_M0.dot(vecs_0)) HM_DB = np.dot(vecs_0_hc, HM.dot(vecs_0)) return HM0_DB, HM_DB
for q in range(qx.shape[0]): print(qx.shape[0] - q) for i in range(mu.shape[0]): if q == 0 or top_array[i] == 1: if q == 0: Q = 1e-4 * (np.pi / Lx) else: Q = qx[q] H0 = spop.HBDG(coor, ax, ay, NN, NNb=NNb, Wj=Wj, cutx=cutx, cuty=cuty, V=V, mu=mu[i], alpha=alpha, delta=delta, phi=phi, gammax=1e-4, qx=Q, periodicX=True) #gives low energy basis eigs_0, vecs_0 = spLA.eigsh(H0, k=k, sigma=0, which='LM') vecs_0_hc = np.conjugate( np.transpose(vecs_0)) #hermitian conjugate H_G0 = spop.HBDG( coor, ax, ay, NN,
Vj = np.linspace(v_i, v_f, v_steps) #Chemical Potential: [meV] bands = np.zeros((v_steps, k)) cmap = cm.get_cmap('Oranges') dirS = 'e_mu_data' if not os.path.exists(dirS): os.makedirs(dirS) try: PLOT = str(sys.argv[1]) except: PLOT = 'F' if PLOT != 'P': for j in range(v_steps): V = Vjj(coor, Wj = Wj, Vsc = Vsc, Vj = Vj[j], cutx = cutx, cuty = cuty) print(v_steps - j) H = spop.HBDG(coor, ax, ay, NN, NNb=NNb, Wj=Wj, cutx=cutx, cuty=cuty, V=V, mu=0, alpha=alpha, delta=delta, phi=0, qx=0, periodicX=True) eigs, vecs = spLA.eigsh(H, k=k, sigma=0, which='LM') idx_sort = np.argsort(eigs) eigs = eigs[idx_sort] bands[j, :] = eigs np.save("%s/bands Lx = %.1f Ly = %.1f Wsc = %.1f Wj = %.1f nodx = %.1f nody = %.1f alpha = %.1f delta = %.2f v_i = %.1f v_f = %.1f.npy" % (dirS, Lx*.1, Ly*.1, SC_width, Junc_width, Nod_widthx, Nod_widthy, alpha, delta, v_i, v_f), bands) np.save("%s/V0 Lx = %.1f Ly = %.1f Wsc = %.1f Wj = %.1f nodx = %.1f nody = %.1f alpha = %.1f delta = %.2f v_i = %.1f v_f = %.1f.npy" % (dirS, Lx*.1, Ly*.1, SC_width, Junc_width, Nod_widthx, Nod_widthy, alpha, delta, v_i, v_f), Vj) else: bands = np.load("%s/bands Lx = %.1f Ly = %.1f Wsc = %.1f Wj = %.1f nodx = %.1f nody = %.1f alpha = %.1f delta = %.2f v_i = %.1f v_f = %.1f.npy" % (dirS, Lx*.1, Ly*.1, SC_width, Junc_width, Nod_widthx, Nod_widthy, alpha, delta, v_i, v_f)) mu = np.load("%s/V0 Lx = %.1f Ly = %.1f Wsc = %.1f Wj = %.1f nodx = %.1f nody = %.1f alpha = %.1f delta = %.2f v_i = %.1f v_f = %.1f.npy" % (dirS, Lx*.1, Ly*.1, SC_width, Junc_width, Nod_widthx, Nod_widthy, alpha, delta, v_i, v_f)) fig = plt.figure() for j in range(bands.shape[1]): plt.plot(Vj, bands[:, j], c='r')
VV = sparse.bmat([[None, V], [-V, None]], format='csc', dtype='complex') plots.junction(coor, VV, title='Potential Profile', savenm='potential_profile.jpg') k = 48 H = spop.HBDG(coor, ax, ay, NN, NNb=NNb, Wj=Wj, cutx=cutx, cuty=cuty, alpha=alpha, delta=delta, phi=phi, V=V, gammax=gx, gammaz=gz, mu=mu, qx=0.00212, periodicX=True, periodicY=False) eigs, vecs = spLA.eigsh(H, k=k, sigma=0, which='LM') idx_sort = np.argsort(eigs) eigs = eigs[idx_sort] vecs = vecs[:, idx_sort] print(eigs)
Ny = 50 ax = 10 #[A] ay = 10 #[A] coor = shps.square(Nx, Ny) NN = nb.NN_Arr(coor) NNb = nb.Bound_Arr(coor) print("lattice size", coor.shape[0]) alpha = 0 #Spin-Orbit Coupling constant: [eV*A] gammaz = 0 #Zeeman field energy contribution: [T] delta = 0 #Superconducting Gap: [eV] V0 = 0.0 #Amplitude of potential : [eV] mu = 0 #Chemical Potential: [eV] H = spop.HBDG(coor, ax, ay, NN, Wj=0) print("H shape: ", H.shape) num = 20 # This is the number of eigenvalues and eigenvectors you want sigma = 0 # This is the eigenvalue we search around which = 'LM' eigs, vecs = spLA.eigsh(H, k=num, sigma=sigma, which=which) plots.state_cmap(coor, eigs, vecs, n=7, title='hole n = 3 energy eigenstate') plots.state_cmap(coor, eigs, vecs, n=12, title='particle n = 3 energy eigenstate') plots.state_cmap(coor, eigs, vecs, n=9, title='hole n = 1 energy eigenstate') plots.state_cmap(coor,
sys.exit() ############################################################## #state plot MU = 2 GX = 0.75 H = spop.HBDG(coor, ax, ay, NN, NNb=NNb, Wj=Wj, V=V, mu=MU, gammax=GX, alpha=alpha, delta=delta, phi=np.pi, qx=0, periodicX=True, periodicY=False) eigs, states = spLA.eigsh(H, k=8, sigma=0, which='LM') idx_sort = np.argsort(eigs) print(eigs[idx_sort]) plots.state_cmap(coor, eigs, states, n=4, savenm='prob_density_nodule_n=4.png') plots.state_cmap(coor, eigs, states, n=5, savenm='prob_density_nodule_n=5.png') plots.state_cmap(coor, eigs, states, n=6, savenm='prob_density_nodule_n=6.png')