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. Interaction.mc_master  (  t delta = None m = 0 v = None y0 = None dynamics = False ntraj = 500 as_density_matrix = False  )[source]

Solver for the Monte-Carlo master equation. Solutions for n samples can be calculated in parallel.

Parameters:
tarray_like

The times when to compute the solution (us).

deltaarray_like

An array of frequency shifts for the laser(s) (MHz). 'delta' must be a scalar or a 1d- or 2d-array with shapes (n, ) or (n, #lasers), respectively.

mOptional[int]

The index of the shifted laser. If delta is a 2d-array, 'm' ist omitted.

varray_like

Atom velocities (m/s). Must be a scalar or have shape (n, ) or (n, 3). In the first two cases, the velocity vector(s) is(are) assumed to be aligned with the x-axis.

y0array_like

The initial state of the atom. This must be None or have shape (n, #states). If None, only the first ground state is populated.

dynamicsbool

Whether to compute the dynamics of the photon-atom interactions.

ntrajint

The number of samples to compute if no samples were given with 'delta', 'v', or 'y0'.

as_density_matrixbool

Whether the result is returned as density matrices or as state vectors.

Returns:
outNone

The integrated MC-Schroedinger equation as a complex-valued array of shape (n, #states, #times).

API navigation