Physics

Couplings

AtomTwin.add_coupling!Function
add_coupling!(system, atom,
              level::Pair{HyperfineManifold,HyperfineManifold},
              Ω_π, Ω_σ⁺, Ω_σ⁻;
              noise = nothing, active = true, tol = 1e-10, beam = nothing)

Add all allowed electric-dipole couplings between the sublevels of two hyperfine manifolds.

The manifolds ground and excited are expanded into their constituent levels (.levels), selection rules and Clebsch–Gordan coefficients are applied via compute_coupling_strength, and any coupling with magnitude below tol is discarded. Optional noise wraps each coupling in a NoisyField. Returns a vector of the created couplings.

add_coupling!(system, atom,
              level::Pair{FineManifold,FineManifold},
              Ω_π, Ω_σ⁺, Ω_σ⁻;
              noise = nothing, active = true, tol = 1e-10, beam = nothing)

Add all allowed electric-dipole couplings between sublevels of two fine-structure manifolds, using polarization-resolved Rabi frequencies Ω_π, Ω_σ⁺, and Ω_σ⁻.

Dispatches to _add_couplings with the fine-manifold level sets.

add_coupling!(system, atom,
              level::Pair{HyperfineManifold,FineManifold},
              Ω_π, Ω_σ⁺, Ω_σ⁻;
              noise = nothing, active = true, tol = 1e-10, beam = nothing)

Add all allowed electric-dipole couplings between a hyperfine manifold (typically ground) and a fine-structure or Rydberg manifold (excited).

Expands both manifolds to their sublevels and uses compute_coupling_strength to include appropriate CG weights and selection rules for each (g,e) pair.

add_coupling!(system, atom,
              level::Pair{FineManifold,HyperfineManifold},
              Ω_π, Ω_σ⁺, Ω_σ⁻;
              noise = nothing, active = true, tol = 1e-10, beam = nothing)

Add all allowed electric-dipole couplings from a fine-structure manifold (ground) to a hyperfine manifold (excited).

This is the manifold-level counterpart of the mixed-level compute_coupling_strength method and delegates to _add_couplings.

add_coupling!(system, atom,
              level::Pair{<:AbstractLevel,<:AbstractLevel},
              Ω_π, Ω_σ⁺, Ω_σ⁻;
              beam = nothing, noise = nothing, active = true, tol = 1e-10)

Add a selection-rule–aware electric-dipole coupling between two specific sublevels g and e.

The effective Rabi frequency Ω is computed via compute_coupling_strength(g, e, atom, Ω_π, Ω_σ⁺, Ω_σ⁻). If abs(Ω) < tol, no coupling is added and an empty GlobalCoupling[] vector is returned. Otherwise, a single coupling is created via _add_coupling! and returned in a one-element GlobalCoupling array.

add_coupling!(system, atom,
              level::Pair{<:AbstractLevel,<:AbstractLevel},
              Ω;
              beam = nothing, noise = nothing, active = true, tol = 1e-10)

Add a direct Rabi coupling of strength Ω between two specific levels, without applying selection rules or Clebsch–Gordan coefficients.

This is useful for effective two-level models or custom matrix elements where Ω has already been computed externally. If Ω is a number with abs(Ω) < tol, no coupling is added and GlobalCoupling[] is returned. Otherwise _add_coupling! is invoked and either the created coupling or an empty vector is returned.

AtomTwin.Dynamiq.GlobalCouplingType
GlobalCoupling(b, atom, transition, rate)

Spatially uniform laser coupling between two internal levels with complex Rabi rate rate.

The internal operator H stores the forward and reverse parts of the interaction in basis b, while the _coeff field acts as a time-dependent envelope (default 1).

AtomTwin.Dynamiq.PlanarCouplingType
PlanarCoupling(b, atom, transition, rate, beam)

Planar laser coupling between two internal levels with a spatially dependent phase and amplitude given by beam.

The underlying Op H encodes the bare coupling in basis b, while update!(::PlanarCoupling, ::Int) updates the complex coefficient using the instantaneous position of atom and the beam wavevector.

Detunings

AtomTwin.add_detuning!Function
add_detuning!(system, atom, level, delta; active = true)

Add a single detuning term for a given atomic level.

delta is the physical detuning in rad/s. It may be a plain number, a Parameter, or a ParametricExpression. Builds a DetuningNode and appends it to system.nodes. Returns the compiled Detuning object.

AtomTwin.add_zeeman_detunings!Function
add_zeeman_detunings!(system, atom, manifold; B=0.0, delta=0.0, active=true)

Add Zeeman-shifted detunings for all levels in a manifold.

For each level the total detuning (node value) is

delta_total = delta - zeeman_coeff * B

where zeeman_coeff = mF * g_F * μ_B (hyperfine) or mJ * g_J * μ_B (fine). B and delta may be plain numbers or Parameters.

Returns a vector of the created Detuning objects.

AtomTwin.Dynamiq.DetuningType
Detuning(b, atom, level, value)

Single-level detuning term acting on level of atom with energy shift value.

The corresponding diagonal operator is stored as an Op in basis b, and contributes an on-site phase evolution to the Hamiltonian.

Dissipators

AtomTwin.add_decay!Function
add_decay!(system, atom, level::Pair, Gamma; active = true)

Add a single spontaneous-emission jump operator between two specific levels.

Gamma (rad/s) may be a plain number or a Parameter. Builds a DecayNode and appends it to system.nodes. Returns the compiled Jump object.

add_decay!(system, atom, levels::Pair{HyperfineManifold,HyperfineManifold}, rate; ...)

Add spontaneous decay from an excited hyperfine manifold to a ground manifold, with branching ratios set by Clebsch-Gordan coefficients.

add_decay!(system, atom, levels::Pair{HyperfineManifold,<:AbstractLevel}, rate; ...)

Add decay from an excited hyperfine manifold to a single leak level.

add_decay!(system, atom, levels::Pair{FineManifold,FineManifold}, rate; ...)

Add spontaneous decay with Clebsch-Gordan branching ratios between fine-structure manifolds.

add_decay!(system, atom, levels::Pair{FineManifold,<:AbstractLevel}, rate; ...)

Add decay from an excited fine-structure manifold into a single leak level.

AtomTwin.add_dephasing!Function
add_dephasing!(system, atom, level, gamma; active = true)

Add a pure dephasing jump operator for a single level.

add_dephasing!(system, atom, manifold, gamma; active = true)

Add pure dephasing jump operators for all levels in a manifold.

AtomTwin.Dynamiq.JumpType
Jump(b, atom, transition, rate; detectors = AbstractDetector[], blockade = 0)

Generic quantum jump process for a single atomic transition with decay rate rate.

The constructor builds the collapse operator L as an Op in basis b, optionally with a Rydberg blockade constraint on a given level. The same Jump object can be reused across different solvers, which may fill the cached non-Hermitian Hamiltonian or Lindblad diagonals for performance.

Interactions

AtomTwin.add_interaction!Function
add_interaction!(system,
                 atoms::Tuple{<:AbstractAtom,<:AbstractAtom},
                 transition::Pair,
                 V;
                 noise = nothing,
                 active = true)

Add a two-atom interaction term between specified single-atom transitions.

Arguments

  • system::System: system to which the interaction is added
  • atoms::Tuple{AbstractAtom,AbstractAtom}: pair of atoms involved
  • transition::Pair: pair (from => to) of level tuples, specifying the single-atom transitions (e.g. (g,e) => (g,e))
  • V: interaction strength (e.g. energy shift or coupling rate); may be a number, Parameter, or ParametricExpression

An InteractionNode is constructed and built against system.basis. The node is pushed to sys.nodes and the compiled Interaction field is returned.

AtomTwin.Dynamiq.InteractionType
Interaction(b, atoms::Pair, transition1, transition2, value)

Two-atom interaction coupling specified by transitions transition1 and transition2 on a pair of atoms.

The underlying Op encodes the interaction matrix elements in basis b, while _coeff enables a scalar time-dependent prefactor.