Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2640

Re: Defining Formatting and Notation

From Simon <simonjtyler@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Defining Formatting and Notation
Date 2011-05-23 10:27 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <irdcql$3qp$1@smc.vnet.net> (permalink)

Show all headers | View raw


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.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Defining Formatting and Notation Simon <simonjtyler@gmail.com> - 2011-05-23 10:27 +0000

csiph-web