Where do you suggest this should go?-Guru
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/Rn94--N-zG8J.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
To unsubscribe from this group, send email to sympy+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/PgabKT0NVaIJ.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
I think that it makes sense to include a generic Trace object in matrix expressions. I think that it should inherit from Expr and not MatExpr (in my mind trace is a function :: Matrix -> Scalar).Guru, if you want a code example I would emulate the current Transpose object.I think that the Trace object in matrices/expressions should be very minimal however and should rely on _eval_trace heavily. sympy.physics and sympy.matrices handle things very differently. If we're going to share an object then that object should be very general (I think it should assume less even than the current implementation of Transpose which I will fix in a few minutes).
So do you think that the same object should trace over MatrixExpr, Matrix, and the physics classes? It seems to me that it should.
Yes, the concept is quite subtle and not used (as far as I know)
outside the context of quantum mechanics (where it is used a lot). I
thought about having separate Trace and PartialTrace classes, but from
the user API standpoint, they are really the same thing.
Trace = Partial Trace over all indices
Can you define tensor product then? Are you referring to hadamard / elementwise product?