qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec.simulate. lambda_states  (  t ,  delta_1 ,  delta_2 ,  a_ge ,  a_me ,  s_1 ,  s_2 ,  lw_1=0.0 ,  lw_2=0.0 ,  p0=None ,  time_resolved=False ,  show=False  )[source]

The evolution of the density matrix of a $\Lambda$-system, such as the alkali metals or the singly-charged alkaline-earth metals, driven by two lasers. The states are $|g\rangle$ and $|m\rangle$, the two ends of the $\Lambda$, and the intermediate state $|e\rangle$.

Parameters:
tarray_like

The time $t$ after which the density matrix is returned (μs). If all times from 0 to t are required, use time_resolved=True.

delta_1scalar

The detuning of the first laser relative to the $g\rightarrow e$ transition (MHz).

delta_2scalar

The detuning of the second laser relative to the $m\rightarrow e$ transition (MHz).

a_gescalar

The Einstein coefficient of the $e\rightarrow g$ transition ($2\pi\,\mathrm{MHz}$).

a_mescalar

The Einstein coefficient of the $e\rightarrow m$ transition ($2\pi\,\mathrm{MHz}$).

s_1scalar

The saturation parameter of the $g\rightarrow e$ transition.

s_2scalar

The saturation parameter of the $m\rightarrow e$ transition.

lw_1scalar

The spectral width (FWHM) of the first laser. It dephases the coherences involving $|g\rangle$ but not their populations ($2\pi\,\mathrm{MHz}$).

lw_2scalar

The spectral width (FWHM) of the second laser. It dephases the coherences involving $|m\rangle$ but not their populations ($2\pi\,\mathrm{MHz}$).

p0array_like | None

The initial density matrix elements [gg, mm, ee, gm, eg, em]. Must have shape (6, ). If None, initially all population is in the state $|g\rangle$.

time_resolvedbool

Whether to return the complete history of the result. If True, a 2-tuple (t, rho) is returned, where rho has shape (t.size, 6) and t is an array of equally spaced times, such that numerical integrations can be performed easily.

showbool

Whether to plot the result.

Returns:
rhondarray | tuple[ndarray, ndarray]

The density matrix elements [gg, mm, ee, gm, eg, em] after the time t.

Raises:
ValueError

If t is not a scalar or if p0 has the wrong size.