I've written the following code for simple quantum mechanics operators on spin states:

It seems to work, but the output could be better - how do I let Mathematics know that $0**\ 0==0$, and can I let it compress the up/down ket to have only the 2 arrows, not the "$**$" in between?
Bra,Ketand you canUnprotectNonCommutativeMultiply. – evanb May 08 '15 at 23:13Heads with no meaning (unless you give them meaning!) that simply render very nicely. – evanb May 10 '15 at 07:32