{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Ladder-Type Three-Level: Weak Pulse with Coupling — EIT" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Define the Problem" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "mb_solve_json = \"\"\"\n", "{\n", " \"atom\": {\n", " \"decays\": [\n", " { \"channels\": [[0,1]], \n", " \"rate\": 1.0\n", " },\n", " { \"channels\": [[1,2]], \n", " \"rate\": 1.0e-3\n", " }\n", " ],\n", " \"fields\": [\n", " {\n", " \"coupled_levels\": [[0, 1]],\n", " \"detuning\": 5.0,\n", " \"detuning_positive\": true,\n", " \"label\": \"probe\",\n", " \"rabi_freq\": 1.0e-3,\n", " \"rabi_freq_t_args\": \n", " {\n", " \"ampl\": 1.0,\n", " \"centre\": 0.0,\n", " \"fwhm\": 1.0\n", " },\n", " \"rabi_freq_t_func\": \"gaussian\"\n", " },\n", " {\n", " \"coupled_levels\": [[1, 2]],\n", " \"detuning\": 0.0,\n", " \"detuning_positive\": true,\n", " \"label\": \"coupling\",\n", " \"rabi_freq\": 5.0,\n", " \"rabi_freq_t_args\": \n", " {\n", " \"ampl\": 1.0,\n", " \"fwhm\": 0.2,\n", " \"on\": -1.0, \n", " \"off\": 9.0\n", " },\n", " \"rabi_freq_t_func\": \"ramp_onoff\"\n", " }\n", " ],\n", " \"num_states\": 3\n", " },\n", " \"t_min\": -2.0,\n", " \"t_max\": 10.0,\n", " \"t_steps\": 60,\n", " \"z_min\": -0.2,\n", " \"z_max\": 1.2,\n", " \"z_steps\": 100,\n", " \"z_steps_inner\": 2,\n", " \"interaction_strengths\": [100.0, 100.0],\n", " \"savefile\": \"mbs-ladder-weak-pulse-coupling-decay\" \n", "}\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from maxwellbloch import mb_solve\n", "\n", "mb_solve_00 = mb_solve.MBSolve().from_json_str(mb_solve_json)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Solve the Problem" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%time Omegas_zt, states_zt = mb_solve_00.mbsolve(recalc=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plot Output" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "\n", "%matplotlib inline\n", "import seaborn as sns\n", "\n", "sns.set_style(\"dark\")\n", "\n", "import numpy as np\n", "\n", "fig = plt.figure(1, figsize=(16, 12))\n", "\n", "# Probe\n", "ax = fig.add_subplot(211)\n", "cmap_range = np.linspace(0.0, 1.0e-3, 11)\n", "cf = ax.contourf(\n", " mb_solve_00.tlist,\n", " mb_solve_00.zlist,\n", " np.abs(mb_solve_00.Omegas_zt[0] / (2 * np.pi)),\n", " cmap_range,\n", " cmap=plt.cm.Blues,\n", ")\n", "ax.set_title(r\"Rabi Frequency ($\\Gamma / 2\\pi $)\")\n", "ax.set_ylabel(\"Distance ($L$)\")\n", "ax.text(\n", " 0.02,\n", " 0.95,\n", " \"Probe\",\n", " verticalalignment=\"top\",\n", " horizontalalignment=\"left\",\n", " transform=ax.transAxes,\n", " color=\"grey\",\n", " fontsize=16,\n", ")\n", "plt.colorbar(cf)\n", "\n", "# Coupling\n", "ax = fig.add_subplot(212)\n", "cmap_range = np.linspace(0.0, 8.0, 11)\n", "cf = ax.contourf(\n", " mb_solve_00.tlist,\n", " mb_solve_00.zlist,\n", " np.abs(mb_solve_00.Omegas_zt[1] / (2 * np.pi)),\n", " cmap_range,\n", " cmap=plt.cm.Greens,\n", ")\n", "ax.set_xlabel(r\"Time ($1/\\Gamma$)\")\n", "ax.set_ylabel(\"Distance ($L$)\")\n", "ax.text(\n", " 0.02,\n", " 0.95,\n", " \"Coupling\",\n", " verticalalignment=\"top\",\n", " horizontalalignment=\"left\",\n", " transform=ax.transAxes,\n", " color=\"grey\",\n", " fontsize=16,\n", ")\n", "plt.colorbar(cf)\n", "\n", "# Both\n", "for ax in fig.axes:\n", " for y in [0.0, 1.0]:\n", " ax.axhline(y, c=\"grey\", lw=1.0, ls=\"dotted\")\n", "plt.tight_layout();" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }