MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Defining Formatting and Notation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119164] Re: Defining Formatting and Notation
  • From: Simon <simonjtyler at gmail.com>
  • Date: Mon, 23 May 2011 06:27:39 -0400 (EDT)
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

I think that you should have a look at this package:
http://homepage.cem.itesm.mx/lgomez/quantum/
The code is all viewable, so you can see how Bra and Ket are implemented.
Of course, there are other ways to implement it, and it's always nice to do things for yourself.

If there's not enough inspiration for you in Notation.m in the quantum package, you can post again to this group.

PS
Just a thought - and I haven't looked to closely at how the above package works, but I would not try using Times[] to multiply Bra, Kets and operators. For one thing, since Times[] is Orderless, the operation will be ambiguous. Rather, I would use CenterDot or NonCommutativeMultiply to multiply bras, kets and operators. It can then check to see if the syntax is right before evaluating them as inner producs.


  • Prev by Date: Re: Problem with NMinimize
  • Next by Date: Re: Very (very very) slow typing for Mathematica in large cells.
  • Previous by thread: Defining Formatting and Notation
  • Next by thread: Re: Defining Formatting and Notation