AtomicDensityMatrix Package

AtomicDensityMatrix is a package for Mathematica version 6+ that facilitates density-matrix calculations in atomic and related systems. Note: The documentation is incomplete; there may be missing symbol reference pages. Look at the tutorials to get started. Documentation is currently an active part of package development.

Atomic Systems

AtomicState expression representing an atomic state

Sublevels generate the hyperfine and Zeeman sublevels for a list of atomic states

J  ▪  L  ▪  S  ▪  M  ▪  NuclearSpin  ▪  F  ▪  Energy  ▪  HyperfineA  ▪  HyperfineB  ▪  NaturalWidth  ▪  GFactor  ▪  StateLabel  ▪  BranchingRatio  ▪  Parity  ▪  AtomicSystemQ  ▪  AtomicSystemType  ▪  StatePosition  ▪  SelectStates  ▪  DeleteStates  ▪  ExcitedStates  ▪  GroundStates  ▪  RemoveZeemanSublevels

Atomic Properties

AtomicData spectroscopic data for a selection of atomic states

Density Matrices and State Vectors

DensityMatrix create density matrix for an atomic system

DMVariables  ▪  Ket

Operators and Hamiltonians

WignerEckart matrix elements of spherical tensor operators

Hamiltonian the Hamiltonian for an atomic system subject to external classical fields

RotatingWaveApproximation perform the rotating-wave approximation on a Hamiltonian

RotatingWaveTransformMatrix  ▪  EffectiveHamiltonian

Relaxation and Repopulation

IntrinsicRelaxation relaxation matrix for spontaneous decay

TransitRelaxation  ▪  TransitRepopulation

Atomic Evolution

LiouvilleEquation evolution equations for an atomic system

InitialConditions specify the density matrix at an initial time

Light Propagation

OpticalField generate the expression for an optical field

Observables the change in optical parameters upon propagation through an optically thin medium

LinearAbsorption formula for absorption of weak light


LevelDiagram draw a level diagram for an atomic system, Hamiltonian, and density matrix

AMPSPlot draw the angular-momentum probability surface for a density matrix

Tensor Algebra

ToCartesian convert a spherical tensor into the Cartesian basis

Decomposition decompose a reducible operator into a sum of polarization moments

Rank  ▪  Component  ▪  Recomposition  ▪  TensorForm



  • The State Vector and the Schrödinger Equation
  • The Density Matrix and the Liouville Equation
  • Components

  • Matrix Notation
  • Inner Products and Matrix Multiplication
  • Tensor Component Operations and Extraction
  • Conversion Between the Cartesian and Spherical Bases
  • Specifying the Atomic System
  • Displaying the Density Matrix
  • The Wigner-Eckart Theorem
  • Quantum-Mechanical Rotations
  • Constructing the Hamiltonian
  • The Rotating-Wave Approximation
  • Angular-Momentum Probability Surfaces
  • Basic Examples

  • Two-Level System: the Rabi Frequency and the Saturation Parameter
  • Three-Level System: Electromagnetically Induced Transparency
  • Zeeman Structure: Nonlinear Magneto-Optical Rotation
  • Hyperfine Structure: Breit-Rabi Diagram
  • Linear Absorption Fitting
  • Stark Mixing
  • Crossed Electric and Magnetic Fields
  • Advanced Examples

  • Visualizing Polarization Moments and Quantum Beats
  • Electromagnetically Induced Transparency and Atomic Polarization
  • PumpProbe Magnetometry
  • Nonlinear Magneto-Optical Rotation in an Alkali Atom
  • Nonlinear Magneto-Optical Rotation with Frequency-Modulated Light
  • Nonlinear Magneto-Optical Rotation in a Radio-Frequency Field
  • Collapse and Revival Quantum Beats
  • The AC Stark Effect
  • Isolating the Hexadecapole Moment
  • Light Polarization Demonstration
  • Related Links

    AtomicDensityMatrix web page

    Copyright and License:

     Copyright (C) 20042023 Simon M. Rochester <> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see