ham = [] #set hubbard U operator for isite in range(0, 4): ham.append(fermion.DoubleOcc(Mf, U, isite, 'D')) #set eR operator for isite in range(4, 8): for iflv in range(0, Mf): ham.append(fermion.Number(Mf, eR, isite, iflv, 'R')) #set kinetic energy operator #nickel hopping for isite in range(0, 4): jsite = (isite + 1) % 4 for iflv in range(0, Mf): ham.append(fermion.Hop(Mf, -t, isite, jsite, iflv, 'H')) #R hopping for isite_c in range(0, 4): isite = 4 + isite_c jsite = 4 + (isite_c + 1) % 4 for iflv in range(0, Mf): ham.append(fermion.Hop(Mf, -tR, isite, jsite, iflv, 'H')) #Ni-R hybridisation for isite in range(0, 4): jsite = isite + 4 for iflv in range(0, Mf): ham.append(fermion.Hop(Mf, -tp, isite, jsite, iflv, 'H')) #-------------set up hamiltonian matrix-----------------------------
ham = [] #set hubbard U operator for isite in range(0, 2): ham.append(fermion.DoubleOcc(Mf, U, isite, 'D')) #set eR operator for isite in range(2, 4): for iflv in range(0, Mf): ham.append(fermion.Number(Mf, eR, isite, iflv, 'R')) #set kinetic energy operator thop_ar = [t, tp, tR, tp] for isite in range(0, 4): jsite = (isite + 1) % 4 for iflv in range(0, Mf): ham.append(fermion.Hop(Mf, -thop_ar[isite], isite, jsite, iflv, 'H')) #-------------set up hamiltonian matrix----------------------------- hmat = np.zeros((n_dim_fs, n_dim_fs), np.cdouble) for fsoper in ham: for isnum in fockspace: ifsstate = copy.deepcopy(fockspace[isnum]) i = mat_idx[isnum] factor = fsoper.act_on(ifsstate) if not ifsstate.isZero: jsnum = ifsstate.fock_state_number() j = mat_idx[jsnum] mat_elem = factor * fsoper.coeff hmat[j, i] += mat_elem