I have: $$p=iab$$ $p,a,b$ are operators. So in mathematica I am writing this as:
p=I*a**b
Conjugate of above is $$-iba$$
In mathematica I tried ConjugateTranspose, but not working on p to find it's conjugate transpose.
I have: $$p=iab$$ $p,a,b$ are operators. So in mathematica I am writing this as:
p=I*a**b
Conjugate of above is $$-iba$$
In mathematica I tried ConjugateTranspose, but not working on p to find it's conjugate transpose.
As @march pointed out, NCAlgebra is able to handle this issue out of the box. Indeed
aj[I a ** b]
evaluates to
I aj[b] ** aj[a]
as you want.
NonCommutativeMultiply(i.e.,**) has essentially no built-in meaning. You have to either give it that meaning or develop replacement rules for transforming expressions involving**. Alternatively, you might try the NCAlgebra package. – march Sep 07 '21 at 22:23NonCommutativeMultiplyfor some hints on how to do this. Also I recommend you search the function name on this SE for related questions (they do exist). – CA Trevillian Sep 08 '21 at 14:57Iandaon the left-hand side and theIand thebon the right-hand side. An alternative thing to do (which is what I do when doing these kinds of calculations), is to define replacement rules instead. I.e., make a list of things likeconj[I a_**b_] :> -I b**aand then usingReplaceAll(/.) to transform the expressions. – march Sep 08 '21 at 21:58