Currently, in pdaggerq/algebra.py, each of the various integrals and amplitude classes have __repr__ method that overwrite the corresponding method in BaseTerm.
The overridden __repr__ methods have hardcoded shape (e.g. Right1amps will be printed as r1(p,q)), but this is problematic for IP/EA-type operators. This PR clean those hardcoded __repr__ methods when unnecessarily used, because the BaseTerm.__repr__() method is enough to account for generalized amplitude/integral shapes. Only Kronecker delta and two-particle integrals have overridden __repr__ because they are printed differently than the actual variable name.
Another issue with IP/EA: Somewhat unrelated is the fact that pdaggerq/algebra.py will try to parse for the optimum einsum contraction path on line 282, but we could probably change the code to just say optimize=True (which unfortunately will always parse the most optimum path every single time the line is executed).
Currently, in
pdaggerq/algebra.py
, each of the various integrals and amplitude classes have__repr__
method that overwrite the corresponding method inBaseTerm
.The overridden
__repr__
methods have hardcoded shape (e.g.Right1amps
will be printed asr1(p,q)
), but this is problematic for IP/EA-type operators. This PR clean those hardcoded__repr__
methods when unnecessarily used, because theBaseTerm.__repr__()
method is enough to account for generalized amplitude/integral shapes. Only Kronecker delta and two-particle integrals have overridden__repr__
because they are printed differently than the actual variable name.Another issue with IP/EA: Somewhat unrelated is the fact that
pdaggerq/algebra.py
will try to parse for the optimum einsum contraction path on line 282, but we could probably change the code to just sayoptimize=True
(which unfortunately will always parse the most optimum path every single time the line is executed).