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.Interaction. scattering_rate  (  rho ,  as_density_matrix=True ,  k=None ,  theta=None ,  phi=None ,  k_vec=None ,  x_vec=None ,  i=None ,  f=None ,  axis=1  )[source]

The photon scattering rate of the atom of the interaction, see Atom.scattering_rate.

Parameters:
rhoarray_like

The density matrix $\rho$ of the Atom. Must have the same size as the Atom along the specified axis, and axis + 1 if as_density_matrix == True.

as_density_matrixbool

Whether rho is a state vector or a density matrix.

karray_like | None

The rank(s) $k$ of the emitted multipole radiation. If None, all orders 1 <= k <= Atom.decay_map.k_max are considered.

thetaarray_like | None

The elevation angle of detection relative to the $z$-axis.

phiarray_like | None

The azimuthal angle of detection in the $xy$-plane.

k_vecarray_like | None

An iterable of directional vectors $\hat{k}$ emitted by the atom. k_vec must have shape (3, ) or (m, 3).

x_vecarray_like | None

An iterable of complex polarization vectors $\vec{\varepsilon}$ emitted by the atom. x_vec must have shape (3, ) or (m, 3) or be a str indicating a special polarization, which is created automatically based on the emission directions:

  • $\hat{e}_\theta$: {"z", "theta", "t"}
  • $\hat{e}_\phi$: {"x", "y", "xy", "phi", "p"}
  • $\sigma^-$: {"-", "s-", "sigma-", "l"}
  • $\sigma^+$: {"+", "s+", "sigma+", "r"}
iarray_like | None

The initially excited state indexes to consider for spontaneous decay. If None, all states are considered.

farray_like | None

The final decayed state indexes to consider for spontaneous decay. If None, all states are considered.

axisint

The axis along which the population is aligned in rho. The default is axis = 1, expecting rho as an array with shape (n, Atom.size, Atom.size, ... ).

Returns:
Gamma_scndarray

The scattering rate $\Gamma_\mathrm{sc}$ as an array with shape (m, n, ...).

Raises:
ValueError

If the emission directions or polarizations are specified inconsistently or if k is out of range.