Skip to content

Commit

Permalink
Use only N op as integrals of motion by default when spin-orbit coupl…
Browse files Browse the repository at this point in the history
…ing is included
  • Loading branch information
j-otsuki committed Mar 19, 2018
1 parent 0eb1a21 commit bd4146a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions python/hubbard_one_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,22 @@ def solve(self, H_int, E_levels, const_of_motion=None, density_matrix_cutoff=1e-

self.__copy_E_levels(E_levels)

H_0 = sum( self.E_levels[sn][oi1,oi2].real*c_dag(sn,on1)*c(sn,on2) for sn, (oi1,on1), (oi2,on2) in product(self.spin_names, enumerate(self.orb_names), enumerate(self.orb_names)))
H_0 = sum( self.E_levels[sn][oi1,oi2].real*c_dag(sn,on1)*c(sn,on2) for sn, (oi1,on1), (oi2,on2) in product(self.spin_names, enumerate(self.orb_names), enumerate(self.orb_names)) )
if self.verbose and mpi.is_master_node():
print "\n*** compute G_iw and Sigma_iw"
print "*** E_levels =", E_levels
print "*** H_0 =", H_0
print "*** const_of_motion =", const_of_motion

N_op = sum( c_dag(sn,on)*c(sn,on) for sn, on in product(self.spin_names, self.orb_names) )

if const_of_motion is None:
self.__ed.diagonalize(H_0+H_int)
if self.spin_orbit:
# use only N op as integrals_of_motion when spin-orbit coupling is included
self.__ed.diagonalize(H_0+H_int, integrals_of_motion=[N_op])
else:
# use N and S_z as integrals of motion by default
self.__ed.diagonalize(H_0+H_int)
else:
self.__ed.diagonalize(H_0+H_int, const_of_motion)

Expand Down

0 comments on commit bd4146a

Please sign in to comment.