コード例 #1
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   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
コード例 #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
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   def __init__(self,Beta,U_interact,J_Hund) : 
     
      GFstruct = [ ('1up',[1]), ('1down',[1]), ('23up',[1,2]), ('23down',[1,2]) ]
	 
      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      #Hamiltonian =   U_interact * sum_list( [ N('%d-up'%(i+1),1)*N('%d-down'%(i+1),1)  for i in range(3) ] )
      Hamiltonian =   U_interact * ( N('1up',1)*N('1down',1) + N('23up',1)*N('23down',1) + N('23up',2)*N('23down',2) )
      Hamiltonian +=  (U_interact-2.0*J_Hund) * ( N('1up',1) * (N('23down',1)+N('23down',2)) + N('23up',1) * N('23down',2) )
      Hamiltonian +=  (U_interact-2.0*J_Hund) * ( N('1down',1) * (N('23up',1)+N('23up',2)) + N('23up',2) * N('23down',1) )
      for s in ['up','down']:
        Hamiltonian += (U_interact-3.0*J_Hund) * (N('1%s'%s,1) * (N('23%s'%s,1)+N('23%s'%s,2)) + N('23%s'%s,1)*N('23%s'%s,2) )

#      for i in range(2):
#        for j in range(i+1,3):
#          Hamiltonian += (U_interact-2*J_Hund) * ( N('%d-up'%(i+1),1) * N('%d-down'%(j+1),1) +
#                                                   N('%d-down'%(i+1),1) * N('%d-up'%(j+1),1) ) + \
#                         (U_interact-3*J_Hund) * ( N('%d-up'%(i+1),1) * N('%d-up'%(j+1),1) +
#                                                   N('%d-down'%(i+1),1) * N('%d-down'%(j+1),1) )

#      Quantum_Numbers = { 'N1up' : N('1-up',1), 'N1down' : N('1-down',1),
#                         'N2up' : N('2-up',1), 'N2down' : N('2-down',1),
#                         'N3up' : N('3-up',1), 'N3down' : N('3-down',1) }
      Quantum_Numbers = { 'N1up' : N('1up',1), 'N1down' : N('1down',1),
                         'N23up' : N('23up',1)+N('23up',2),
                         'N23down' : N('23down',1)+N('23down',2) }

      Solver.__init__(self,
                      Beta = Beta,
                      GFstruct = GFstruct,
                      H_Local = Hamiltonian,
                      Quantum_Numbers = Quantum_Numbers )
      self.N_Cycles  = 10000
コード例 #4
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   def solve(self, **params):

      def Cdiag(s):
         s= '-%s'%s
         return [ C('+1'+s,1), C('-1'+s,1), C('+i'+s,1),C('-i'+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('+1'+s,1).symmetry()['Z4'] = 1
         Cdag('-1'+s,1).symmetry()['Z4'] = -1
         Cdag('+i'+s,1).symmetry()['Z4'] = 1j
         Cdag('-i'+s,1).symmetry()['Z4'] = -1j
      symm('up'); symm('down')

      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      Hamiltonian = self.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 = { 'Z4' : 'Z4', 'N_u' : N_u, 'N_d' : N_d }

      nc = params.pop('n_cycles',10)
      Solver.solve(self, H_local = Hamiltonian, quantum_numbers = Quantum_Numbers, n_cycles = nc, **params)
コード例 #5
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   def __init__(self, beta, U_interact) : 
      
      Solver.__init__(self, beta=beta, gf_struct=[ ('+1-up',[1]), ('-1-up',[1]), ('+i-up',[1]), ('-i-up',[1]),
                                           ('+1-down',[1]), ('-1-down',[1]), ('+i-down',[1]), ('-i-down',[1]) ])

      self.U_interact = U_interact
      self.P = numpy.array([[1,1,-1,-1], [1,-1,1j,-1j],[1,-1,-1j,1j],[1,1,1,1]])/2
      self.Pinv = numpy.linalg.inv(self.P)
コード例 #6
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   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
コード例 #7
0
    def __init__(self, beta, U_interact):

        Solver.__init__(self,
                        beta=beta,
                        gf_struct=[('+1-up', [1]), ('-1-up', [1]),
                                   ('+i-up', [1]), ('-i-up', [1]),
                                   ('+1-down', [1]), ('-1-down', [1]),
                                   ('+i-down', [1]), ('-i-down', [1])])

        self.U_interact = U_interact
        self.P = numpy.array([[1, 1, -1, -1], [1, -1, 1j, -1j],
                              [1, -1, -1j, 1j], [1, 1, 1, 1]]) / 2
        self.Pinv = numpy.linalg.inv(self.P)
コード例 #8
0
ファイル: old_solver.py プロジェクト: TRIQS/cthyb_matrix
    def __init__(self, Beta, GFstruct, N_Matsubara_Frequencies=1025, **param):

        Solver.__init__(self, beta=Beta, gf_struct=GFstruct, n_w=N_Matsubara_Frequencies)
        self.params = param
        self.gen_keys = copy.deepcopy(self.__dict__)

        msg = """
**********************************************************************************
 Warning: You are using the old constructor for the solver. Beware that this will
 be deprecated in future versions. Please check the documentation.
**********************************************************************************
"""
        mpi.report(msg)
コード例 #9
0
    def solve(self, **params):
        def Cdiag(s):
            s = '-%s' % s
            return [
                C('+1' + s, 1),
                C('-1' + s, 1),
                C('+i' + s, 1),
                C('-i' + 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('+1' + s, 1).symmetry()['Z4'] = 1
            Cdag('-1' + s, 1).symmetry()['Z4'] = -1
            Cdag('+i' + s, 1).symmetry()['Z4'] = 1j
            Cdag('-i' + s, 1).symmetry()['Z4'] = -1j

        symm('up')
        symm('down')

        # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
        Hamiltonian = self.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 = {'Z4': 'Z4', 'N_u': N_u, 'N_d': N_d}

        nc = params.pop('n_cycles', 10)
        Solver.solve(self,
                     H_local=Hamiltonian,
                     quantum_numbers=Quantum_Numbers,
                     n_cycles=nc,
                     **params)
    def __init__(self, Beta, GFstruct, N_Matsubara_Frequencies=1025, **param):

        Solver.__init__(self,
                        beta=Beta,
                        gf_struct=GFstruct,
                        n_w=N_Matsubara_Frequencies)
        self.params = param
        self.gen_keys = copy.deepcopy(self.__dict__)

        msg = """
**********************************************************************************
 Warning: You are using the old constructor for the solver. Beware that this will
 be deprecated in future versions. Please check the documentation.
**********************************************************************************
"""
        mpi.report(msg)
コード例 #11
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   def __init__(self,Beta,U_interact) : 


     Hamiltonian = U_interact*( N('1-up',1)*N('1-down',1) + N('1-up',1)*N('2-up',1) +
                                N('1-up',1)*N('2-down',1) + N('1-down',1)*N('2-up',1) +
                                N('1-down',1)*N('2-down',1) + N('2-up',1)*N('2-down',1) )

     Quantum_Numbers = { 'Nup'   : N('1-up',1)+N('2-up',1),
                        'Ndown' : N('1-down',1)+N('2-down',1),
                        'Lz'    : N('1-up',1)+N('1-down',1)-N('2-up',1)-N('2-down',1) }

     Solver.__init__(self,
                     Beta = Beta,
                     GFstruct = [ ('1-up',[1]), ('1-down',[1]), ('2-up',[1]), ('2-down',[1]) ],
                     H_Local = Hamiltonian,
                     Quantum_Numbers = Quantum_Numbers )
     self.N_Cycles  = 1000000
     self.Nmax_Matrix = 300
コード例 #12
0
    def __init__(self, Beta, U_interact, J_Hund):

        GFstruct = [('1up', [1]), ('1down', [1]), ('23up', [1, 2]),
                    ('23down', [1, 2])]

        # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
        #Hamiltonian =   U_interact * sum_list( [ N('%d-up'%(i+1),1)*N('%d-down'%(i+1),1)  for i in range(3) ] )
        Hamiltonian = U_interact * (N('1up', 1) * N('1down', 1) +
                                    N('23up', 1) * N('23down', 1) +
                                    N('23up', 2) * N('23down', 2))
        Hamiltonian += (U_interact - 2.0 * J_Hund) * (
            N('1up', 1) *
            (N('23down', 1) + N('23down', 2)) + N('23up', 1) * N('23down', 2))
        Hamiltonian += (U_interact - 2.0 * J_Hund) * (
            N('1down', 1) *
            (N('23up', 1) + N('23up', 2)) + N('23up', 2) * N('23down', 1))
        for s in ['up', 'down']:
            Hamiltonian += (U_interact - 3.0 * J_Hund) * (
                N('1%s' % s, 1) * (N('23%s' % s, 1) + N('23%s' % s, 2)) +
                N('23%s' % s, 1) * N('23%s' % s, 2))

#      for i in range(2):
#        for j in range(i+1,3):
#          Hamiltonian += (U_interact-2*J_Hund) * ( N('%d-up'%(i+1),1) * N('%d-down'%(j+1),1) +
#                                                   N('%d-down'%(i+1),1) * N('%d-up'%(j+1),1) ) + \
#                         (U_interact-3*J_Hund) * ( N('%d-up'%(i+1),1) * N('%d-up'%(j+1),1) +
#                                                   N('%d-down'%(i+1),1) * N('%d-down'%(j+1),1) )

#      Quantum_Numbers = { 'N1up' : N('1-up',1), 'N1down' : N('1-down',1),
#                         'N2up' : N('2-up',1), 'N2down' : N('2-down',1),
#                         'N3up' : N('3-up',1), 'N3down' : N('3-down',1) }
        Quantum_Numbers = {
            'N1up': N('1up', 1),
            'N1down': N('1down', 1),
            'N23up': N('23up', 1) + N('23up', 2),
            'N23down': N('23down', 1) + N('23down', 2)
        }

        Solver.__init__(self,
                        Beta=Beta,
                        GFstruct=GFstruct,
                        H_Local=Hamiltonian,
                        Quantum_Numbers=Quantum_Numbers)
        self.N_Cycles = 10000
コード例 #13
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   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
コード例 #14
0
    def __init__(self, Beta, U_interact):

        Hamiltonian = U_interact * (
            N('1-up', 1) * N('1-down', 1) + N('1-up', 1) * N('2-up', 1) +
            N('1-up', 1) * N('2-down', 1) + N('1-down', 1) * N('2-up', 1) +
            N('1-down', 1) * N('2-down', 1) + N('2-up', 1) * N('2-down', 1))

        Quantum_Numbers = {
            'Nup': N('1-up', 1) + N('2-up', 1),
            'Ndown': N('1-down', 1) + N('2-down', 1),
            'Lz':
            N('1-up', 1) + N('1-down', 1) - N('2-up', 1) - N('2-down', 1)
        }

        Solver.__init__(self,
                        Beta=Beta,
                        GFstruct=[('1-up', [1]), ('1-down', [1]),
                                  ('2-up', [1]), ('2-down', [1])],
                        H_Local=Hamiltonian,
                        Quantum_Numbers=Quantum_Numbers)
        self.N_Cycles = 1000000
        self.Nmax_Matrix = 300
コード例 #15
0
    def __init__(self, Beta, U_interact):

        C_up_1 = (C('Up+', 1) + C('Up-', 1)) / sqrt(2)
        C_up_2 = (C('Up+', 1) - C('Up-', 1)) / sqrt(2)
        C_do_1 = (C('Do+', 1) + C('Do-', 1)) / sqrt(2)
        C_do_2 = (C('Do+', 1) - C('Do-', 1)) / sqrt(2)

        Cdag('Up+', 1).symmetry()['parity'] = 1
        Cdag('Up-', 1).symmetry()['parity'] = -1
        Cdag('Do+', 1).symmetry()['parity'] = 1
        Cdag('Do-', 1).symmetry()['parity'] = -1

        N_up_1 = C_up_1.dagger() * C_up_1
        N_up_2 = C_up_2.dagger() * C_up_2
        N_do_1 = C_do_1.dagger() * C_do_1
        N_do_2 = C_do_2.dagger() * C_do_2

        # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
        Hamiltonian = U_interact * (N_up_1 * N_do_1 + N_up_2 * N_do_2)

        N_u = N('Up-', 1) + N('Up+', 1)
        N_d = N('Do-', 1) + N('Do+', 1)

        Quantum_Numbers = {'parity': 'parity', 'N_u': N_u, 'N_d': N_d}

        Solver.__init__(self,
                        Beta=Beta,
                        GFstruct=[('Up+', [1]), ('Up-', [1]), ('Do+', [1]),
                                  ('Do-', [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
コード例 #16
0
ファイル: models.py プロジェクト: TRIQS/cthyb_matrix
   def __init__(self,Beta,U_interact) : 
      
      C_up_1 = (C('Up+',1) + C('Up-',1))/sqrt(2)
      C_up_2 = (C('Up+',1) - C('Up-',1))/sqrt(2)
      C_do_1 = (C('Do+',1) + C('Do-',1))/sqrt(2)
      C_do_2 = (C('Do+',1) - C('Do-',1))/sqrt(2)

      Cdag('Up+',1).symmetry()['parity'] = 1
      Cdag('Up-',1).symmetry()['parity'] = -1
      Cdag('Do+',1).symmetry()['parity'] = 1
      Cdag('Do-',1).symmetry()['parity'] = -1

      N_up_1 = C_up_1.dagger()*C_up_1
      N_up_2 = C_up_2.dagger()*C_up_2
      N_do_1 = C_do_1.dagger()*C_do_1
      N_do_2 = C_do_2.dagger()*C_do_2

      # NB : the Hamiltonian should NOT contain the quadratic part which is in G0
      Hamiltonian = U_interact * ( N_up_1*N_do_1  + N_up_2*N_do_2 )

      N_u = N('Up-',1)+N('Up+',1)
      N_d = N('Do-',1)+N('Do+',1)

      Quantum_Numbers = { 'parity' : 'parity', 'N_u' : N_u, 'N_d' : N_d }

      Solver.__init__(self,
                      Beta = Beta,
                      GFstruct = [ ('Up+',[1]), ('Up-',[1]), ('Do+',[1]), ('Do-',[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
コード例 #17
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
コード例 #18
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