# Single atom calculations¶

## Overview¶

StarkMap Methods

 StarkMap.defineBasis(n, l, j, mj, nMin, …) Initializes basis of states around state of interest StarkMap.diagonalise(eFieldList[, …]) Finds atom eigenstates in a given electric field StarkMap.plotLevelDiagram([units, …]) Makes a plot of a stark map of energy levels StarkMap.showPlot([interactive]) Shows plot made by plotLevelDiagram StarkMap.savePlot([filename]) Saves plot made by plotLevelDiagram StarkMap.exportData(fileBase[, exportFormat]) Exports StarkMap calculation data. StarkMap.getPolarizability([maxField, …]) Returns the polarizability of the state (set during the initalization process)

LevelPlot Methods

 LevelPlot.makeLevels(nFrom, nTo, lFrom, lTo) Constructs energy level diagram in a given range LevelPlot.drawLevels() Draws a level diagram plot LevelPlot.showPlot() Shows a level diagram plot

## Detailed documentation¶

This module provides calculations of single-atom properties.

Included calculations are Stark maps, level plot visualisations, lifetimes and radiative decays.

class arc.calculations_atom_single.LevelPlot(atomType)[source]

Single atom level plots and decays

For an example see Rydberg energy levels example snippet.

Parameters: atom (AlkaliAtom) – ={ alkali_atom_data.Lithium6, alkali_atom_data.Lithium7, alkali_atom_data.Sodium, alkali_atom_data.Potassium39, alkali_atom_data.Potassium40, alkali_atom_data.Potassium41, alkali_atom_data.Rubidium85, alkali_atom_data.Rubidium87, alkali_atom_data.Caesium } Alkali atom type whose levels we want to examine
drawLevels()[source]

Draws a level diagram plot

makeLevels(nFrom, nTo, lFrom, lTo)[source]

Constructs energy level diagram in a given range

Parameters: nFrom (int) – minimal principal quantum number of the states we are interested in nTo (int) – maximal principal quantum number of the states we are interested in lFrom (int) – minimal orbital angular momentum of the states we are interested in lTo (int) – maximal orbital angular momentum of the states we are interested in
showPlot()[source]

Shows a level diagram plot

class arc.calculations_atom_single.StarkMap(atom)[source]

Calculates Stark maps for single atom in a field

This initializes calculation for the atom of a given type. For details of calculation see Zimmerman [1]. For a quick working example see Stark map example snippet.

Parameters: atom (AlkaliAtom) – ={ alkali_atom_data.Lithium6, alkali_atom_data.Lithium7, alkali_atom_data.Sodium, alkali_atom_data.Potassium39, alkali_atom_data.Potassium40, alkali_atom_data.Potassium41, alkali_atom_data.Rubidium85, alkali_atom_data.Rubidium87, alkali_atom_data.Caesium } Select the alkali metal for energy level diagram calculation

Examples

State $$28~S_{1/2}~|m_j|=0.5$$ polarizability calculation

>>> from arc import *
>>> calc = StarkMap(Caesium())
>>> calc.defineBasis(28, 0, 0.5, 0.5, 23, 32, 20)
>>> calc.diagonalise(np.linspace(00.,6000,600))
>>> print("%.5f MHz cm^2 / V^2 " % calc.getPolarizability())
0.76705 MHz cm^2 / V^2


Stark map calculation

>>> from arc import *
>>> calc = StarkMap(Caesium())
>>> calc.defineBasis(28, 0, 0.5, 0.5, 23, 32, 20)
>>> calc.diagonalise(np.linspace(00.,60000,600))
>>> calc.plotLevelDiagram()
>>> calc.showPlot()
<< matplotlib plot will open containing a Stark map >>


Examples

Advanced interfacing of Stark map calculations (StarkMap class) Here we show one easy way to obtain the Stark matrix (from diagonal mat1 and off-diagonal part mat2 ) and basis states (stored in basisStates ), if this middle-product of the calculation is needed for some code build on top of the existing ARC package.

>>> from arc import *
>>> calc = StarkMap(Caesium())
>>> calc.defineBasis(28, 0, 0.5, 0.5, 23, 32, 20)
>>> # Now we have matrix and basis states, that we can used in our own code
>>> # Let's say we want Stark map at electric field of 0.2 V/m
>>> eField = 0.2 # V/m
>>> # We can easily extract Stark matrix
>>> # as diagonal matrix (state detunings)
>>> #  + off-diagonal matrix (propotional to electric field)
>>> matrix = calc.mat1+calc.mat2*eField
>>> # and the basis states as array [ [n,l,j,mj] , ...]
>>> basisStates = calc.basisStates
>>> # you can do your own calculation now...


References

 [1] M. L. Zimmerman et.al, PRA 20:2251 (1979) https://doi.org/10.1103/PhysRevA.20.2251
basisStates = None

List of basis states for calculation in the form [ [n,l,j,mj], …]. Calculated by defineBasis .

defineBasis(n, l, j, mj, nMin, nMax, maxL, Bz=0, progressOutput=False, debugOutput=False)[source]

Initializes basis of states around state of interest

Defines basis of states for further calculation. $$n,l,j,m_j$$ specify state whose neighbourhood and polarizability we want to explore. Other parameters specify basis of calculations. This method stores basis in basisStates, while corresponding interaction matrix is stored in two parts. First part is diagonal electric-field independent part stored in mat1, while the second part mat2 corresponds to off-diagonal elements that are propotional to electric field. Overall interaction matrix for electric field eField can be then obtained as fullStarkMatrix = mat1 + mat2 *eField

Parameters: n (int) – principal quantum number of the state l (int) – angular orbital momentum of the state j (flaot) – total angular momentum of the state mj (float) – projection of total angular momentum of the state nMin (int) – minimal principal quantum number of the states to be included in the basis for calculation nMax (int) – maximal principal quantum number of the states to be included in the basis for calculation maxL (int) – maximal value of orbital angular momentum for the states to be included in the basis for calculation Bz (float) – optional, magnetic field directed along z-axis in units of Tesla. Calculation will be correct only for weak magnetic fields, where paramagnetic term is much stronger then diamagnetic term. Diamagnetic term is neglected. progressOutput (bool, optional) – if True prints the progress of calculation; Set to false by default. debugOutput (bool, optional) – if True prints additional information usefull for debuging. Set to false by default.
diagonalise(eFieldList, drivingFromState=[0, 0, 0, 0, 0], progressOutput=False, debugOutput=False)[source]

Finds atom eigenstates in a given electric field

Eigenstates are calculated for a list of given electric fields. To extract polarizability of the originaly stated state see getPolarizability method. Results are saved in eFieldList, y and highlight.

Parameters: eFieldList (array) – array of electric field strength (in V/m) for which we want to know energy eigenstates progressOutput (bool, optional) – if True prints the progress of calculation; Set to false by default. debugOutput (bool, optional) – if True prints additional information usefull for debuging. Set to false by default.
eFieldList = None

Saves electric field (in units of V/m) for which energy levels are calculated

exportData(fileBase, exportFormat='csv')[source]

Exports StarkMap calculation data.

Only supported format (selected by default) is .csv in a human-readable form with a header that saves details of calculation. Function saves three files: 1) filebase _eField.csv; 2) filebase _energyLevels 3) filebase _highlight

For more details on the format, see header of the saved files.

Parameters: filebase (string) – filebase for the names of the saved files without format extension. Add as a prefix a directory path if necessary (e.g. saving outside the current working directory) exportFormat (string) – optional. Format of the exported file. Currently only .csv is supported but this can be extended in the future.
getPolarizability(maxField=10000000000.0, showPlot=False, debugOutput=False, minStateContribution=0.0)[source]

Returns the polarizability of the state (set during the initalization process)

Parameters: maxField (float, optional) – maximum field (in V/m) to be used for fitting the polarizability. By default, max field is very large, so it will use eigenvalues calculated in the whole range. showPlot (bool, optional) – shows plot of calculated eigenValues of the given state (dots), and the fit (solid line) for extracting polarizability debugOutput (bool, optional) – if True prints additional information usefull for debuging. Set to false by default. scalar polarizability in units of MHz cm $$^2$$ / V $$^2$$ float
highlight = None

highlight[i] is an array of values measuring highlighted feature in the eigenstates at electric field intensity eFieldList[i]. E.g. highlight[i][j] measures highlighted feature of the state with energy y[i][j] at electric field eFieldList[i]. What will be highlighted feature is defined in the call of diagonalise (see that part of documentation for details).

indexOfCoupledState = None

Index of coupled state (initial state passed to defineBasis) in basisStates list of basis states

mat1 = None

diagonal elements of Stark-matrix (detuning of states) calculated by defineBasis in the basis basisStates.

mat2 = None

off-diagonal elements of Stark-matrix divided by electric field value. To get off diagonal elemements multiply this matrix with electric field value. Full Stark matrix is obtained as fullStarkMatrix = mat1 + mat2 *eField. Calculated by defineBasis in the basis basisStates.

plotLevelDiagram(units=1, highlighState=True, progressOutput=False, debugOutput=False, highlightColour='red', addToExistingPlot=False)[source]

Makes a plot of a stark map of energy levels

To save this plot, see savePlot. To print this plot see showPlot.

Parameters: units (int,optional) – possible values {1,2} ; if the value is 1 (default) Stark diagram will be plotted in energy units cm $${}^{-1}$$; if value is 2, Stark diagram will be plotted as energy $$/h$$ in units of GHz highlightState (bool, optional) – False by default. If True, scatter plot colour map will map in red amount of original state for the given eigenState progressOutput (bool, optional) – if True prints the progress of calculation; Set to False by default. debugOutput (bool, optional) – if True prints additional information usefull for debuging. Set to False by default. addToExistingPlot (bool, optional) – if True adds points to existing old plot. Note that then interactive plotting doesn’t work. False by default.
savePlot(filename='StarkMap.pdf')[source]

Saves plot made by plotLevelDiagram

Parameters: filename (str, optional) – file location where the plot should be saved
showPlot(interactive=True)[source]

Shows plot made by plotLevelDiagram

y = None

y[i] is an array of eigenValues corresponding to the energies of the atom states at the electric field eFieldList[i]. For example y[i][j] is energy of the j eigenvalue (energy of the state) measured in cm $${}^{-1}$$ relative to the ionization threshold.

arc.calculations_atom_single.printState(n, l, j)[source]

Prints state spectroscopic label for numeric $$n$$, $$l$$, $$s$$ label of the state

Parameters: n (int) – principal quantum number l (int) – orbital angular momentum j (float) – total angular momentum
arc.calculations_atom_single.printStateString(n, l, j)[source]

Returns state spectroscopic label for numeric $$n$$, $$l$$, $$s$$ label of the state

Parameters: n (int) – principal quantum number l (int) – orbital angular momentum j (float) – total angular momentum label for the state in standard spectroscopic notation string