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
# zigzag ribbon from pygra importgeometry import topology import operators g = geometry.chain() # create geometry of a chain h = g.get_hamiltonian(has_spin=True) # get the Hamiltonian, spinfull h.add_rashba(0.5) # add Rashba SOC h.add_zeeman(0.3) # add Zeeman field h.shift_fermi(2.) # add Zeeman field h.add_swave(0.2) # add swave pairing #h.get_bands(operator=operators.get_sy(h)) #exit() #print(h.intra) phi = topology.berry_phase(h) # get the berry phase from pygra importkdos kdos.write_surface(h) #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(delta) return h h = geth(0.0) #h.get_bands(operator="sx") #exit() 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 = [] import topology for mu in mus: h = geth(mu,delta=0.1) g = h.get_gap() nu = abs(topology.berry_phase(h,nk=10)/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.environ['PYGRAROOT']) from pygra importgeometry 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()
if j == 0 and i == (n - 1): return np.exp(1j * p * np.pi * 2) * (1. + dt * (-1)**i) # TBC if i == 0 and j == (n - 1): return np.exp(-1j * p * np.pi * 2) * (1. + dt * (-1)**j) # TBC if i == j: return 5.0 return 0.0 sc.set_hoppings(ft) # set hopping # sc.nsweeps = 30 sc.set_fields(lambda i: [0., 0., 10.0]) # set zeeman return sc import topology print("phi", topology.berry_phase(get_sc, nk=10)) exit() for p in ps: # dimerized coupling # exit() # print(e0) sc = get_sc(p) es = sc.get_excited(n=2) eout.append(es) print(es) wf = sc.get_gs() # get the ground state as an MPS object wfs.append(wf.copy()) # store wavefunction import matplotlib.pyplot as plt