Displaying the Density Matrix

When an atomic system has been specified, its corresponding symbolic density matrix can be formed. This is done with the DensityMatrix function.
DensityMatrix[sys]form the density matrix for an atomic system
DMVariables[sys]form the list of variables representing density matrix elements

Forming the density matrix.

This loads the package.
In[1]:=
Click for copyable input
Each density-matrix element connects two states s1 and s2 (or one state with itself for the diagonal elements). The states are indicated with a subscript StateLabel[si] for each state. For systems that take into account angular momentum, the angular-momentum quantum numbers are used as additional subscripts.
A two-level atomic system without angular momentum.
In[2]:=
Click for copyable input
Out[2]=
The density matrix for this system.
In[3]:=
Click for copyable input
Out[3]//MatrixForm=
Density-matrix elements for systems with Zeeman structure have subscript {StateLabel[si], M[si]} for each state si.
An atomic system consisting of a J=1 state and a J=0 state.
In[4]:=
Click for copyable input
Out[4]=
The density matrix for this system.
In[5]:=
Click for copyable input
Out[5]//MatrixForm=
Density matrix elements for systems with hyperfine and Zeeman structure have subscripts {StateLabel[si], F[si], M[si]} for each state.
An atomic system consisting of a J=1/2 state in an atom with nuclear spin I=1/2.
In[6]:=
Click for copyable input
Out[6]=
The density matrix for this system.
In[7]:=
Click for copyable input
Out[7]//MatrixForm=