|
[Date Index]
[Thread Index]
[Author Index]
Re: Question about Hold
- To: mathgroup at smc.vnet.net
- Subject: [mg48826] Re: Question about Hold
- From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
- Date: Fri, 18 Jun 2004 02:12:48 -0400 (EDT)
- References: <carjrn$r76$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You could try the following ( I asssume C is a c-number and not an
operator):
OpProd[x___, A, B, y___] := OpProd[x, B, A, y] + C OpProd[x, y];
OpProd[A, B] then evaluates to C OpProd[] + OpProd[B, A]
OpProd[A, A, B] then evaluates to 2 C OpProd[A] + OpProd[B, A, A]
There are lots of variations on this sort of approach. The basic trick this
depends on is using OpProd[<list of operators in the product>] to hide from
Mathematica the fact that you have a "product" of operators, so you can then
get on with defining your own private set of rules for simplifying OpProd
(as above, for example).
Steve Luttrell
"Daohua Song" <ds2081 at columbia.edu> wrote in message
news:carjrn$r76$1 at smc.vnet.net...
> Hi,evryone,
> I define a commute relation for quantum operators,i fact i learn this
> from the forum.Here is the problem.
> Commute[A,B]=C.
> Commute[A^2,B], i try to use Hold[A*A] instead of A^2, then
mathematica
> even won't evaluate it.!
> Any suggestion to work on the power commutation?
> Thanks
> Daohua
>
Prev by Date:
Re: Controlling function arguments
Next by Date:
Re: Re: Random Matrix of Integers
Previous by thread:
Re: Question about Hold
Next by thread:
Re: Re: Question about Hold
|