On Jul 12, 2012, at 10:26 AM, Matthew Rocklin <[email protected]> wrote:

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.

Aaron Meurer


On Thu, Jul 12, 2012 at 5:44 AM, Guru Devanla <[email protected]> wrote:

> Aaron,
>
> Right now Tr class inherits from Expr directly. I will have to look into
> MatExpr as base class if that is necessary.
>
> -Guru
>
>
> On Wednesday, July 11, 2012 10:57:34 PM UTC-5, Aaron Meurer wrote:
>>
>> On Jul 11, 2012, at 9:45 PM, Guru Devanla <[email protected]> wrote:
>>
>> Hello All,
>>
>> Recently I have been working on the Trace operator and related operations
>> including partial traces. Currently, this operator is used exclusively by
>> objects in the quantum module, though the operation itself is generic.
>>  Currently, this module resides in /sympy/core/trace.py  There were some
>> review comments by @asmeurer and @flacjacket proposing different locations
>> for this module. Some comments can be found at https://github.com/sympy/*
>> *sympy/pull/1396#issuecomment-**6715963<https://github.com/sympy/sympy/pull/1396#issuecomment-6715963>
>> .
>>
>> An alternative place for this module could be  : sympy/matrices/expressions.
>> Currently, this folder has other matrix related expressions such as  matadd,
>> matmul, matpow, inverse and transpose.
>>
>>
>> That sounds like the best place for it to go, assuming it plays well with
>> MatrixExpr objects.
>>
>> Aaron Meurer
>>
>>
>> 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<https://groups.google.com/d/msg/sympy/-/Rn94--N-zG8J>
>> .
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to sympy+unsubscribe@**
>> googlegroups.com <[email protected]>.
>> For more options, visit this group at http://groups.google.com/**
>> group/sympy?hl=en <http://groups.google.com/group/sympy?hl=en>.
>>
>>  --
> 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/-/PgabKT0NVaIJ.
>
> 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.
>

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

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

Reply via email to