Hi Cschwan, On Thu, Aug 4, 2011 at 5:21 AM, cschwan <[email protected]> wrote: > Hello! > > I would like to know if sympy can be used for Quantum Field Theory > calculations. In particular, I would like to compute traces of dirac > matrices and contract them with four-vectors. For example, the > following holds true (latex notation): > > Tr ( \gamma^\mu \gamma^\alpha \gamma^\nu \gamma^\beta ) p_\alpha n_ > \beta = 4 ( p^\mu n^\nu + n^\mu p^\nu - g^{\mu \nu} p \cdot n ) > > I am using the following clifford identity to calculate the right hand > side: > > \gamma^\mu \gamma^\nu + \gamma^\nu \gamma^\mu = 2 g^{\mu \nu} > \cdot 1 > > The \gamma^\mu are elements of a clifford algebra and at the same time > are lorentz vectors, g^{\mu \nu} is the metric tensor. Since the > \gamma^\mu are represented by 4x4 matrices, I can take the trace of > them. Because of the identity above and > > Tr (1) = 4 > > I can show that > > Tr ( \gamma^\mu \gamma^\nu ) = 4 g^{\mu \nu} > > By repeatedly applying the clifford identity I can derive identities > for traces with than two gamma matrices. > > Does somebody know if this is possible with sympy? When I looked into > sympy's documentation I noticed there are already modules for tensors > and geometric algebra, but I did not find anything to work out the > traces.
Try to look at this example: https://github.com/sympy/sympy/blob/master/examples/advanced/qft.py I wrote it couple years ago. If you would like to help improve this functionality, that would be absolutely awesome. Let us know. Ondrej -- 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.
