Based on the discussion so far, it seems that the opinion is current Tr 
module should be moved to sympy/physics/quantum. Matt, per you suggestion 
do you plan to add a simple Trace under MatrixExpressions, in that case?

Also, can I leave the name of the module the way it is now or should we 
change to name to reflect that it belongs to the physics/quantum module.

I plan to work on this item this week and wrap it up based on whatever 
decision is made.

Regards
Guru



On Thursday, July 12, 2012 5:34:22 PM UTC-5, Matthew wrote:
>
> 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
>>
>
> The immediate issue I see if this goes into MatrixExprs is that 
> PartialTrace is a MatExpr while Trace is an Expr/Scalar. It's not easy to 
> have a class that is both at the same time. If we do this then my approach 
> would be to make both classes and have PartialTrace(arg, indices) yield a 
> new Trace object on object creation when indices == all_indices. 
>
> However, if partial traces are rarely used outside of quantum then maybe 
> it makes sense to just keep them in quantum. A lot of the code in Guru's PR 
> doesn't seem to apply to the MatrixExpr case (namely the tensor product 
> stuff). MatrixExpressions is pretty restricted to linear algebra and not 
> multi-linear algebra. I'm inclined to keep it this way. I think that an 
> attempt to generalize the current module will result in an ugly solution.
>
> I think that this stuff should probably live in quantum until we get 
> around to a Tensor expressions module.
>
> I think that I should make a simple Trace for MatrixExpressions and that 
> the more sophisticated partial-trace on tensor-products code should move 
> from sympy/core to sympy/physics/quantum for now.
>  

-- 
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/-/APU5J_H7v3UJ.
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.

Reply via email to