Dirac Notation Interpreter in Matlab.

 WWW location:  http://www.fi.uib.no/AMOS/matlab/AllDirac.html

KEYWORDS: Physics, Education, Quantum Mechanics, Command Interpreter
This document is a short presentation of the Dirac notation interpreter in Matlab.


Text of the Abstract (HTML, WWW) ....

New today (Oct.2. 95)
Text of NORDIC MATLAB CONFERENCE contribution, postscript


All the Matlab readable files ( Dirac.m, parse.m etc .... are at the end of this text )
Author: L. Kocbach, ... Bergen
(contact: ladi@sparc-atom.fi.uib.no )

A whole large class of quantum mechanical problems leads to matrix formulations; our particular work is related to theory of atomic collisions, but similar problems are found in parts of nuclear physics, optical physics, quantum chemistry etc.

Further development of our research applications ideas resulted in a small package suitable for teaching quantum mechanics, based on the idea of an interpreter written using Matlab's language.

The interpreter can be easily extended and adapted to other problems, for example to define vectors with vectors as elements (indexed vectors) or multidimensional arrays. Here is a short example of a dialog

     Dirac :    |a> 
     Matlab:   -->     a
     a =
          1
          0
     Dirac :    |b> 
     Matlab:   -->     b
     b =
          0
          1
     Dirac :   <  a |  b >
     Matlab:   -->     (a)'*b
     ans =
          0
     Dirac :   D: [X]   %%  Declare, not fully exploited yet.....
     DECLARED =
      |a> |b> |c> |d> (c1) (c2) [O1] [O2] [U]  
      [sig2]  [sig2]  [u1]  [u3]  [X]
     Dirac :   M: X=[0.2 0.5; 0.5 0.2]; %% Use matlab notation
     Dirac :   X
     Matlab:   -->    X
     X =
         0.2000    0.5000
         0.5000    0.2000
     Dirac :   < a | X | b>
     Matlab:   -->     (a)'*X*b
     ans =
         0.5000
Projection operators are are often a difficult topic. In Dirac notation, using
using   P = | b > < b |
------------------------
     Dirac :   | b > < b |
     Matlab:   -->     b*(b)'
     ans =
          0     0
          0     1
We can e.g. easily demonstrate
that  P . P  = P 
------------------
     Dirac :   ( | b > < b | )( | b > < b | )
     Matlab:   -->     (b*(b)')*(b*(b)')
     ans =
          0     0
          0     1
     Dirac :   | b > < b| b > < b |
     Matlab:   -->     b*(b)'*b*(b)'
     ans =
          0     0
          0     1


Aug. 7th 95: There is a whole example on Gramm-Schmidt type orthogonalization, using the projection operators
Gramm-Schmidt example commands
Gramm-Schmidt example result ....
 
with original nonorthogonal vectors  |a> |b> |c> 
               (normalize them by  |b> = |b>/ sqrt(< b | b > ) etc...  )

we construct orthonormal  |u> |v> |w>  
 |u> = |a>
 |v> = ( U - | u > < u | ) |b>                 and normalize as above
 |w> = ( U - | u > < u | - | v > < v | ) |c>   and normalize .... 
 where U is an appropriate unit matrix 



Package

Dirac Enviroment (Dirac.m)

Help Text of Dirac Enviroment (DiracHelp.txt)

Dirac Interpreter (parse.m) NEW Aug 7th 95

Declarations of Globals (Declare.m)


additional info files

Examples, 2x2 (example2.txt)

Examples, 3x3 (example3.txt)


How to use Dirac


Record of debugging

Some testing of Dirac (commands)

Matlab interprets (response to commands)

































New files Oct. 2. 95

Texts for NORDIC MATLAB CONFERENCE contribution, postscript and other new files

Gramm-Schmidt example.

Dirac Interpreter (parse.m) NEW Aug 7th 95
Gramm-Schmidt example commands
Gramm-Schmidt example result .... Text of the Abstract ....

Back to top ->








just a little note:  using matlab over large distance:
use
terminal tek401x
(remember to start without DISPLAY set)
saves time !