Logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2025 Patrick Müller. All rights reserved.

qspec.simulate.density_matrix_diagonal  (  rho axis = 1  )[source]

The diagonal of the density matrix $\operatorname{diag}(\rho)$.

Parameters:
rhoarray_like

The density matrix $\rho$. Must have the same size in axis and axis + 1.

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:
outndarray

the diagonal of the density matrix as an array with shape (n, Atom.size, ...).

API navigation