TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
138 stars 72 forks source link

Complex Operators, gf #116

Closed MHarland closed 8 years ago

MHarland commented 10 years ago

The multiplication of a complex with an operator of pytriqs.operators.operators2.Operator has no c++ overload, although with the old operators it does. Has it been forgotten?

from pytriqs.operators.operators2 import *
2 * c('up', 0) # works
(2 + 1j) * c('up', 0) # no c++ overload
parcollet commented 10 years ago

For @mferrero Operator2 is a new class, written in c++ by Igor Krivenko, and wrapped in python. I guess this operation has simply been forgotten.

krivenko commented 10 years ago

The wrapper is written only for many_body_operator<double>. Is there a real need for the complex version?

krivenko commented 10 years ago

Btw, if you decide that many_body_operator<complex<double>> really needs python wrapping, you might want to have a look at this pull request: https://github.com/TRIQS/triqs/pull/111

pseth commented 9 years ago

Is this issue ready to be closed then?

krivenko commented 9 years ago

The Python wrapper is still missing. cthyb is not going to support complex h_loc, is it?

pseth commented 9 years ago

No, not planned for the moment.

mferrero commented 9 years ago

I think as long as we haven't generalized (and checked!) our codes to work for complex hamiltonians we should probably avoid wrapping complex many_body_operators. @MHarland: In which situation did you need complex operators?

MHarland commented 9 years ago

I was trying to do the transformation that you did in your 2x2 plaquette rotation model for the cthyb_matrix solver(https://github.com/TRIQS/cthyb_matrix/blob/master/python/models.py) when encountered this issue.

aichhorn commented 9 years ago

By the way, the same problem occurs for any model or system with spin-orbit couping. Simulations of the Kane-Mele-Hubbard model (at the moment much more used than the standard Hubbard model, maybe) are not possible.

parcollet commented 8 years ago

G(tau) generalized in master. Generalization of cthyb under way.