Expected behavior: If the Hamiltonian passes the check that it is real, it should pass a real operator to AtomDiagReal.
Actual behavior: The Hamiltonian passes the check that it is real, and passes a complex operator to AtomDiagReal.
Sometimes I construct operators from a complex Hamiltonian that has zero imaginary values at the start of a self-consistent loop, but will become nonzero later in the cycle. It is not hard to check myself and pass the correct object, but fixing it may be beneficial others.
Below is code that reproduces the error
from triqs.atom_diag import AtomDiag
from triqs.operators import n
h = (1 + 0*1j) * n('up', 0) * n('dn', 0)
fops = [('up', 0), ('dn', 0)]
AtomDiag(h, fops)
Version
TRIQS library version 3.2.0
git hash 90c8f8c257be434bc4560f4bbc518905c4d226ea
Expected behavior: If the Hamiltonian passes the check that it is real, it should pass a real operator to AtomDiagReal.
Actual behavior: The Hamiltonian passes the check that it is real, and passes a complex operator to AtomDiagReal.
Sometimes I construct operators from a complex Hamiltonian that has zero imaginary values at the start of a self-consistent loop, but will become nonzero later in the cycle. It is not hard to check myself and pass the correct object, but fixing it may be beneficial others.
Below is code that reproduces the error
Version
TRIQS library version 3.2.0 git hash 90c8f8c257be434bc4560f4bbc518905c4d226ea