def operator_berry_bands(hin,k=[0.,0.],operator=None,delta=0.00001): """Calculates the Berry curvature using an arbitrary operator""" h = multicell.turn_multicell(hin) # turn to multicell form dhdx = multicell.derivative(h,k,order=[1,0]) # derivative dhdy = multicell.derivative(h,k,order=[0,1]) # derivative hkgen = h.get_hk_gen() # get generator hk = hkgen(k) # get hamiltonian (es,ws) = lg.eigh(hkgen(k)) # initial waves ws = np.conjugate(np.transpose(ws)) # transpose the waves from berry_curvaturef90 import berry_curvature_bands as bcb90 if operator is None: operator = np.identity(dhdx.shape[0],dtype=np.complex) bs = bcb90(dhdx,dhdy,ws,es,operator,delta) # berry curvatures return (es,bs*np.pi*np.pi*8) # normalize so the sum is 2pi Chern
def operator_berry_bands(hin, k=[0., 0.], operator=None, delta=0.00001): """Calculates the Berry curvature using an arbitrary operator""" h = multicell.turn_multicell(hin) # turn to multicell form dhdx = multicell.derivative(h, k, order=[1, 0]) # derivative dhdy = multicell.derivative(h, k, order=[0, 1]) # derivative hkgen = h.get_hk_gen() # get generator hk = hkgen(k) # get hamiltonian (es, ws) = lg.eigh(hkgen(k)) # initial waves ws = np.conjugate(np.transpose(ws)) # transpose the waves from berry_curvaturef90 import berry_curvature_bands as bcb90 if operator is None: operator = np.identity(dhdx.shape[0], dtype=np.complex) bs = bcb90(dhdx, dhdy, ws, es, operator, delta) # berry curvatures return (es, bs * np.pi * np.pi * 8) # normalize so the sum is 2pi Chern
def effective2d(hin,k0 = 0.0,ewindow = [-1.0,1.0]): """Calculates the effective Hamiltonian for a 2d system""" h = multicell.turn_multicell(hin) # multicell form hkgen = h.get_hk_gen() # get hamiltonian generator (es,ws) = lg.eigh(hkgen(k0)) # initial waves ws = np.transpose(ws) # transpose the waves wf0 = [] # list to store waves for i in range(len(es)): # loop over energies if ewindow[0]<ewindow[1]: # check whether in window wf0.append(ws[i]) # store this wave # now calculate the effective Hamiltonian raise for order in orders: # loop over orders dh = multicell.derivative(h,k0,order=order) # derivative of the hamiltonian
def effective2d(hin, k0=0.0, ewindow=[-1.0, 1.0]): """Calculates the effective Hamiltonian for a 2d system""" h = multicell.turn_multicell(hin) # multicell form hkgen = h.get_hk_gen() # get hamiltonian generator (es, ws) = lg.eigh(hkgen(k0)) # initial waves ws = np.transpose(ws) # transpose the waves wf0 = [] # list to store waves for i in range(len(es)): # loop over energies if ewindow[0] < ewindow[1]: # check whether in window wf0.append(ws[i]) # store this wave # now calculate the effective Hamiltonian raise for order in orders: # loop over orders dh = multicell.derivative(h, k0, order=order) # derivative of the hamiltonian