Suppose I have lot of product terms of Bose operators, e.g:
a a SuperDagger[a] SuperDagger[a] a a SuperDagger[a] SuperDagger[a] SuperDagger[a] SuperDagger[a] a a a a
and I want to turn them into normal ordering using Boson commutation relations
Writing each term as:
NCM[a, a, SuperDagger[a], SuperDagger[a], a, a, SuperDagger[a], SuperDagger[a], SuperDagger[a], SuperDagger[a], a, a, a, a]
can be time consuming if you have many terms. Is there a way to work around this point? Can I somehow achieve the normal ordering by something like
f[a a SuperDagger[a] SuperDagger[a] a a SuperDagger[a] SuperDagger[a] SuperDagger[a] SuperDagger[a] a a a a]
where f does the same thing as NCM?
a a SuperDagger[a] SuperDagger[a] a a SuperDagger[a] SuperDagger[a] SuperDagger[a] SuperDagger[a] a a a a // fworks fine, but I don't have to useInactivate. Only when I am assigning it toexprI have to useInactivate? Seems so – geom Dec 07 '20 at 11:45HoldFirstattribute offpreventsTimesfrom evaluating when in the first example. In the second example,Timeswould evaluate while evaluatingexpr, so theHoldFirstattribute cannot help you there. I do have another idea, though. Let me update the answer. – Sjoerd Smit Dec 07 '20 at 11:55