Two-Level: Weak Pulse¶
Define and Solve¶
[1]:
mb_solve_json = """
{
"atom": {
"fields": [
{
"coupled_levels": [[0, 1]],
"detuning": 0.0,
"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": 100,
"z_min": -0.2,
"z_max": 1.2,
"z_steps": 20,
"z_steps_inner": 2,
"interaction_strengths": [
1.0
]
}
"""
[2]:
from maxwellbloch import mb_solve
mb_solve_00 = mb_solve.MBSolve().from_json_str(mb_solve_json)
[3]:
Omegas_zt, states_zt = mb_solve_00.mbsolve()
10.0%. Run time: 0.23s. Est. time left: 00:00:00:02
20.0%. Run time: 0.68s. Est. time left: 00:00:00:02
30.0%. Run time: 1.17s. Est. time left: 00:00:00:02
40.0%. Run time: 1.69s. Est. time left: 00:00:00:02
50.0%. Run time: 2.29s. Est. time left: 00:00:00:02
60.0%. Run time: 2.91s. Est. time left: 00:00:00:01
70.0%. Run time: 3.53s. Est. time left: 00:00:00:01
80.0%. Run time: 4.16s. Est. time left: 00:00:00:01
90.0%. Run time: 4.82s. Est. time left: 00:00:00:00
Total run time: 5.50s
Field Output¶
[4]:
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
import numpy as np
sns.set_style('darkgrid')
fig = plt.figure(1, figsize=(16, 6))
ax = fig.add_subplot(111)
cmap_range = np.linspace(0.0, 1.0e-3, 11)
cf = ax.contourf(mb_solve_00.tlist, mb_solve_00.zlist,
np.abs(mb_solve_00.Omegas_zt[0]/(2*np.pi)),
cmap_range, cmap=plt.cm.Blues)
ax.set_title('Rabi Frequency ($\Gamma / 2\pi $)')
ax.set_xlabel('Time ($1/\Gamma$)')
ax.set_ylabel('Distance ($L$)')
for y in [0.0, 1.0]:
ax.axhline(y, c='grey', lw=1.0, ls='dotted')
plt.colorbar(cf);