Skip to main content

Velocity Classes for Modelling Doppler Broadening in Thermal Systems

Author

Thomas Ogden

So far the models we have considered are appropriate for ultracold systems with close-to-stationary atoms. For thermal atoms we might want to consider the averaging effect of motion in the line of propagation.

An atom moving with a velocity component \(v\) in the \(z\)-direction will interact with a Doppler-shifted field frequency \(\omega - kv\). This shift is effected over a 1D Maxwell-Boltzmann probability distribution function of velocity

\[ f(v) = \frac{1}{u\sqrt{\pi}} \mathrm{e}^{-(kv/u)^2} \]

where the thermal width \(u = kv_w\), \(k\) is the wavenumber of the monochromatic field and \(v_w = 2k_b T/ M\) is the most probable speed of the Maxwell-Boltzmann distribution for a temperature \(T\) and atomic mass \(m\).

In clerq we model this by solving the system over a range of velocity_classes, each detuning the system from resonance. The results are convoluted over the Maxwell-Boltzmann distribution. The thermal width is provided in thermal_width in the same \(2\pi~\Gamma\) units as the decays and rabi_freqs. To get it from a temperature, an atomic mass and a wavelength, see Doppler broadening in Converting from Experimental Units, which gives macro.thermal_width. We provide velocity classes from thermal_delta_min to thermal_delta_max, again in units of \(2\pi~\Gamma\), and set "thermal_delta_spacing": "auto" to space them evenly in detuning.

Sampling the detuning at a spacing \(h\) makes the summed response repeat at a time \(1/h\). Every coherence whose frequency depends on the Doppler detuning, with a slope \(b\), has a spurious echo at \(1/(bh)\), which is harmless only if it falls outside the time window or is damped away by decay first. "auto" uses the largest spacing for which this holds for every pair of levels. It reads each level’s Doppler shift from the fields’ factor_doppler_shift and the damping from the decay rates, so it depends on the system as well as the time window; the rule is in thermal_delta_auto_spacing. How far the echo must be damped is set by thermal_delta_echo_tolerance (default \(10^{-6}\)). The spacing is also kept fine enough to resolve the Gaussian of width thermal_width. (thermal_delta_spacing is new in clerq 0.15.0.) We can also give the number of classes or the spacing ourselves; see Specifying the Number of Classes.

The number of classes is the range divided by the spacing, plus one, and each one is a master-equation solve at every \(z\)-step, so it grows with a wide range or a long time window; more than 1000 classes raises a warning, usually a sign that the spacing was given in angular rather than cyclic units.

import numpy as np
import plotly.graph_objects as go

from clerq import plot
mb_solve_json = """
{
  "system": {
    "decays": [
      {
        "channels": [[0, 1]],
        "rate": 1.0
      }
    ],
    "fields": [
      {
        "coupled_levels": [[0, 1]],
        "rabi_freq": 1.0e-3,
        "rabi_freq_t_args": {
          "ampl": 1.0,
          "centre": 0.0,
          "fwhm": 1.0
        },
        "rabi_freq_t_func": "gaussian"
      }
    ],
    "num_states": 2
  },
  "t_min": -2.0,
  "t_max": 10.0,
  "t_steps": 1000,
  "z_min": -0.2,
  "z_max": 1.2,
  "z_steps": 50,
  "interaction_strengths": [
    0.5
  ],
  "velocity_classes": {
    "thermal_delta_min": -1.5,
    "thermal_delta_max": 1.5,
    "thermal_delta_spacing": "auto",
    "thermal_width": 0.3
  },
  "savefile": "velocity-classes"
}
"""
from clerq import PropagationSolver, utility

mbs = PropagationSolver().from_json_str(mb_solve_json)

We can check the set of velocity classes we’ve defined:

mbs.thermal_delta_list / (2 * np.pi)
array([-1.5       , -1.28571429, -1.07142857, -0.85714286, -0.64285714,
       -0.42857143, -0.21428571,  0.        ,  0.21428571,  0.42857143,
        0.64285714,  0.85714286,  1.07142857,  1.28571429,  1.5       ])

The weights of the Maxwell-Boltzmann distribution at these deltas is given by:

mbs.thermal_weights
array([4.15682645e-12, 3.15708677e-09, 8.64278099e-07, 8.52830775e-05,
       3.03329455e-03, 3.88873789e-02, 1.79698778e-01, 2.99311870e-01,
       1.79698778e-01, 3.88873789e-02, 3.03329455e-03, 8.52830775e-05,
       8.64278099e-07, 3.15708677e-09, 4.15682645e-12])

And so we can plot the numerical approximation to the Gaussian Maxwell-Boltzmann distribution:

maxboltz = utility.maxwell_boltzmann(
    mbs.thermal_delta_list, 2 * np.pi * mbs.velocity_classes["thermal_width"]
)
fig = go.Figure(go.Scatter(x=mbs.thermal_delta_list, y=maxboltz, mode="lines+markers"))
fig.update_layout(
    xaxis_title="Thermal detuning (Γ)",
    yaxis_title="Weight",
    width=700,
    height=350,
)
fig.show(renderer="notebook_connected")

It is useful to look at what the numerical integration looks like for these velocity classes. If it is close to 1, the thermal distribution should be well covered.

np.trapezoid(mbs.thermal_weights, mbs.thermal_delta_list)
np.float64(1.0000000079349944)

Now we can solve as before. Now at each \(z\)-step, the system will be solved once for each velocity class, and so the time taken to solve scales linearly.

Omegas_zt, states_zt = mbs.solve(recalc=False)
Saving PropagationSolver to velocity-classes.qu

Results in the Time Domain

fig = plot.field_spacetime(mbs, show_z_bounds=(0.0, 1.0))
fig.show(renderer='notebook_connected')

Results in the Frequency Domain

For a two-level system in the linear regime, this convolution of a Lorentzian function with a Gaussian can be determined analytically and is known as a Voigt profile. It is provided in clerq as spectral.voigt_two_linear_known(freq_list, decay_rate, thermal_width) so we can compare the simulation solution with the known analytic result. The function returns the profile for unit interaction strength, so we multiply by the interaction strength of our medium.

The absorption is measured from the spectrum of the transmitted pulse, so it is only well determined where the probe has spectral weight. The probe here is a Gaussian pulse of FWHM 1 µs, whose spectrum is nearly empty beyond \(|f| \approx 1.5\,\Gamma\), so the small steps in the curves near \(\pm 2\,\Gamma\) and the larger residual there come from the probe, not from the velocity classes: a four times finer grid gives the same curves. A shorter pulse widens the range that is well determined.

from clerq import spectral, utility
interaction_strength = mbs.interaction_strengths[0]
decay_rate = mbs.system.decays[0]["rate"]
freq_list = spectral.freq_list(mbs)
absorption_linear_known = spectral.absorption_two_linear_known(
    freq_list, interaction_strength, decay_rate
)
dispersion_linear_known = spectral.dispersion_two_linear_known(
    freq_list, interaction_strength, decay_rate
)

absorption = spectral.absorption(mbs, 0, -1)

# voigt_two_linear_known returns the profile for unit interaction strength;
# the linear-regime absorption is proportional to the interaction strength.
voigt = interaction_strength * spectral.voigt_two_linear_known(
    freq_list, decay_rate, mbs.velocity_classes["thermal_width"]
).imag

fig = go.Figure()
fig.add_scatter(x=freq_list, y=absorption, name="Absorption", line=dict(width=4))
fig.add_scatter(
    x=freq_list, y=spectral.dispersion(mbs, 0, -1), name="Dispersion", line=dict(width=4)
)
fig.add_scatter(
    x=freq_list,
    y=absorption_linear_known,
    name="Absorption, No Thermal",
    line=dict(width=2, dash="dot", color="#4477AA"),
)
fig.add_scatter(
    x=freq_list,
    y=dispersion_linear_known,
    name="Dispersion, No Thermal",
    line=dict(width=2, dash="dot", color="#EE6677"),
)
fig.add_scatter(
    x=freq_list,
    y=voigt,
    name="Known Absorption, Voigt Profile",
    line=dict(width=2, dash="dash", color="#CCBB44"),
)

# Widths
hm, r1, r2 = utility.half_max_roots(freq_list, absorption)
fig.add_shape(type="line", x0=r1, x1=r2, y0=hm, y1=hm, line=dict(dash="dot", color="#4477AA"))
fig.add_annotation(
    x=r2, y=hm, text=f"FWHM: {r2 - r1:.2f}", showarrow=False, xanchor="left", yanchor="bottom"
)

fig.update_xaxes(range=[-3.0, 3.0], title="Frequency (Γ)")
fig.update_yaxes(range=[-1.0, 1.0])
fig.update_layout(width=900, height=450)
fig.show(renderer="notebook_connected")
# Plot residuals
fig = go.Figure(go.Scatter(x=freq_list, y=absorption - voigt, name="Absorption"))
fig.update_xaxes(range=[-3.0, 3.0], title="Frequency (Γ)")
shown = np.abs(freq_list) <= 3.0
limit = 1.2 * np.max(np.abs(absorption - voigt)[shown])
fig.update_yaxes(range=[-limit, limit], title="Residual")
fig.update_layout(width=900, height=250)
fig.show(renderer="notebook_connected")

Specifying the Number of Classes

To choose the number of classes ourselves, give thermal_delta_steps instead of thermal_delta_spacing. The classes are evenly spaced from thermal_delta_min to thermal_delta_max, and there are thermal_delta_steps + 1 of them. Giving a number for thermal_delta_spacing sets the largest spacing instead. The two cannot be combined with each other. It is then up to us to check that the spacing is small enough for the echo to fall outside the time window.

vc = {
    "thermal_delta_min": -1.5,
    "thermal_delta_max": 1.5,
    "thermal_delta_steps": 48,
    "thermal_width": 0.3,
}
mbs.build_velocity_classes(velocity_classes=vc)
print(f"{len(mbs.thermal_delta_list)} velocity classes")
print(f"Spacing: {np.diff(mbs.thermal_delta_list)[0] / (2 * np.pi):.4f}")
49 velocity classes
Spacing: 0.0625

Adding Inner Steps

If the thermal width is much larger than the decay rate, you may wish to add a narrower band around the resonance frequency to sample the Lorentzian sufficiently while covering the Maxwell-Boltzmann distribution efficiently. This can be done by providing an inner range defined by thermal_delta_inner_min, thermal_delta_inner_max and thermal_delta_inner_steps. Any duplicated velocity classes (in the constructed thermal_delta_list) will only be counted once. The classes are averaged with thermal_quadrature_weights, the Maxwell-Boltzmann density (thermal_weights) times the detuning interval each class represents (thermal_widths), so the denser inner band is not over-weighted. The coarse outer spacing must still satisfy the echo condition above wherever the response is not damped, so check convergence before relying on a band like this; "auto" needs no such check. Below is an example.

vc = {
    "thermal_delta_min": -12.0,
    "thermal_delta_max": 12.0,
    "thermal_delta_steps": 6,
    "thermal_delta_inner_min": -2.0,
    "thermal_delta_inner_max": 2.0,
    "thermal_delta_inner_steps": 8,
    "thermal_width": 3.0,
}

So the thermal delta range is \([-12, -8, -4, 0, 4, 8, 12]\) and the inner range is \([-2, -1.5, \dots, 1.5, 2]\). These are combined to form:

mbs.build_velocity_classes(velocity_classes=vc)
print(mbs.thermal_delta_list / (2 * np.pi))
[-12.   -8.   -4.   -2.   -1.5  -1.   -0.5   0.    0.5   1.    1.5   2.
   4.    8.   12. ]
maxboltz = utility.maxwell_boltzmann(
    mbs.thermal_delta_list, 2 * np.pi * mbs.velocity_classes["thermal_width"]
)
fig = go.Figure(go.Scatter(x=mbs.thermal_delta_list, y=maxboltz, mode="lines+markers"))
fig.update_layout(
    xaxis_title="Thermal detuning (Γ)",
    yaxis_title="Weight",
    width=700,
    height=350,
)
fig.show(renderer="notebook_connected")