MathGroup Archive 2011

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

Search the Archive

Defining Formatting and Notation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119105] Defining Formatting and Notation
  • From: Stefan Salanski <wutchamacallit27 at gmail.com>
  • Date: Sun, 22 May 2011 06:53:08 -0400 (EDT)

Hello,
I've been working on compiling what I've learned about quantum
mechanics into a Mathematica notebook, and was wondering if anyone
could help with creating definitions for certain symbols.
An example of something which I have working is:
Subscript[\[Psi], n_\[InvisibleComma]l_\[InvisibleComma]m_][
  r_, \[Theta]_, \[Phi]_] :=
 Sqrt[(2/(n a))^3 (n - l -
        1)!/(2 n ((n + l)!)^3)] Exp[-r/(n a)] (2 r/(n a))^l LaguerreL[
   n - l - 1, 2 l + 1, 2 r/(n a)]*(n + l)! SphericalHarmonicY[l,
   m, \[Theta], \[Phi]]
This looks just like one would write the hydrogen wavefunctions, and
evaluates as desired as well.

What I am having difficulty with, is defining the Bra and Ket
notation, specifically defining the notation to be as when using them
as linear operators (http://en.wikipedia.org/wiki/Bra-
ket_notation#Linear_operators).
I would like to define what looks like this (after evaluation) :
"\!\(\*TemplateBox[{\"state1\"},\n\"Bra\"]\)observable\!\
(\*TemplateBox[{\"state2\"},\n\"Ket\"]\)"
to be some function of [state1,state2,observable], but I always run
into the problem where it simply recognizes
Bra[state1] observable Ket[state2]
as observable*Bra[state1]*Ket[state2], the product of 3 individual and
separate terms, which is definitely not what I'm looking for.
I've looked through tutorial/Operators and tutorial/SpecialCharacters-
MathematicalAndOtherNotation, to no avail. Any suggestions?
-Stefan S


  • Prev by Date: Part isn't recursive?
  • Next by Date: Re: unable to import csv-Data
  • Previous by thread: Re: Part isn't recursive?
  • Next by thread: Re: Defining Formatting and Notation