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  (  atom=None ,  lasers=None ,  environment=None ,  delta_max=1000.0 ,  controlled=True  )[source]

An interaction between an Atom and a list of lasers in an Environment. All frequencies are in $\mathrm{MHz}$, all times are in $\mu\mathrm{s}$.

Parameters:
atomAtom | None

The Atom interacting with the lasers.

lasersIterable[Laser] | None

The lasers interacting with the Atom.

environmentEnvironment | None

The electromagnetic Environment of the interaction.

delta_maxscalar

The maximum difference between a laser and a transition frequency for that transition to be considered laser-driven. The default value is 1000.0 (MHz).

controlledbool

Whether the ODE solver uses an error controlled stepper or a fixed step size. Setting this to True is particularly useful for dynamics where a changing resolution is required. However, this comes at the cost of computing time. The default step size for the uncontrolled stepper is dt = 1e-3 (1 ns).

Attributes:
atolfloat

The absolute error tolerance of controlled solver.

atomAtom

The Atom of the interaction.

atommapndarray

A projection matrix $A$ mapping the state frequencies onto the diagonal of the Hamiltonian. It holds $H_{ii} \leftarrow \sum\limits_j A_{ij} (\omega_0)_j$.

controlledbool

Whether the ODE solver uses an error controlled stepper or a fixed step size. Setting this to True is particularly useful for dynamics where a changing resolution is required. However, this comes at the cost of computing time. The default step size for the uncontrolled stepper is dt = 1e-3 (1 ns).

delta_maxfloat

The maximum difference between a laser and a transition frequency for that transition to be considered laser-driven. The default value is 1000.0 (MHz).

deltamapndarray

A projection matrix $B$ mapping the laser frequencies onto the diagonal of the Hamiltonian. It holds $H_{ii} \leftarrow \sum\limits_m B_{im}\omega_m$.

densebool

Whether the ODE solver uses an error controlled dense output stepper or a fixed step size. If True, this overrides the controlled flag. Setting this to True is particularly useful for dynamics where a changing resolution is required. However, this comes at the cost of computing time. The default step size for the uncontrolled stepper is dt = 1e-3 (1 ns).

dtfloat

The (initial) step size of (controlled) solvers.

dt_maxfloat

The maximum step size of controlled solvers.

environmentEnvironment

The Environment of the interaction.

historyndarray

The history of states visited during the generation of the diagonal maps.

history_sizeint

The length of the history of states visited during the generation of the diagonal maps.

instanceCppHandler

The wrapped C++ instance.

laserslist[Laser]

The lasers of the interaction.

loopbool

Whether there are loops formed by the lasers in the atom.

rtolfloat

The relative error tolerance of controlled solver.

summapndarray

An array with shape (atom.size, atom.size), indicating the laser-connected states.

time_dependentbool

Whether the system Hamiltonian is allowed to be time-dependent.