I am trying to define some operators I used frequently.For example, I defined a KroneckerProduct operator as $ \otimes $ as follows:
a_$ \otimes $b_:=a.b-b.a
and this works fine.
Then I want to define a commutator used in quantum mechanics act like follows: $${\left[ {a,b} \right]_ - } = a.b - b.a$$ $${\left[ {a,b} \right]_ + } = a.b + b.a$$ where a and b are matrix.
So I naively write the definition in matheamtica as follows:
$${\left[ {a{\rm{\_}},b{\rm{\_}}} \right]_ - }: = a.b - b.a$$ $${\left[ {a{\rm{\_}},b{\rm{\_}}} \right]_ + }: = a.b + b.a$$
But this will not work.
1.So how to define commutator in this form (appearance)?
2.and why the definition for a_$\otimes$b_ hold, the similar definition for commutator [a_,b_]not hold?
There is another question which actually should create another post. But I choose just to add it here.
If I defined the KroneckerProduct as the operator [CircleTimes] in the way I did, then I found that in parallel computing, I can't simply distribute such a definition of [CircleTimes] like:
DistributeDefinitions[$\otimes$]
Mathematica doesn't allow me to do that. Of course the 'Parallelize' will not distribute the $\otimes$ definition automatically either. So if an expression contains a $\otimes$, Simply 'Parallelize' it, the computation will get stuck and no answer will come out.
So my second question is
how to distribute such a operator definition in parallel computing ?



Notationpackage is your friend. See wolfram link here – Murta Jan 31 at 10:59