Simplify ladder operators




On Tue, 2 Mar 2010, Raoul wrote:

< Hi all,
< 
< > < I tried to simplify ladder operators as they appear
< > < in quantuum mechanics. For a simple example assume
< > < R and L be the operators for which we know:
< > < 
< > < L|n> = sqrt(n)*|n-1>
< > < 
< > < and
< > < 
< > < R|n> = sqrt(n+1)*|n+1>
< > < 
< > < and [R,L] = 1
< > < 
< > < 
< > < I do not know much about the simplifier of maxima
< > < and this is my first real world try which custom rules.
< > < But I read saw threads about geometric algebra simplifications
< > < on this list. So I tried to do more or less the same thing here.
< > < 
< > < 
< > < First I would like to simplify the following expression: (R+L).(R+L)
< > < 
< > < expand((R+L).(R+L));
< > < 
< > < yields a big result which is correct but can be simplified
< > < which the help of the commutator relation mentioned above.
< > < 
< > < I tried to use "tellsimpafter" like this:
< > < 
< > < tellsimpafter(R.L, 1-L.R);
< > < 
< > < This works nice for (R+L).(R+L), lets call the
< > < fully simplified result E. No problems so far.
< > < 
< > < 
< > < Now I would like to simplify (R+L).(R+L).(R+L).(R+L), 
< > < so I try:
< > < 
< > < expand((R+L).(R+L).(R+L).(R+L));
< > < 
< > < but there remain terms which could be simplified away.
< > < What does prohibit the full simplification?
< > < I can get a fully simplified result f.e. with expand(E.E).
< > < 
< > < 
< > < 
< > < Finally I would like to be able to calculate for example:
< > < 
< > < R.R.L.L |n> = ...?
< > < 
< > < Is there an (easy) way to use the definitions of R and L
< > < as simplifing rules? Something like
< > < 
< > < tellsimpafter(L.ket(n), sqrt(n)*ket(n-1));
< > < 
< > < And how should I tell maxima about the kets?
< >  
< > See this thread:
< > http://www.math.utexas.edu/pipermail/maxima/2010/020383.html
< > 
< > which discusses your first problem.
< 
< Yes, I've read this thread, however, I don't see the solution
< to my problem there right now.
< 
< For the case of a geometric algebra the basic simplification rules
< are pretty clear:
< 
< i)  tellsimp (X^^i, X^mod(i,2));
< ii) tellsimp (W.(Y.Z),(W.Y).Z);
< ii) tellsimp (e[i] . e[j], -e[j] . e[i]);
< 
< But in my case I only know the commutator of the two operators:
< 
< [R,L] = 1
< 
< So I do not see a rule of type i). Also, how should I write the associativity
< in ii)? The only I can do is a rule of type iii).
< 
< Maybe I could figure out some rules for R^^i.L^^j and L^^i.R^^j but
< will this help in any way? All mathematical information is already
< in the commutation relation.

Indeed, you can see that a rule

tellsimp(R.L,1+L.R);
tellsimp(R^^i . L, 1+(R^^(i-1) . L) . R);

will recursively implement the bracket relations.


< 
< > For your second question,
< > 
< > (%i2)
< > declare(h,integer);
< > matchdeclare(n,lambda([t],featurep(t,integer)));
< > tellsimp(L.ket(n), sqrt(n)*ket(n-1));
< > L.ket(h);
< > L.ket(2);
< 
< Ah nice, this works out of the box I see :-)
< (I was unsure about quoting and nouns too) 
< 
< > (%o2) done
< > (%i3)
< > (%o3) done
< > (%i4)
< > (%o4) [?\.rule2,?simpnct]
< > (%i5)
< > (%o5) sqrt(h)*ket(h-1)
< > (%i6)
< > (%o6) sqrt(2)*ket(1)
< 
< As shown above, it works:
< (%i4) L.ket(h);
< (%o4)                         sqrt(h) ket(h - 1)
< 
< Well, it works only once:
< (%i5) L.L.ket(h);
< (%o5)                      L . (sqrt(h) ket(h - 1))
< 
< Even set the order of evaluation explicitly does not help:
< (%i6) L.(L.ket(h));
< (%o6)                      L . (sqrt(h) ket(h - 1))
< 
< But maxima is able to calculate the ket alone, this is no surprise:
< (%i7) L.ket(h-1);
< (%o7)                       sqrt(h - 1) ket(h - 2)
< 
< Now, how can I tell maxima to pull the root out
< and perform the second operation too?
< 
< I would like to see sqrt(h)*sqrt(h - 1)*ket(h - 2) as %o4.
< 
< Finally I would like to be able to write things like R.R.L.L.ket(n)
< and even (R+L)^^4.ket(n).
 
Try:

declare(h,integer);
declare(h,scalar);
matchdeclare(m,lambda([t],featurep(t,integer)),n,lambda([t],featurep(t,integer)),u,scalarp);
tellsimp(L.ket(n), sqrt(n)*ket(n-1));
tellsimp(L.(u*ket(n)), u*sqrt(n)*ket(n-1));
tellsimp(L^^m . (u*ket(n)), u*sqrt(n)*(L^^(m-1) . ket(n-1)));
tellsimp(R.ket(n), sqrt(n+1)*ket(n+1));
tellsimp(R.(u*ket(n)), u*sqrt(n+1)*ket(n+1));
tellsimp(R^^m . (u*ket(n)), u*sqrt(n+1)*(R^^(m-1) . ket(n+1)));
L.ket(h);
L.ket(2);
L.L.ket(h);
L^^3 . ket(5);
R.ket(h);
R.ket(2);
R.R.ket(h);
R^^3 . ket(5);
L.R.ket(h);
R.L.ket(h);
(R.L - L.R) . ket(h);
expand(%);
expand(%);
R^^2 . L^^3 . ket(h);
(R+L)^^3 . ket(h);
expand(%);


Note that these simplification rules already contain your commutation
relation.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.