def getz2(x1,x2): # calculate the Z2 invariant for certain Zeeman and Rashba h = g.get_hamiltonian(has_spin=True) # get the Hamiltonian, spinfull h.add_rashba(0.5) # add Rashba SOC h.add_zeeman(x1+0.5) # add Zeeman field h.shift_fermi(2.0) # add Zeeman field h.add_swave(x2) # add swave pairing phi = topology.berry_phase(h) # get the berry phase return np.abs(phi/np.pi)
def getz2(x1, x2): # calculate the Z2 invariant for certain Zeeman and Rashba h = g.get_hamiltonian(has_spin=True) # get the Hamiltonian, spinfull h.add_rashba(0.5) # add Rashba SOC h.add_zeeman(x1 + 0.5) # add Zeeman field h.shift_fermi(2.0) # add Zeeman field h.add_swave(x2) # add swave pairing phi = topology.berry_phase(h) # get the berry phase return np.abs(phi / np.pi)
def getz2(x1,x2): # calculate the Z2 invariant for certain Zeeman and Rashba h = g.get_hamiltonian(has_spin=True) # get the Hamiltonian, spinfull h.add_rashba(0.3) # add SOC h.shift_fermi(x2) # add SOC h.add_zeeman([0.,0.,0.3]) # add mass h.add_swave(x1) # add mass z2 = abs(topology.berry_phase(h,nk=40)/np.pi) # get the Z2 print(x1,x2,z2) return z2
h = geth(0.0) #h.get_bands(operator="sx") #exit() from pygra import green es = np.linspace(-0.2,0.2,50) #(xs,ys) = green.dos_semiinfinite(h.intra,h.inter,energies=es) #np.savetxt("DOS.OUT",np.matrix([xs,ys]).T) #exit() mus = np.linspace(0.,0.5,40) gs = [] nus = [] from pygra import topology for mu in mus: h = geth(mu) g = h.get_gap() nu = abs(topology.berry_phase(h,nk=100)/np.pi) nus.append(abs(nu)) gs.append(g) print(mu,g,nu) import matplotlib.pyplot as plt plt.subplot(121) plt.plot(mus,gs,marker="o") plt.subplot(122) plt.plot(mus,nus,marker="o") plt.show()
# Add the root path of the pygra library import os import sys sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../../../src") from pygra import geometry from pygra import topology g = geometry.chain(2) # create geometry of a zigzag ribbon h = g.get_hamiltonian(has_spin=False) # get the Hamiltonian,spinless delta = -0.1 # value of the perturbation h.intra *= (1. + delta) # modify intra-hopping h.inter *= (1. - delta) # modify inter-hopping phi = topology.berry_phase(h) # get the berry phase print(phi) hf = h.supercell(100) # do a supercell hf = hf.set_finite_system(periodic=False) # do an open finite system hf.get_bands()
h.add_zeeman(fm) h.add_kane_mele(0.02) h.shift_fermi(mu) h.add_swave(0.0) return h h = geth(0.0) #h.get_bands(operator="sx") #exit() from pygra import green es = np.linspace(-0.2,0.2,50) #(xs,ys) = green.dos_semiinfinite(h.intra,h.inter,energies=es) #np.savetxt("DOS.OUT",np.matrix([xs,ys]).T) #exit() mus = np.linspace(0.,0.5,40) gs = [] nus = [] from pygra import topology for mu in mus: h = geth(mu) g = h.get_gap() nu = abs(topology.berry_phase(h,nk=100)/np.pi) nus.append(abs(nu)) gs.append(g) print(mu,g,nu) import matplotlib.pyplot as plt plt.subplot(121) plt.plot(mus,gs,marker="o") plt.subplot(122) plt.plot(mus,nus,marker="o") plt.show()