import numpy as npHyperfine Structure: Weak Pulse, q=1, Decay — Optical Pumping
\(^{87}\mathrm{Rb}\) driven on the \(5S_{1/2} F=1 \rightarrow 5p_{1/2} F=1\) transition
Define the Hyperfine Structure
from clerq import hyperfine
Rb87_5s12_F1 = hyperfine.LevelF(I=1.5, J=0.5, F=1)
Rb87_5s12_F2 = hyperfine.LevelF(I=1.5, J=0.5, F=2) # Needed for decay
Rb87_5p12_F1 = hyperfine.LevelF(I=1.5, J=0.5, F=1)
atom1e = hyperfine.Atom1e(element="Rb", isotope="87")
atom1e.add_F_level(Rb87_5s12_F1)
atom1e.add_F_level(Rb87_5s12_F2)
atom1e.add_F_level(Rb87_5p12_F1)NUM_STATES = atom1e.get_num_mF_levels()
print(NUM_STATES)11
ENERGIES = atom1e.get_energies()
print(ENERGIES)[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
# Tune to be on resonance with the F1 -> F1 transition
DETUNING = 0
print(DETUNING)0
FIELD_CHANNELS = atom1e.get_coupled_levels(F_level_idxs_a=(0,), F_level_idxs_b=(2,))
print(FIELD_CHANNELS)[[0, 8], [0, 9], [0, 10], [1, 8], [1, 9], [1, 10], [2, 8], [2, 9], [2, 10]]
q = 1 # Field polarisation
FIELD_FACTORS = atom1e.get_clebsch_hf_factors(
F_level_idxs_a=(0,), F_level_idxs_b=(2,), q=q
)
print(FIELD_FACTORS)
print(np.sum(FIELD_FACTORS**2))[ 0. 0. 0. 0.28867513 -0. -0.
0. 0.28867513 0. ]
0.16666666666666657
DECAY_CHANNELS = atom1e.get_coupled_levels(F_level_idxs_a=(0, 1), F_level_idxs_b=(2,))
print(DECAY_CHANNELS)[[0, 8], [0, 9], [0, 10], [1, 8], [1, 9], [1, 10], [2, 8], [2, 9], [2, 10], [3, 8], [3, 9], [3, 10], [4, 8], [4, 9], [4, 10], [5, 8], [5, 9], [5, 10], [6, 8], [6, 9], [6, 10], [7, 8], [7, 9], [7, 10]]
DECAY_FACTORS = atom1e.get_decay_factors(F_level_idxs_a=(0, 1), F_level_idxs_b=(2,))
print(DECAY_FACTORS)[ 0.28867513 -0.28867513 0. 0.28867513 -0. -0.28867513
0. 0.28867513 -0.28867513 0.70710678 0. 0.
0.5 0.5 -0. 0.28867513 0.57735027 0.28867513
-0. 0.5 0.5 0. 0. 0.70710678]
INITIAL_STATE = (
[0.5 / 3.0] * 3 # s12_F1
+ [0.5 / 5.0] * 5 # s12_F2
+ [0.0] * 3
) # p12_F1
print(INITIAL_STATE)[0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.1, 0.1, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0]
mb_solve_json = """
{{
"system": {{
"decays": [
{{
"channels": {decay_channels},
"rate": 1.0,
"factors": {decay_factors}
}}
],
"energies": {energies},
"fields": [
{{
"coupled_levels": {field_channels},
"factors": {field_factors},
"detuning": {detuning},
"detuning_positive": true,
"label": "probe",
"rabi_freq": 1e-3,
"rabi_freq_t_args": {{
"ampl": 1.0,
"centre": 0.0,
"fwhm": 1.0
}},
"rabi_freq_t_func": "gaussian"
}}
],
"num_states": {num_states},
"initial_state": {initial_state}
}},
"t_min": -2.0,
"t_max": 10.0,
"t_steps": 100,
"z_min": -0.2,
"z_max": 1.2,
"z_steps": 100,
"interaction_strengths": [
14
],
"savefile": "mbs-Rb87_5s12_5p12_F11_q1-weak-pulse-decay"
}}
""".format(
num_states=NUM_STATES,
energies=ENERGIES,
initial_state=INITIAL_STATE,
detuning=DETUNING,
field_channels=FIELD_CHANNELS,
field_factors=FIELD_FACTORS.tolist(),
decay_channels=DECAY_CHANNELS,
decay_factors=DECAY_FACTORS.tolist(),
)from clerq import PropagationSolver
mbs = PropagationSolver().from_json_str(mb_solve_json)Omegas_zt, states_zt = mbs.solve(recalc=False)Saving PropagationSolver to mbs-Rb87_5s12_5p12_F11_q1-weak-pulse-decay.qu
from clerq import plot
fig = plot.field_spacetime(mbs, 0, plot_type="contour", show_z_bounds=(0, 1))
fig.show(renderer='notebook_connected')fig = plot.population_spacetime(mbs, 0, colorscale="Reds", plot_type="contour", show_z_bounds=(0, 1))
fig.show(renderer='notebook_connected')import plotly.graph_objects as go
fig = go.Figure(
go.Contour(
z=np.imag(mbs.coherences_field(0)), x=mbs.tlist, y=mbs.zlist,
colorscale="Greens", colorbar=dict(title="Im ρ"),
line_width=0, line_smoothing=0.85,
),
layout=go.Layout(
title="Coherence Im ρ(z, t)", xaxis_title="t (γ⁻¹)", yaxis_title="z",
width=700, height=400, template="clerq",
),
)
for z in (0, 1):
fig.add_hline(y=z, line=dict(color="grey", dash="dot", width=1))
fig.show(renderer='notebook_connected')