# Sorting noncommuting operators?

Posted 8 years ago
5563 Views
|
6 Replies
|
0 Total Likes
|
 I'd like to be able to sort noncommuting operators, using their commutation relations. This shows up a lot in quantum mechanics. Any suggestions?
6 Replies
Sort By:
Posted 8 years ago
 In[1]:= Quiet @ Needs["HighEnergyPhysicsFeynCalc"] Loading FeynCalc from C:\Users\Frank\AppData\Roaming\Mathematica\Applications\HighEnergyPhysics FeynCalc 8.2.0 For help, type ?FeynCalc, open FeynCalcRef8.nb or visit www.feyncalc.org Loading FeynArts, see www.feynarts.de for documentation FeynArts 3.7 patched for use with FeynCalc In[2]:= DeclareNonCommutative[a, ad] In[3]:= Commutator[a, ad] = 1 Out[3]= 1 In[4]:= DotSimplify[ Commutator[a, ad.ad]] Out[4]= 2 ad In[5]:= DotSimplify[ Commutator[a, ad.ad.ad]] Out[5]= 3 ad.ad In[6]:= DotSimplify[ Commutator[a, ad.ad.ad.ad]] Out[6]= 4 ad.ad.ad 
Posted 8 years ago
 Looks like FeynCalc is the way to go.Here's an example problem from an online course I'm taking:Recalling that [a^,a^]=1, calculate the commutator:[a^,(a^)n]a is an annihilation operator and a dagger is a creation operator.
Posted 8 years ago
 Also possibly of relevance is the section "Some noncommutative algebraic manipulation" in the notebook available here.
Posted 8 years ago
 Mathematica 10.0 for Linux x86 (64-bit) Copyright 1988-2014 Wolfram Research, Inc. In[1]:= !!fordan (* FeynCalc can be installed by Import["http://www.feyncalc.org/install.m"] *) (* load FeynCalc *) Quiet@Needs@"HighEnergyPhysicsFeynCalc`"; (* FI just sets the output to FeynCalcInternalForm, kind of FullForm *) FI; (* remember in FeynCalc: . is used as non-commutative operator *) DeclareNonCommutative[a,b,c]; (* declares a,b,c to be non commutative *) test = a . ( 2*b - z c).a ; (* while now we add a commutator [a,c] = 1 *) Commutator[a, c] =1; Expand @ DotSimplify @ test In[2]:= <
Posted 8 years ago
 Some simple examples of input and desired output would (as ever) be useful.
Posted 8 years ago
 One possibility is to use DotSimplify from FeynCalc. Or you look at the source and use the relevant parts.