AtomicDensityMatrix is a package for Mathematica 6 and later that facilitates analytic and numerical density-matrix calculations in atomic and related systems. It is intended to be both general and user-friendly, and to be useful to the working physicist as well as to students.
AtomicDensityMatrix is open source software, licensed under the GPLv3.
The package has been updated for compatibility with Mathematica 13.2. Please send bug reports to simon@rochesterscientific.com.
Take a look at the online documentation for examples of what the package can do.
First download ADM_yy.mm.dd.zip.
Installing a Mathematica package consists entirely of placing the package files in a location where Mathematica can find them. You can do this using one of the following two methods:
$BaseDirectory or $UserBaseDirectory in Mathematica. In Mathematica 7
or later, you can open the directory in a file browser by evaluating
SystemOpen[$BaseDirectory] or
SystemOpen[$UserBaseDirectory] (Note that under Windows or Mac OS these
directories may be hidden in the file system by default.)
[BaseDirectory]/Applications/AtomicDensityMatrix where
[BaseDirectory] is the directory you chose in the previous step.
To load and test the package in Mathematica, evaluate
<<AtomicDensityMatrix`
and then
$ADMVersion
to see the package version number,
AMPSPlot[DiagonalMatrix[{1, 0, 1}]]
to see a simple angular-momentum-probability surface, and
LevelDiagram[ZeemanSystem[1]]
to plot the level diagram for a J=1 atomic system. There are many other examples in the
documentation.
The package documentation is growing, but far from complete. It is available in the Mathematica Documentation Center when the package is installed. (You may have to restart Mathematica immediately after installation to see the AtomicDensityMatrix documentation appear in the Documentation Center.)
To view the documentation, select "Help > Documentation Center", and click "Add-Ons and Packages" at the bottom of the page (for version 6, "Installed Add-Ons" on the bottom right). You will reach a page of links to the documentation for installed packages. Alternatively, you can just enter "adm" in the Documentation Center search bar—one of the first few results should be for the ADM package guide page.
The documentation is also available online in html format.
The LGSBloch package is an extension to the Atomic Density Matrix package that contains routines for calculating the return flux from optically excited alkali atoms, specifically designed for Na atoms in the mesosphere.
The LGSBloch package requires Mathematica 7 or later.
To install, first install the ADM package. Then download LGSBloch_yy.mm.dd.zip below, and follow the same procedure as with the ADM package, so that the directory "LGSBloch" ends up in the "Applications" directory alongside the "AtomicDensityMatrix" directory.
Some basic documentation is available in the Mathematica Documentation Center after the package is installed. Press F1 to get the Documentation Center, and enter "LGSBloch" in the search box.
StateLabelQ, StatePosition, etc, to match state labels with patterns.
Fluorescence now takes a required transition specificiation argument.FluorescenceTensor now gives result in spherical rather than Cartesian basis.Subspace option for LiouvilleEquation.TransitRepopulation and OpticalRepopulation to be applied to
experimental systems.TransitionEvaluate.
All and None as transition specifications.SDamping is now included in Repopulation function.ReducedRabiFrequency, HyperfineTypeSystem,
AtomicConfiguration, AtomicTerm, TermSymbol,
ValenceElectron, CoreSymbol, SpinMultiplicity, LSymbol,
PrincipalQuantumNumber, ElectronL, ElectronEquivalency,
OpticalBroadening, AtomicSystem, PerturbativeLinearSolve,
TensorTrace, ProjectionProbability, RepresentationTransform,
BroadLineApproximation, TensorRecompose, TensorMultiply,
TransformTensor, TensorOperatorQ, SmartThread,
AccumulateMap functions.
E1Hamiltonian to always use first nonzero component of the electric field for
Toy systems.
Hyperfine systems.Decomposition to apply to vector operators.TableForm to TensorForm.TensorType, TensorForm, TensorMultiply, etc. to work with
additional tensor structures.MatrixRSolve. Code using MatrixRSolve will need to be
updated to use new syntax.PolarizationVector and PropagationVector in spherical
basis.AllowedCouplings option for LevelDiagram.DMSubstitute, Submatrix, TransitionEvaluate,
TransitionPosition, PopulatedDM, FluorescenceTensor functions.
Subspace option for DensityMatrix.AllowedCouplings, AllowedElements, and
NeglectedElements.
DiagonalMarixQ for Mathematica 12.NeglectedCouplings option for WignerEckart.TensorType, TensorTypeQ, TensorDepth functions.MapOnComponents function as ComponentMap.AllowedCouplings and NeglectedCouplings options for
Hamiltonian.
AllowedElements and NeglectedElements options for
DensityMatrix.
AtomicData.WignerEckart for Toy systems to match angular-momentum
systems.Hamiltonian for Toy systems to take the magnitude of the specified
electric field if there is more than one Cartesian component.RotatingWaveTransform function; this functionality can be obtained with
RotatingWaveApproximation using the option Method -> "KeepFastTerms".
MatrixMultiply function, and added option
"MultiplyLevel".
ContractOneByOnes option for MatrixMultiply as
ScalarizeOneByOnes.
Fine and Hyperfine atomic system types.Wedge and Vee products as top and bottom level
MatrixMultiply operations, respectively.
L and S operators.Hamiltonian now supports M1 transitions between fine-structure states.RestrictCoupling option for Hamiltonian.WignerEckart function for large systems.Recomposition function.LinearAbsorption function and changed argument order.
Notebooks that use LinearAbsorption will need to be modified accordingly.
LinearAbsorption symbol page.LevelDiagram.ReducedME.LevelDiagram, AMPSPlot, ToCartesian.
CartesianQ.MatrixMultiply.MapOnParameters and ReplaceMatrixElement functions.Energies and TransitionFrequencies functions.SpontaneousEmission operator.HyperfineShift to zero for Toy and Zeeman systems.StateLabel so that undefined symbols can be used as labels.AtomicData.Arrow3D.TextOnTop function.Mathematica 11.Region to ExperimentalRegion. User notebooks that use
Region will need to be updated.StateLabelQ and StateMatchQ functions, removed deprecated syntax for
StatePosition and StateMatchQ, added StateEvaluate function.
LevelDiagram function.Fluorescence function.FluorescenceOperator for toy systems.BranchingRatio to zero for same-parity states.LevelDiagram.GetLine to GetLines.Arrow3D and PlotAndFit packages into the AtomicDensityMatrix application.
These packages no longer have to be loaded separately. The Graphics and DataAnalysis folders have been
removed from the ADM application. When upgrading to this version, it is best to remove the old Graphics
and DataAnalysis folders from the installation directory ($[User]BaseDirectory/Applications), to avoid
accidentally loading old versions of these packages.WignerEckart, Hamiltonian, and
OpticalRepopulation.
Arrow3D for Mathematica 10. Tweaked default graphics options for
Axes3D and AMPSPlot.
PlotAndFit for Mathematica 10.Void as VoidRegion.
User notebooks that use the Void command will need to be changed accordingly.
FixTicks and AlignedGraphicsGrid.BranchingRatio for setting branching ratios for inverse decays to zero.
OpticalRepopulation to give more reasonable result when BranchingRatios are not
specified.MatrixMultiply to allow multiplying a scalar operator by a (Cartesian) vector
operator.Interaction option of Hamiltonian to the strings
"Internal", "ElectricDipole", "MagneticDipole", and
"Polarizability"
Xx, Yy, and Zz are defined only if the
VectorAnalysis` package has not been loaded. If using VectorAnalysis` package,
load it first to avoid name conflict warnings.
OpticalField to produce simpler expressions for arbitrary polarization and
propagation vectors.PhysicalConstants` and Units`
has been completely redesigned, and merged with the kernel. However, I don't think loading these
packages causes any conflict with built-in functionality, so for backwards compatibility I'm going to
continue loading these packages (and suppress the obsolete package warning). Please let me know if you
encounter any conflicts.VectorAnalysis` package has been redesigned and incorporated
into the kernel. There was very little use of it in the ADM package, so I was able to remove the
dependency on the VectorAnalysis` package altogether.TensorProduct function in Mathematica 9, so the ADM
TensorProduct function has been renamed SphericalTensorProduct
Label as StateLabel; the option Label for
DensityMatrix has been renamed DMLabel. User notebooks that use the
Label command will need to be changed correspondingly.
ComplexExpand behavior.RotatingWaveApproximation and F.DropFastTerms (and RotatingWaveApproximation) so that sums of two
different optical frequencies are not dropped. Also extended to allow some more complicated expressions as
frequency arguments.StatePosition, SelectStates, and related functions to allow
specification of the selection criteria Label == lab as just lab.RotatingWaveApproximation, RotatingWaveTransform and
RotatingWaveTransformMatrix to automatically generate the RWA transform matrix given a list of
optical frequencies and the associated levels that they couple. Also allow the possibility to specify the
optical detuning parameters along with the optical frequencies.
ReplaceMatrixElement that applies replacement rules to particular matrix
elements in an operator selected according to their corresponding AtomicState parameters.StateMatchQHertz to 1/Second
(all quantities are in omega units, rad/sec, but were incorrectly labelled as being Hertz). If your
application depends on the AtomicData package, it may require modification.RotatingWaveTransformMatrix to allow manual specification of level shiftsToContravariant and ToCovariant to use Dual rather than
GeneralizedConjugateTranspose when converting between co- and contravariant quantities in order
to correctly handle complex vectors
SphericalPhase parameterization in OpticalFieldBranchingRatio so that it returns zero if it can tell that the reverse branching
ratio is nonzero.AtomicDataParityOffset option to LevelDiagramSublevelMultiplicity so that it returns (2F+1) when F is
defined (suggested by Guobin Liu)DopplerWidth to work if lower and upper states are given in either order (suggested
by Guobin Liu)WignerD is defined as a system function in Mathematica 8. Therefore the ADM version of
WignerD has been renamed ADMWignerD, and the built-in WignerD has
been overloaded so that it calls ADMWignerD when given arguments that match the
ADMWignerD format.
SelectStates now allows boolean operators in the selection criteriaPolarizationMatrices with numerical argumentLevelDiagram improvements<<AtomicDensityMatrix` rather than
<<AtomicPhysics`. A dummy AtomicPhysics package that calls the
AtomicDensityMatrix package is provided for backwards compatibility.
WignerRotate functionAMPSPlot for polarization-moment expansionsKet functionLevelDiagram and perturbative solve functions into subpackagesLevelDiagram for Mathematica 6.0 and made speed improvementsSteadyStatePerturbativeSolve, OpticalRepopulationDopplerWidth and MostProbableSpeed functionsComponent function for tensor decomposition matrix inputDMElementPattern and DMElementPartPattern functionsUnitaryTransformation to EffectiveHamiltonianDMRotating to DMFromRotatingDMPlotAndFit package in distributionAtomicDataAtomicTransition function to AtomicData packageExcitedStates functionLinearAbsorption functionLevelDiagram functionSphericalTensorQ functionSublevelMultiplicity functionWignerEckart functionRotatingWaveTransformExprToReImDMElementPatternFluorescenceOperator for angle-integrated caseLevelDiagram functionFluorescenceOperator as OpticalRepopulationOperator, added new
FluorescenceOperator function that calculates fluorescence into a solid angle
AtomicData and added NaTensorForm, Component, PolarizationMoments,
LevelDiagram functions
PolarizationMoments representation to OpticalRepopulation functionLiouvilleEquation function to produce Bloch equations in terms of polarization moments
ToCartesian function to apply to operators and arbitrary rank spherical tensorsLevelDiagram functionAtomicDensityMatrix`Common` packageF parameter: it now returns J if F is not
definedTensorForm functionRecomposition functionLevelDiagram functionLevelDiagram, TransitRepopulation, DensityMatrix,
DMVariables, Recomposition functions
Component functionCovariantDecompositionQ, ContravariantDecompositionQ,
CovariantDecompositionMatrixQ, ContravariantDecompositionMatrixQ,
TensorForm functions
LevelDiagram functionDensityMatrix, DMVariables, Ket,
AtomicState, L, S
$ADMVersion symbol.OpticalFieldRegion input to HamiltonianFractionalDensity Region parameterTransitRepopulationGFactor parameter to AtomicStateLevelDiagram function (prototype)Please send questions, suggestions, and bug reports to Simon Rochester at simon@rochesterscientific.com.