Ejemplo n.º 1
0
 def dagger(self):
     res = Operator()
     for coef, vl, mono in self.L:
         res.L.append([conjugate(coef), vl[:], [o.dagger() for o in reversed(mono)]])
     res.__redu()
     return res
Ejemplo n.º 2
0
gt = BlockGf(name_block_generator = [ (n,f(g,200) ) for n,g in G], make_copies=False, name='gt')
for (i,gtt) in gt : gtt.set_from_inverse_fourier(G[i])

h['gt'] = gt

# Matrix operations:
ga2 = GfImFreq(indices = [1,2,3], beta = 50, n_matsubara = 100, name = "a1Block")
mat = numpy.array([[1.0,0.0,1.0],[-1.0,1.0,0.0]])

ga2.from_L_G_R(mat.transpose(),ga,mat)

h['ga2'] = ga2


# conjugate:
Gc = conjugate(G)
h['Gc'] = Gc

# Some tail stuff:
tailtempl={}
for sig,g in G: 
    tailtempl[sig] = copy.deepcopy(g._tail)
h['tt'] = tailtempl


# tranpose
g = G['a']
gt = G['a'].transpose()
gt._data.array[0,1,3] = 100
assert g._data.array[1,0,3] == 100