Exemplo n.º 1
0
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
Exemplo n.º 2
0
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