Package: lightshifts
lightshiftsCalculate dynamical scalar, vector and tensor light shifts for atomic states
in the presence of hyperfine coupling.The modulelightshifts.lightshift_solversolves for the scalar,
vector and tensor light shifts induced by atomic dipole transitions.State energies, hyperfine coupling coefficients and atomic transition properties
are provided in the form of json files.InstallationInstall the module usingpipinstallgit+https://github.com/himbeles/lightshifts.gitUsage oflightshifts.lightshift_solverThis is a basic example to calculate the scalar dynamic light shift induced in the groundstate of ytterbium-173 by 100 W/cm^2 light with a  wavelength 670 nm using the example state fileexamples/atom_yb173.jsonand transition fileexamples/transitions_1S0.json.# Import the module usingimportlightshifts.lightshift_solverasls_solver# Load the atomic state properties file and the transitions filels=ls_solver('examples/atom_yb173.json','examples/transitions_1S0.json')# Calculate the scalar lightshift in Hzls.scalar_lightshift(lam=670e-9,laser_intensity=100)# Out[]: -960.039953941305The total dynamic light shift, including scalar, vector and tensor light shifts, can also be obtained -- here, for a magnetic sublevel $m_F=-5/2$ and $\sigma^+$ polarized light ($q=1$):# Calculate the total lightshift in Hzls.total_lightshift(lam=670e-9,q=1,mFi=-5/2,laser_intensity=100)# Out[]: -960.038498669505# or a list holding the scalar, vector and tensor light shift separatelyls.lightshifts(lam=670e-9,q=1,mFi=-5/2,laser_intensity=100)# Out[]: (-960.039953992523, 0.000817922762313870, 0.000637400256046666)For an example of more advanced module usage, seeexamples/example_lightshifts_yb173.ipynb.The state and transition filesState energies, hyperfine coupling coefficients and transition properties for an atom
are provided in the form of two json files:atom.jsonis a database of (at least) all the states connected by the atomic transitions that induce the dynamic light shift and which are given in the second file. It also includes thenameof the atom and its nuclear spinI. The states are specified and sorted using an electon shell configuration string (e.g.6s6p) and the LS coupling name of the state (e.g.3P1). From the LS coupling name, the tool infers the relevant quantum numberJfor the given state. If only the quantum number J is known for the state, you can give it an arbitrary name and specifyJas a property of the state (seeexamples/atom_yb173.json). Thefrequencyin Hz of all the states must be provided relative to the ground state oronereference state).Optionally, you can give the hyperfine coupling coefficients A (hyper_A) and B (hyper_B) in Hz, such that the vector and tensor shifts around these states can be calculated.For example:{"name":"yb173","I":2.5,"states":{"6s6s":{"1S0":{"frequency":0,"hyper_A":0,"hyper_B":0}},"6s6p":{"3P0":{"frequency":518294362279306.1,"_ref_frequency":"NIST","hyper_A":0,"hyper_B":0},"3P1":{"frequency":539386800288320.6,"_ref_frequency":"NIST","hyper_A":-1094328000.0,"hyper_B":-826635000.0,"_ref_hyper":"Pandey et al., PRA 80, 022518 (2009)"}}}}transitions-stateX.jsonlists all the relevant transitions fromonestarting (initial) statestate_i, that we want to calculate the light shifts for. It should include the transitions most relevant for the wavelength range to be probed, meaning transitions to final statesstate_fwith a wavelength near that range and the broader the transition the more important. As the transition strength, specify the decay rateGammafromstate_ftostate_i(Einstein A coefficient). For a closed transition, this would be the inverse lifetime ofstate_for $\Gamma = 2\pi\gamma$ with $\gamma$ the natural linewidth.For example:[{"state_i":["6s6s","1S0"],"state_f":["6s6p","1P1"],"Gamma":183016105.4172767,"_ref_Gamma":"Blagoev-1994"},{"state_i":["6s6s","1S0"],"state_f":["6s6p","3P1"],"Gamma":1154601.0853250204,"_ref_Gamma":"Blagoev-1994"}]Estimate branching ratiosThe reduced dipole matrix element can be calculated from a measured transition rate between two LS coupling states. However, sometimes only the lifetime of a state is known experimentally and not the branching ratios into energetically lower lying states.
The methodbranching_ratio_LSof the classlightshifts.atomcan help by estimating the ratio of dipole matrix elements between a selection of states, using the parity selection rule for the electron configuration and angular momentum selection.First, import a dictionary of atomic states and their energies (same as the atomic states file above).importlightshifts.atomasatomyb=atom.from_json('atom_yb173.json')Then, calculate all branching ratios of an initial state state_i into all energetically lower lying states in the imported state library:state_i=('6s5d','3D1')yb.branching_ratios_LS_dict(state_i,verbose=True)# Out[]:#    branching ratio into  ('6s6p', '3P0') = 0.6387527684341578#    branching ratio into  ('6s6p', '3P1') = 0.3519121426242965#    branching ratio into  ('6s6p', '3P2') = 0.009335088941545725##    {('6s6s', '1S0'): 0.0,#     ('6s6p', '3P0'): 0.6387527684341578,#     ('6s6p', '3P1'): 0.3519121426242965,#     ('6s6p', '3P2'): 0.009335088941545725}or, calculate the branching into one single final state only:state_i=('6s5d','3D1')state_f=('6s6p','3P0')yb.branching_ratio_LS(state_i,state_f)# Out[]: 0.6387527684341578An example of how the transition rates were calculated for ytterbium-173 can be found inexamples/example_transition_collection_yb173.ipynb.