TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Product of bosonic and fermionic Green's functions. #64

Closed krivenko closed 12 years ago

krivenko commented 12 years ago

I'm writing a code which implements the dynamical slave rotors solver (DSR). There is a need to calculate expressions including products of bosonic and fermionic Green's functions in \tau-domain. Such a product is again a function, obeying an (anti-)symmetry condition. The statistics of the product is determined by statistics of the multipliers. However, TRIQS seems to ignore this fact - in G = G_x*G_y statistics of G is set to such of G_x. Script to illustrate this issue

#!/bin/env pytriqs

from pytriqs.Base.GF_Local.pytriqs_GF import GF_Statistic
from pytriqs.Base.GF_Local import *

def print_mesh(g):
        print g.Name, ":"
        print "Beta =", g.mesh.Beta
        print "Statistic =", g.mesh.Statistic
        print "NTimeSlices =", len(g.mesh)
        print

G_B = GFBloc_ImTime(Indices=[0], Beta=100, Name="G_B", Statistic=GF_Statistic.Boson)
G_F = GFBloc_ImTime(Indices=[0], Beta=100, Name="G_F", Statistic=GF_Statistic.Fermion)

print_mesh(G_F)
print_mesh(G_B)
print_mesh(G_F*G_B)
print_mesh(G_B*G_F)
print_mesh(G_B*G_B)
print_mesh(G_F*G_F)

In my opinion, the physically correct approach would be to implement 'exclusive or' multiplication of statistics: equal statistics of G_x and G_y gives a bosonic G, different statistics gives a fermionic G.

mferrero commented 12 years ago

Your new fix looks fine to me. I close the ticket.