MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Learning to work with non-commutative oscillators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41883] Re: Learning to work with non-commutative oscillators
  • From: "Steve Luttrell" <luttrell at _removemefirst_westmal.demon.co.uk>
  • Date: Sun, 8 Jun 2003 06:45:46 -0400 (EDT)
  • References: <bbrplh$j9f$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

You can take quick and dirty control of non-commutative multiplication by
doing the following sort of thing:

OpProd[x___,B,A,y___]:=OpProd[x,A,B,y]+c OpProd[x,y];
OpProd[x:A...,y:B...]:=x y;

Here I have defined the operations needed to put a product of operators A
and B in normal form with all the A's commuted to the left and B's commuted
to the right. I assume the commutator [A,B]=c, where c is a c-number.

The representation you use to input your product of operators is
OpProd[A,A,B,A,B,B,A] (for instance), where the argument list of OpProd is
the sequence of operators in your product.

The rule for OpProd[x___,B,A,y___] looks for any pair of adjacent arguments
in the order B A, and transposes them to the order A B plus picking up a
commutator term.

The rule for OpProd[x:A...,y:B...] gets used only on expressions of the form
OpProd[A,A,B,B,B] (for instance), where all the A's have already been moved
to the left of all the B's. It writes the result in a more readable format
without wrapping the operator product in OpProd. This is why I call this
"quick and dirty" because the output format is not the same as the input
format. You could refine things to work better, but for a quick calculation
I find this sort of approach to be very useful.

Here are some examples of how this all works:

OpProd[B,A]
A B+c

OpProd[B,A,A]
\!\(A\^2\ B + 2\ A\ c\)

OpProd[B,A,A,B,A]
\!\(A\^3\ B\^2 + 2\ A\^2\ B\ c + 2\ c\ \((A\^2\ B + A\ c)\)\)

--
Steve Luttrell
West Malvern, UK

"Oleksandr Pavlyk" <pavlyk at phys.psu.edu> wrote in message
news:bbrplh$j9f$1 at smc.vnet.net...
> Hi all,
>
>    OK, NonCommutativeMultiply comes with sole attribute Flat, i.e. it is
> associative.  I would like to also to be distributive over the field of
> real numbers, so I write
>
> (* ************* Start of the code ************* *)
> Unprotect[NonCommutativeMultiply];
> (x_ + y_) ** z_ /; (x =!= 0 && y =!= 0) := x ** z + y ** z;
> x_ ** (y_ + z_) /; (z =!= 0 && y =!= 0) := x ** y + x ** z;
> a_ ** x_ /; Element[a, Reals] := a x;
> x_ ** a_ /; Element[a, Reals] := a x;
> x_ ** (a_ y_) /; ( Element[a, Reals] ) := a x ** y;
> (a_ x_) ** y_ /; ( Element[a, Reals] ) := a x ** y;
> Protect[NonCommutativeMultiply];
> (* *************** End of the code *************** *)
>
> It works beautifully. The trouble starts when I want Mathematica
> to rearrange oscillators to some definite order. I constantly run into
> infinite recursive well...
>
>   I am trying
>
> x_ ** y_ /; (Order[x, y] == 1 ) :=  y ** x - 1;
>
>   The idea is to use two oscillators: annihilation and creation
> and be able to manupulate their polynomials. Any ideas, comments
> are greatly appreciated :)
>
> Thanks,
> Sasha
>
>
>
>
>
>
>
>
>
>



  • Prev by Date: help on color function!
  • Next by Date: Re: Re: Re: Re: A bug?......In[1]:= Sum[Cos[x], {x, 0, Infinity, Pi}]......Out[1]= 1/2
  • Previous by thread: Re: Learning to work with non-commutative oscillators
  • Next by thread: Problem using Quotient and Mod functions with rational parameters