I am still -1 on this. I have no problem to an unevaluated PartialTrace object living in matrix/expressions. I just think that it should be separate.
Here are some of my concerns. >From a user perspective having two separate classes is simpler in expectation. 99% of the time a user will want Trace. These users should not have to deal with the complexity of PartialTrace. I.e. the docstring for Trace should be very simple and intuitive. PartialTrace is foreign to most users. Trace is a scalar, PartialTrace can be a Matrix. The type system in the MatrixExpr module is much stricter than in physics/quantum. There is no way to have an object that is both. All MatrixExpr's have a shape. What is the shape of Trace(X)? If it is 1x1 then it will not be able to interact with other MatrixExprs. The MatrixExpr module is very clean and simple right now. I will strongly object to any type magic. The module is currently very simple, I would really like to keep it this way. I think that having two simple classes is far simpler than having one complex class that can be many things. Here is a PR for simple Trace. It is on top of another PR so only the last two commits are relevant to this conversation https://github.com/sympy/sympy/pull/1456 -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
