On Thu, Jul 12, 2012 at 2:19 PM, Matthew Rocklin <[email protected]> wrote: > I had to look up partial trace (this is a new concept for me). After reading > this I'm inclined to separate Trace and PartialTrace classes in an effort to > optimize/simplify for the common case (at least the common case as I see > it).
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 Separating them adds complexity and confusion. Also in the current implementation, the partial trace logic doesn't affect the regular trace logic. > The idea of a trace of a tensor product still sounds strange to me. I'm > inclined to call this a tensor contraction. As I said though I'm not > familiar with this specific notion of trace. It is sort of like a tensor contraction, but I don't think they are the same thing. Cheers, Brian > On Thu, Jul 12, 2012 at 12:49 PM, Brian Granger <[email protected]> wrote: >> >> One thing to be aware of is that the general Trace has to be able to >> handle partial traces of tensor products. This logic is implemented >> in this branch: >> >> https://github.com/sympy/sympy/pull/1396 >> >> And is somewhat specialized to the stuff in quantum, although it >> doesn't *depend* on quantum. >> >> Cheers, >> >> Brian >> >> >> >> On Thu, Jul 12, 2012 at 12:33 PM, Matthew Rocklin <[email protected]> >> wrote: >> >> 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. I think that we can easily write a sufficiently general version of >> > Trace, something like the Transpose object in this branch >> > >> > https://github.com/mrocklin/sympy/blob/transpose-decentralize/sympy/matrices/expressions/transpose.py >> >> >> >> -- >> Brian E. Granger >> Cal Poly State University, San Luis Obispo >> [email protected] and [email protected] > > -- Brian E. Granger Cal Poly State University, San Luis Obispo [email protected] and [email protected] -- 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.
