- qspec.simulate. Interaction.mc_master ( t , delta = None , m = 0 , v = None , y0 = None , dynamics = False , ntraj = 500 , as_density_matrix = True )[source]
Solver for the Monte-Carlo master equation, which is the Schrödinger equation with a non-hermitian Hamiltonian $$\begin{aligned} \frac{\partial\vec{\psi}}{\partial t} &= -\mathrm{i}(H + H_\text{leaky})\vec{\psi},\qquad \rho_{ij} = \lim\limits_{n\rightarrow\infty}\frac{1}{n}\sum\limits_{s=1}^n \langle i|\psi_s\rangle\langle\psi_s|j\rangle\\[2ex] (H_\text{leaky})_{jj} &= -\frac{\mathrm{i}}{2}\sum\limits_i\Gamma_{ij},\qquad (H_\text{leaky})_{ij}\big|_{i\neq j} = 0\\[2ex] \Gamma_{\!ij} &= \sum\limits_{Xk_{ij}} (a_{ij,k_{ij}}^{m_j - m_i})^2\,A_{ji}^{Xk_{ij}}\\[2ex] a_{ij,k_{ij}}^\lambda &= (-1)^{F_i + I + k_{ij} + J_j}\sqrt{(2F_i + 1)(2J_j + 1)} \langle F_im_ik_{ij}\lambda|F_jm_j\rangle\begin{Bmatrix}J_j & J_i & k_{ij} \\F_i & F_j & I\end{Bmatrix}\\[2ex] X_{\!ij} &= \begin{cases}+1, & \text{if electric } (\mathrm{E}k_{ij}) \\ \ \,0, & \text{if magnetic } (\mathrm{M}k_{ij})\end{cases}, \end{aligned}$$ where the Hamiltonian $H$ (2π MHz) is time-independent whenever possible, see
qspec.simulate.Interaction.hamiltonian, $H_\text{leaky}$ is an imaginary diagonal operator, and $\rho$ is the density matrix in the limit of an infinite number of samples. Solutions fornsamples can be calculated in parallel fornttimes. The complexity of the Monte-Carlo approach only scales linearly withAtom.size, as compared with that of the exact master equation, scaling withAtom.size ** 2.- Parameters:
-
- tarray_like
The times $t$ when to compute the solution. Any array is cast to the shape
(nt, ), wherentis the size of the arrayt(μs).- deltaarray_like
An array of laser frequency shifts $\vec{\Delta}$.
deltamust be a scalar, a 1d- or 2d-array with shapes(n, )or(n, nl), respectively, wherenlis the number of lasers of theInteraction(MHz).- mOptional[int]
The index of the shifted laser. If
deltais a 2d-array,mist omitted.- varray_like
Atom velocities $\vec{v}$. Must be a scalar or have shape
(n, )or(n, 3). In the first two cases, the velocity vector(s) are assumed to be aligned with the $x$-axis (m/s).- y0array_like
The initial state of the
Atom. This must beNoneor have shape(Atom.size, )or(n, Atom.size). IfNone, all states with the same label as the firstStateinatom.statesare populated equally.- dynamicsbool
Whether to compute the momentum dynamics of the photon-atom interactions.
- ntrajint
The number of samples
nto compute if no samples were given withdelta,v, ory0.- as_density_matrixbool
Whether the result is returned as density matrices or as state vectors.
- Returns:
-
- rho_t(ndarray, ndarray)
The integrated Monte-Carlo master equation as a complex-valued array of shape
(n, Atom.size, Atom.size, nt)or(n, Atom.size, nt).