Пример #1
0
 def Transform_RealSpace_to_SymmetryBasis(self,IN, OUT = None):
    """ IN[i,j] in real space --> OUT into the symmetry basis"""
    OUT = OUT if OUT else BlockGf(G)
    for sig,B in IN:
       for k,ind in enumerate(['+1-', '-1-','+i-', '-i-']) : 
          OUT[ind+sig] = sum_list ( [ sum_list ( [ B[i+1,j+1]* self.P[j,k] * self.Pinv[k,i] for j in range(4) ] ) for i in range(4) ] ) 
    return OUT
Пример #2
0
   def __init__(self,Beta,Norb,U_interact,J_Hund) : 
      
      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      Hamiltonian = U_interact * sum_list( [ N('up',i)*N('down',i) for i in range(Norb) ] )
      for i in range(Norb-1):
        for j in range(i+1,Norb):
          Hamiltonian += (U_interact-2*J_Hund) * ( N('up',i) * N('down',j) +
                                                   N('down',i) * N('up',j) ) + \
                         (U_interact-3*J_Hund) * ( N('up',i) * N('up',j) +
                                                   N('down',i) * N('down',j) )

      #Quantum_Numbers = {}
      #for i in range(Norb):
      #  Quantum_Numbers['N%sup'%(i+1)]   = N('up',i)
      #  Quantum_Numbers['N%sdown'%(i+1)] = N('down',i)

      Ntot = sum_list( [ N(s,i) for s in ['up','down'] for i in range(Norb) ] )
      Sz = sum_list( [ N('up',i)-N('down',i) for i in range(Norb) ] )

      Quantum_Numbers = {'Ntot' : Ntot, 'Sz' : Sz}

      Solver.__init__(self,
                      Beta = Beta,
                      GFstruct = [ ('%s'%(ud),[n for n in range(Norb)]) for ud in ['up','down'] ],
                      H_Local = Hamiltonian,
                      Quantum_Numbers = Quantum_Numbers )
      self.N_Cycles  = 10000
Пример #3
0
   def __init__(self,Beta,U_interact) : 

      self.P = numpy.array([[1,1,1,1], [1,-1,1,-1],[1,1,-1,-1],[1,-1,-1,1]])/2.
      self.Pinv = numpy.linalg.inv(self.P)

      def Cdiag(s):
         s= '-%s'%s
         return [ C('00'+s,1), C('10'+s,1), C('01'+s,1),C('11'+s,1) ] 

      Cnat,Nnat={},{}
      for i in range(4) :
         s= 'up-%d'%(i+1)
         Cnat[s] = sum_list( [ self.P[i,j]*c  for j,c in enumerate(Cdiag('up'))] )
         Nnat[s] = Cnat[s].dagger() * Cnat[s]
         s= 'down-%d'%(i+1)
         Cnat[s] = sum_list( [ self.P[i,j]*c  for j,c in enumerate(Cdiag('down'))] )
         Nnat[s] = Cnat[s].dagger() * Cnat[s]

      def symm(s):
         s= '-%s'%s
         Cdag('00'+s,1).symmetry()['kx'] =  1
         Cdag('10'+s,1).symmetry()['kx'] = -1
         Cdag('01'+s,1).symmetry()['kx'] =  1
         Cdag('11'+s,1).symmetry()['kx'] = -1
         Cdag('00'+s,1).symmetry()['ky'] =  1
         Cdag('10'+s,1).symmetry()['ky'] =  1
         Cdag('01'+s,1).symmetry()['ky'] = -1
         Cdag('11'+s,1).symmetry()['ky'] = -1
      symm('up'); symm('down')

      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      Hamiltonian = U_interact* sum_list( [ Nnat['up-%d'%(i+1)]* Nnat['down-%d'%(i+1)] for i in range (4)])

      N_u = sum_list( [ Nnat['up-%d'%(i+1)] for i in range(4) ] )
      N_d = sum_list( [ Nnat['down-%d'%(i+1)] for i in range(4) ] )

      Quantum_Numbers = { 'kx' : 'kx', 'ky' : 'ky', 'N_u' : N_u, 'N_d' : N_d }

      Solver.__init__(self,
                      Beta = Beta,
                      GFstruct = [ ('00-up',[1]), ('10-up',[1]), ('01-up',[1]), ('11-up',[1]),
                                   ('00-down',[1]), ('10-down',[1]), ('01-down',[1]), ('11-down',[1]) ], 
                      H_Local = Hamiltonian,
                      Quantum_Numbers = Quantum_Numbers,
                      Nmax = 2000)

      self.N_Cycles  = 100000
      self.N_Frequencies_Accumulated = 4*int(0.075*Beta/(2*3.1415))
      self.fitting_Frequency_Start = 3*int(0.075*Beta/(2*3.1415))
      self.Length_Cycle = 100
      self.Nmax_Matrix = 200
      self.Use_Segment_Picture = False
Пример #4
0
 def Transform_SymmetryBasis_toRealSpace(self,IN, OUT = None):
    """  IN : in symmetry cluster indices. Returns OUT to real space"""
    OUT = OUT if OUT else BlockGf(G)
    for sig,B in OUT : 
       for i in range(4):
          for j in range(4):
             B[i+1,j+1]  = sum_list( [ self.P[i,k]* self.Pinv[k,j]* IN[ind+sig] 
                                  for k,ind in enumerate(['+1-', '-1-','+i-', '-i-']) ])
    return OUT
Пример #5
0
   def __init__(self,Beta,U_interact) : 
      
      self.P = numpy.array([[1,1,1,1], [1,-1,1,-1],[1,1,-1,-1],[1,-1,-1,1]])/2.
      self.Pinv = numpy.linalg.inv(self.P)

      def Cdiag(s):
         s= '-%s'%s
         return [ C('00'+s,1), C('10'+s,1), C('01'+s,1),C('11'+s,1) ] 

      Cnat,Nnat={},{}
      for i in range(4) :
         s= 'up-%d'%(i+1)
         Cnat[s] = sum_list( [ self.P[i,j]*c  for j,c in enumerate(Cdiag('up'))] )
         Nnat[s] = Cnat[s].dagger() * Cnat[s]
         s= 'down-%d'%(i+1)
         Cnat[s] = sum_list( [ self.P[i,j]*c  for j,c in enumerate(Cdiag('down'))] )
         Nnat[s] = Cnat[s].dagger() * Cnat[s]

      def symm(s):
         s= '-%s'%s
         Cdag('00'+s,1).symmetry()['kx'] =  1
         Cdag('10'+s,1).symmetry()['kx'] = -1
         Cdag('01'+s,1).symmetry()['kx'] =  1
         Cdag('11'+s,1).symmetry()['kx'] = -1
         Cdag('00'+s,1).symmetry()['ky'] =  1
         Cdag('10'+s,1).symmetry()['ky'] =  1
         Cdag('01'+s,1).symmetry()['ky'] = -1
         Cdag('11'+s,1).symmetry()['ky'] = -1
      symm('up'); symm('down')

      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      Hamiltonian = U_interact* sum_list( [ Nnat['up-%d'%(i+1)]* Nnat['down-%d'%(i+1)]  for i in range (4)]) #!!

      N_u = sum_list( [ Nnat['up-%d'%(i+1)] for i in range(4) ] )
      N_d = sum_list( [ Nnat['down-%d'%(i+1)] for i in range(4) ] )

      Quantum_Numbers = { 'kx' : 'kx', 'ky' : 'ky', 'N_u' : N_u, 'N_d' : N_d }

      Solver.__init__(self,Beta=Beta,GFstruct=[ ('00-up',[1]), ('10-up',[1]), ('01-up',[1]), ('11-up',[1]),
                                                ('00-down',[1]), ('10-down',[1]), ('01-down',[1]), ('11-down',[1]) ],
                      H_Local = Hamiltonian,Quantum_Numbers= Quantum_Numbers )

      self.N_Cycles  = 10
Пример #6
0
    def __set_quantum_numbers(self,gf_struct):
    
        QN = {}
        spinblocs = [v for v in self.map]

        # Define the quantum numbers:
        if (self.use_spinflip) :            
            Ntot = sum_list( [ N(self.map[s][i],i) for s in spinblocs for i in range(self.n_orb) ] )
            QN['NtotQN'] = Ntot
            #QN['Ntot'] = sum_list( [ N(self.map[s][i],i) for s in spinblocs for i in range(self.n_orb) ] )
            if (len(spinblocs)==2):
                # Assuming up/down structure:
                Sz = sum_list( [ N(self.map[spinblocs[0]][i],i)-N(self.map[spinblocs[1]][i],i) for i in range(self.n_orb) ] )
                QN['SzQN'] = Sz
                # new quantum number: works only if there are only spin-flip and pair hopping, not any more complicated things
                for i in range(self.n_orb):
                    QN['Sz2_%s'%i] = (N(self.map[spinblocs[0]][i],i)-N(self.map[spinblocs[1]][i],i)) * (N(self.map[spinblocs[0]][i],i)-N(self.map[spinblocs[1]][i],i))

        else :
            for ibl in range(len(gf_struct)):
                QN['N%s'%gf_struct[ibl][0]] = sum_list( [ N(gf_struct[ibl][0],gf_struct[ibl][1][i]) for i in range(len(gf_struct[ibl][1])) ] )

        return QN