Created
October 24, 2019 17:55
-
-
Save TejasAvinashShetty/bdeb362c0d30429a4b6cda2a0dad96ac to your computer and use it in GitHub Desktop.
modify simple state transfer notebook for Gate optimization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Optimization of a State-to-State Transfer in a Two-Level-System" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 42, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.073705Z", | |
"start_time": "2019-10-21T16:05:33.068747Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "1" | |
} | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The watermark extension is already loaded. To reload it, use:\n", | |
" %reload_ext watermark\n", | |
"qutip 4.4.1\n", | |
"matplotlib 3.1.1\n", | |
"scipy 1.3.1\n", | |
"numpy 1.17.2\n", | |
"matplotlib.pylab 1.17.2\n", | |
"krotov 0.3.0\n", | |
"CPython 3.7.4\n", | |
"IPython 7.8.0\n" | |
] | |
} | |
], | |
"source": [ | |
"# NBVAL_IGNORE_OUTPUT\n", | |
"%load_ext watermark\n", | |
"import qutip\n", | |
"import numpy as np\n", | |
"import scipy\n", | |
"import matplotlib\n", | |
"import matplotlib.pylab as plt\n", | |
"import krotov\n", | |
"%watermark -v --iversions" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"$\\newcommand{tr}[0]{\\operatorname{tr}}\n", | |
"\\newcommand{diag}[0]{\\operatorname{diag}}\n", | |
"\\newcommand{abs}[0]{\\operatorname{abs}}\n", | |
"\\newcommand{pop}[0]{\\operatorname{pop}}\n", | |
"\\newcommand{aux}[0]{\\text{aux}}\n", | |
"\\newcommand{opt}[0]{\\text{opt}}\n", | |
"\\newcommand{tgt}[0]{\\text{tgt}}\n", | |
"\\newcommand{init}[0]{\\text{init}}\n", | |
"\\newcommand{lab}[0]{\\text{lab}}\n", | |
"\\newcommand{rwa}[0]{\\text{rwa}}\n", | |
"\\newcommand{bra}[1]{\\langle#1\\vert}\n", | |
"\\newcommand{ket}[1]{\\vert#1\\rangle}\n", | |
"\\newcommand{Bra}[1]{\\left\\langle#1\\right\\vert}\n", | |
"\\newcommand{Ket}[1]{\\left\\vert#1\\right\\rangle}\n", | |
"\\newcommand{Braket}[2]{\\left\\langle #1\\vphantom{#2} \\mid\n", | |
"#2\\vphantom{#1}\\right\\rangle}\n", | |
"\\newcommand{op}[1]{\\hat{#1}}\n", | |
"\\newcommand{Op}[1]{\\hat{#1}}\n", | |
"\\newcommand{dd}[0]{\\,\\text{d}}\n", | |
"\\newcommand{Liouville}[0]{\\mathcal{L}}\n", | |
"\\newcommand{DynMap}[0]{\\mathcal{E}}\n", | |
"\\newcommand{identity}[0]{\\mathbf{1}}\n", | |
"\\newcommand{Norm}[1]{\\lVert#1\\rVert}\n", | |
"\\newcommand{Abs}[1]{\\left\\vert#1\\right\\vert}\n", | |
"\\newcommand{avg}[1]{\\langle#1\\rangle}\n", | |
"\\newcommand{Avg}[1]{\\left\\langle#1\\right\\rangle}\n", | |
"\\newcommand{AbsSq}[1]{\\left\\vert#1\\right\\vert^2}\n", | |
"\\newcommand{Re}[0]{\\operatorname{Re}}\n", | |
"\\newcommand{Im}[0]{\\operatorname{Im}}$\n", | |
"\n", | |
"This first example illustrates the basic use of the `krotov` package by solving\n", | |
"a simple canonical optimization problem: the transfer of population in a two\n", | |
"level system." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Two-level-Hamiltonian" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We consider the Hamiltonian $\\op{H}_{0} = - \\frac{\\omega}{2} \\op{\\sigma}_{z}$, representing\n", | |
"a simple qubit with energy level splitting $\\omega$ in the basis\n", | |
"$\\{\\ket{0},\\ket{1}\\}$. The control field $\\epsilon(t)$ is assumed to couple via\n", | |
"the Hamiltonian $\\op{H}_{1}(t) = \\epsilon(t) \\op{\\sigma}_{x}$ to the qubit,\n", | |
"i.e., the control field effectively drives transitions between both qubit\n", | |
"states." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 43, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.216759Z", | |
"start_time": "2019-10-21T16:05:33.074989Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"def hamiltonian(omega=1.0, ampl0=0.2):\n", | |
" \"\"\"Two-level-system Hamiltonian\n", | |
"\n", | |
" Args:\n", | |
" omega (float): energy separation of the qubit levels\n", | |
" ampl0 (float): constant amplitude of the driving field\n", | |
" \"\"\"\n", | |
" H0 = -0.5 * omega * qutip.operators.sigmaz()\n", | |
" H1 = qutip.operators.sigmax()\n", | |
"\n", | |
" def guess_control(t, args):\n", | |
" return ampl0 * krotov.shapes.flattop(\n", | |
" t, t_start=0, t_stop=5, t_rise=0.3, func=\"sinsq\"\n", | |
" )\n", | |
"\n", | |
" return [H0, [H1, guess_control]]\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 44, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.335745Z", | |
"start_time": "2019-10-21T16:05:33.222461Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"H = hamiltonian()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The control field here switches on from zero at $t=0$ to it's maximum amplitude\n", | |
"0.2 within the time period 0.3 (the switch-on shape is half the first period of\n", | |
"a $\\sin^2$ function). It switches off again in the time period 0.3 before the\n", | |
"final time $T=5$). We use a time grid with 500 time steps between 0 and $T$:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 45, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.423025Z", | |
"start_time": "2019-10-21T16:05:33.341994Z" | |
}, | |
"lines_to_next_cell": 2 | |
}, | |
"outputs": [], | |
"source": [ | |
"tlist = np.linspace(0, 5, 500)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 46, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.497819Z", | |
"start_time": "2019-10-21T16:05:33.424352Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "10" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"def plot_pulse(pulse, tlist):\n", | |
" fig, ax = plt.subplots()\n", | |
" if callable(pulse):\n", | |
" pulse = np.array([pulse(t, args=None) for t in tlist])\n", | |
" ax.plot(tlist, pulse)\n", | |
" ax.set_xlabel('time')\n", | |
" ax.set_ylabel('pulse amplitude')\n", | |
" plt.show(fig)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 47, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.722409Z", | |
"start_time": "2019-10-21T16:05:33.498933Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "11" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEGCAYAAABy53LJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de5SddX3v8fdn7pNkdq6TSHMhUVIVgYIMwdZKTxFs8FhCT8GCF7ALSy/Seo7LtthjsaV6Vj1dR7tsqUesKHgpItZjWmNTWsEuLGKGi0CgKcN9CCaBCZnJZe7f88d+9mQzzGT2nuxnP3vPfF5r7ZW9n+v3YfT5Pr/L8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"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plot_pulse(H[1][1], tlist)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Optimization target" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The `krotov` package requires the goal of the optimization to be described by a\n", | |
"list of `Objective` instances. In this example, there is only a single\n", | |
"objective: the state-to-state transfer from initial state $\\ket{\\Psi_{\\init}} =\n", | |
"\\ket{0}$ to the target state $\\ket{\\Psi_{\\tgt}} = \\ket{1}$, under the dynamics\n", | |
"of the Hamiltonian $\\op{H}(t)$:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.758953Z", | |
"start_time": "2019-10-21T16:05:33.723765Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[Objective[|(2)⟩ - {[Herm[2,2], [Herm[2,2], u2(t)]]} - |(2)⟩],\n", | |
" Objective[|(2)⟩ - {[Herm[2,2], [Herm[2,2], u2(t)]]} - |(2)⟩]]" | |
] | |
}, | |
"execution_count": 48, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"objectives = krotov.gate_objectives(\n", | |
" basis_states=[qutip.ket('0'), qutip.ket('1')],\n", | |
" gate=qutip.operators.sigmay(),\n", | |
" H=H)\n", | |
"objectives" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"In addition, we would like to maintain the property of the control field to be\n", | |
"zero at $t=0$ and $t=T$, with a smooth switch-on and switch-off. We can define\n", | |
"an \"update shape\" $S(t) \\in [0, 1]$ for this purpose: Krotov's method will\n", | |
"update the field at each point in time proportionally to $S(t)$; wherever\n", | |
"$S(t)$ is zero, the optimization will not change the value of the control from\n", | |
"the original guess." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 49, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.831300Z", | |
"start_time": "2019-10-21T16:05:33.760402Z" | |
}, | |
"lines_to_next_cell": 2 | |
}, | |
"outputs": [], | |
"source": [ | |
"def S(t):\n", | |
" \"\"\"Shape function for the field update\"\"\"\n", | |
" return krotov.shapes.flattop(\n", | |
" t, t_start=0, t_stop=5, t_rise=0.3, t_fall=0.3, func='sinsq'\n", | |
" )" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Beyond the shape, Krotov's method uses a parameter $\\lambda_a$ for each control\n", | |
"field that determines the overall magnitude of the respective field in each\n", | |
"iteration (the smaller $\\lambda_a$, the larger the update; specifically, the\n", | |
"update is proportional to $\\frac{S(t)}{\\lambda_a}$). Both the update-shape\n", | |
"$S(t)$ and the $\\lambda_a$ parameter must be passed to the optimization routine\n", | |
"as \"pulse options\":" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 50, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.906866Z", | |
"start_time": "2019-10-21T16:05:33.832550Z" | |
}, | |
"lines_to_next_cell": 0 | |
}, | |
"outputs": [], | |
"source": [ | |
"pulse_options = {\n", | |
" H[1][1]: dict(lambda_a=5, shape=S)\n", | |
"}" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Simulate dynamics under the guess field" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Before running the optimization procedure, we first simulate the dynamics under the\n", | |
"guess field $\\epsilon_{0}(t)$. The following solves equation of motion for the\n", | |
"defined objective, which contains the initial state $\\ket{\\Psi_{\\init}}$ and\n", | |
"the Hamiltonian $\\op{H}(t)$ defining its evolution. This delegates to QuTiP's\n", | |
"usual `mesolve` function." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We use the projectors $\\op{P}_0 = \\ket{0}\\bra{0}$ and $\\op{P}_1 = \\ket{1}\\bra{1}$ for calculating the population:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:33.983684Z", | |
"start_time": "2019-10-21T16:05:33.908843Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"proj0 = qutip.ket2dm(qutip.ket(\"0\"))\n", | |
"proj1 = qutip.ket2dm(qutip.ket(\"1\"))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 52, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:34.123913Z", | |
"start_time": "2019-10-21T16:05:33.985806Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "12" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"guess_dynamics = objectives[0].mesolve(tlist, e_ops=[proj0, proj1])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The plot of the population dynamics shows that the guess field does not transfer\n", | |
"the initial state $\\ket{\\Psi_{\\init}} = \\ket{0}$ to the desired target state\n", | |
"$\\ket{\\Psi_{\\tgt}} = \\ket{1}$ (so the optimization will have something to do)." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 53, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:34.324997Z", | |
"start_time": "2019-10-21T16:05:34.124899Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "13" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"def plot_population(result):\n", | |
" fig, ax = plt.subplots()\n", | |
" ax.plot(result.times, result.expect[0], label='0')\n", | |
" ax.plot(result.times, result.expect[1], label='1')\n", | |
" ax.legend()\n", | |
" ax.set_xlabel('time')\n", | |
" ax.set_ylabel('population')\n", | |
" plt.show(fig)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 54, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:34.559859Z", | |
"start_time": "2019-10-21T16:05:34.329672Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "14" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXAc533m8e8P5wAgboAXDoKUaOqgKJEEKTmuOE42dmTGlly7SSzllCVHqV0rcTbHllKbdSKntsqbbLLJxnLWSuLNWllL5cRJzMiKHNVGymUdBA9JJCVKNEkQ4In7Pge//eNtHARBYEhiMAT6+VR19fR0z8w7JOZ9ut9++21zd0REJL6yMl0AERHJLAWBiEjMKQhERGJOQSAiEnMKAhGRmMvJdAGuVlVVlTc0NGS6GCIiy8r+/fvb3b16rnXLLggaGhpoamrKdDFERJYVM2u+0jo1DYmIxJyCQEQk5hQEIiIxpyAQEYk5BYGISMylLQjM7CtmdtHMDl9hvZnZ/zSz42b2ppntSFdZRETkytJ5RPBnwL3zrP8osDmaHgX+KI1lERGRK0jbdQTu/k9m1jDPJvcDX/UwDvarZlZmZuvc/Vw6yrPvVCf//G4bmJFlYIR5VpYBkGWGGVPrwuNL5zlZWRTmZVOQl01RXg4FedkURo8L87MpLcglN1utbSKyvGTygrIaoGXGcmv03GVBYGaPEo4aqK+vv6YPO9DcxR++dJx0336hOD+HsqJcygvzKC0I8/LCXKqL81lTkmBNSYK1pQnWFCcoKcjBzNJbIBGRBWQyCOaqAeespt39KeApgMbGxmuqyn/u+27i577vpsn3Y8Kn5xNROky449GyAz4x/XjCnfGkMzg6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nM1QWSSNonbybwD/193/KtPlWUru3g28DNyb4aKk0weA+6I282eBHzCzP89skdLP3c9G84vAXxOauxdNXIJgH7DZzDaaWR7h3sh7M1wmWWTRidM/Bd5299/LdHmWgplVm1lZ9LgA+EHgncyWKn3c/dfcvdbdGwi/439w95/McLHSysyKos4PmFkR8BFgUXsDxiII3H0ceAz4NuEE4tfd/UhmS5VeZvYM8AqwxcxazeyRTJdpCXwA+CnCXuKhaNqT6UKl2TrgJTN7k7DD86K7x6JLZYysAf7FzN4AXge+5e4vLOYHxKL7qIiIXFksjghEROTKFAQiIjGnIBARiTkFgYhIzCkIRERiTkEgMg8zKzOz/xA9Xm9mf5npMoksNnUfFZlHNGbRc3EZwVXiKSfTBRC5wX0BuCka1O094FZ332pmDwGfALKBrcDvAnmEC9pGgD3u3mlmNwFPAtXAIPCz7r5ir/yV5UlNQyLzexz4bjSo26/OWrcV+HHCuC//FRh09+2EK7p/OtrmKeDn3X0n8CvAl5ak1CJXQUcEItfupei+B31m1gP8bfT8W8C2aBTU7wH+IgyDBED+0hdTZH4KApFrNzLj8cSM5QnCbysL6I6OJkRuWGoaEplfH1B8LS+M7oVw0sx+FMLoqGZ252IWTmQxKAhE5uHuHcC/mtlh4Heu4S1+AngkGjnyCCv8FqmyPKn7qIhIzOmIQEQk5hQEIiIxpyAQEYk5BYGISMwpCEREYk5BICIScwoCEZGY+/+H9W++K6o0fQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plot_population(guess_dynamics)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Optimize" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"In the following we optimize the guess field $\\epsilon_{0}(t)$ such\n", | |
"that the intended state-to-state transfer $\\ket{\\Psi_{\\init}} \\rightarrow\n", | |
"\\ket{\\Psi_{\\tgt}}$ is solved, via the `krotov` package's central\n", | |
"`optimize_pulses` routine. It requires, besides the previously defined\n", | |
"`objectives`, information about the optimization functional $J_T$ (implicitly,\n", | |
"via `chi_constructor`, which calculates the states $\\ket{\\chi} =\n", | |
"\\frac{J_T}{\\bra{\\Psi}}$).\n", | |
"\n", | |
"Here, we choose $J_T = J_{T,\\text{re}} = 1 - F_{\\text{re}}$ with $F_{\\text{re}}\n", | |
"= \\Re\\Braket{\\Psi(T)}{\\Psi_{\\tgt}}$, with $\\ket{\\Psi(T)}$ the forward\n", | |
"propagated state of $\\ket{\\Psi_{\\init}}$. Even though $J_T$ is not explicitly\n", | |
"required for the optimization, it is nonetheless useful to be able to calculate\n", | |
"and print it as a way to provide some feedback about the optimization progress.\n", | |
"Here, we pass as an `info_hook` the function `krotov.info_hooks.print_table`,\n", | |
"using `krotov.functionals.J_T_re` (which implements the above functional; the\n", | |
"`krotov` library contains implementations of all the \"standard\" functionals used in\n", | |
"quantum control). This `info_hook` prints a tabular overview after each\n", | |
"iteration, containing the value of $J_T$, the magnitude of the integrated pulse\n", | |
"update, and information on how much $J_T$ (and the full Krotov functional $J$)\n", | |
"changes between iterations. It also stores the value of $J_T$ internally in the\n", | |
"`Result.info_vals` attribute.\n", | |
"\n", | |
"The value of $J_T$ can also be used to check the convergence. In this example,\n", | |
"we limit the number of total iterations to 10, but more generally, we could use\n", | |
"the `check_convergence` parameter to stop the optimization when $J_T$ falls below\n", | |
"some threshold. Here, we only pass a function that checks that the value of\n", | |
"$J_T$ is monotonically decreasing. The\n", | |
"`krotov.convergence.check_monotonic_error` relies on\n", | |
"`krotov.info_hooks.print_table` internally having stored the value of $J_T$ to\n", | |
"the `Result.info_vals` in each iteration." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 55, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:39.516811Z", | |
"start_time": "2019-10-21T16:05:34.560837Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "15" | |
}, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" iter. J_T ∫gₐ(t)dt J ΔJ_T ΔJ secs\n", | |
" 0 1.00e+00 0.00e+00 1.00e+00 n/a n/a 0\n", | |
" 1 1.00e+00 4.23e-31 1.00e+00 0.00e+00 4.23e-31 2 *\n", | |
" 2 1.00e+00 4.19e-31 1.00e+00 2.22e-16 2.22e-16 1 **\n" | |
] | |
} | |
], | |
"source": [ | |
"oct_result = krotov.optimize_pulses(\n", | |
" objectives,\n", | |
" pulse_options=pulse_options,\n", | |
" tlist=tlist,\n", | |
" propagator=krotov.propagators.expm,\n", | |
" chi_constructor=krotov.functionals.chis_re,\n", | |
" info_hook=krotov.info_hooks.print_table(J_T=krotov.functionals.J_T_re),\n", | |
" check_convergence=krotov.convergence.check_monotonic_error,\n", | |
" iter_stop=1000,\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 56, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:39.520961Z", | |
"start_time": "2019-10-21T16:05:39.518433Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "16" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"Krotov Optimization Result\n", | |
"--------------------------\n", | |
"- Started at 2019-10-21 21:35:34\n", | |
"- Number of objectives: 2\n", | |
"- Number of iterations: 2\n", | |
"- Reason for termination: Reached convergence: Loss of monotonic convergence; error decrease < 0\n", | |
"- Ended at 2019-10-21 21:35:39" | |
] | |
}, | |
"execution_count": 56, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"oct_result" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Simulate the dynamics under the optimized field" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Having obtained the optimized control field, we can now plot it and calculate\n", | |
"the population dynamics under this field." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 57, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:39.832786Z", | |
"start_time": "2019-10-21T16:05:39.521982Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "17" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEGCAYAAABy53LJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de5SddX3v8fdn7pNkdq6TSHMhUVIVgYIMwdZKTxFs8FhCT8GCF7ALSy/Seo7LtthjsaV6Vj1dR7tsqUesKHgpItZjWmNTWsEuLGKGi0CgKcN9CCaBCZnJZe7f88d+9mQzzGT2nuxnP3vPfF5r7ZW9n+v3YfT5Pr/L8/spIjAzMytVQ9YBmJlZfXHiMDOzsjhxmJlZWZw4zMysLE4cZmZWlqasA6iGFStWxPr167MOw8ysrtx7770vRETn5OXzInGsX7+e7u7urMMwM6srkp6earmrqszMrCxOHGZmVhYnDjMzK4sTh5mZlcWJw8zMypJq4pC0WdIuST2Srpli/YckPSLpQUn/KunEonVXSHos+VxRtPxMSQ8lx/yMJKV5DWZm9nKpJQ5JjcD1wAXAycBlkk6etNn9QFdEnAbcBvzvZN9lwMeAs4FNwMckLU32+SxwFbAx+WxO6xrMzOyV0nyPYxPQExFPAEi6BdgCPFLYICLuKNr+h8B7ku+/BNweEX3JvrcDmyXdCeQi4u5k+c3ARcB3U7yO49a7/zB/f99zjI6NZx2KmdWB174qx9tPfRW1WqGSZuJYDTxb9LuXfAliOldyNAFMte/q5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WwnXyj6a0RsTPbqNIl6e+Au4HXSuqVdGXWMaXszcB7yT+BPpB83p51UCk7AbhD0oPkH45uj4h50T11nlkF3CXpx8CPgO9ExD9V6uDujmtmZmVxicPMzMrixGFmZmVx4jAzs7I4cZiZWVmcOMzMrCxOHGYVJmmJpN9Jvv+UpNuyjsmsktwd16zCknGv/nE+jDBs81NT1gGYzUF/DrwmGUjwMeD1EXGKpPcBFwGNwCnA/wFayL+EOAS8PSL6JL0GuB7oBA4DvxERc/rtbqsvrqoyq7xrgMeTgQR/f9K6U4B3kR836BPA4Yg4g/wb+5cn29wA/G5EnAl8GPibqkRtViKXOMyq645k7o8BSQeAf0iWPwSclozU+3PAN/JDaQHQWv0wzabnxGFWXUNF38eLfo+T//9jA/BSUloxq0muqjKrvAGgYzY7JvOBPCnpEsiP4CvpZyoZnNnxcuIwq7CIeBH4gaSHgb+YxSHeDVyZjGy6kzk+ZbHVH3fHNTOzsrjEYWZmZXHiMDOzsjhxmJlZWZw4zMysLE4cZmZWFicOMzMrixOHmZmV5f8DnMCGo4PJATgAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plot_pulse(oct_result.optimized_controls[0], tlist)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"In contrast to the dynamics under the guess field, the optimized field indeed\n", | |
"drives the initial state $\\ket{\\Psi_{\\init}} = \\ket{0}$ to the desired target\n", | |
"state $\\ket{\\Psi_{\\tgt}} = \\ket{1}$." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 58, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:40.039082Z", | |
"start_time": "2019-10-21T16:05:39.834053Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "18" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"opt_dynamics = oct_result.optimized_objectives[0].mesolve(\n", | |
" tlist, e_ops=[proj0, proj1])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 59, | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2019-10-21T16:05:40.321806Z", | |
"start_time": "2019-10-21T16:05:40.040331Z" | |
}, | |
"attributes": { | |
"classes": [], | |
"id": "", | |
"n": "19" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXAc533m8e8P5wAgboAXDoKUaOqgKJEEKTmuOE42dmTGlly7SSzllCVHqV0rcTbHllKbdSKntsqbbLLJxnLWSuLNWllL5cRJzMiKHNVGymUdBA9JJCVKNEkQ4In7Pge//eNtHARBYEhiMAT6+VR19fR0z8w7JOZ9ut9++21zd0REJL6yMl0AERHJLAWBiEjMKQhERGJOQSAiEnMKAhGRmMvJdAGuVlVVlTc0NGS6GCIiy8r+/fvb3b16rnXLLggaGhpoamrKdDFERJYVM2u+0jo1DYmIxJyCQEQk5hQEIiIxpyAQEYk5BYGISMylLQjM7CtmdtHMDl9hvZnZ/zSz42b2ppntSFdZRETkytJ5RPBnwL3zrP8osDmaHgX+KI1lERGRK0jbdQTu/k9m1jDPJvcDX/UwDvarZlZmZuvc/Vw6yrPvVCf//G4bmJFlYIR5VpYBkGWGGVPrwuNL5zlZWRTmZVOQl01RXg4FedkURo8L87MpLcglN1utbSKyvGTygrIaoGXGcmv03GVBYGaPEo4aqK+vv6YPO9DcxR++dJx0336hOD+HsqJcygvzKC0I8/LCXKqL81lTkmBNSYK1pQnWFCcoKcjBzNJbIBGRB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pvp8qSbuyfd/S7CfcF3m9mKbQo0s48BF919f6bLssQ+4O47gI8Cn4mafhdNXIKgFaibsVwLnM1QWSSNonbybwD/193/KtPlWUru3g28DNyb4aKk0weA+6I282eBHzCzP89skdLP3c9G84vAXxOauxdNXIJgH7DZzDaaWR7h3sh7M1wmWWTRidM/Bd5299/LdHmWgplVm1lZ9LgA+EHgncyWKn3c/dfcvdbdGwi/439w95/McLHSysyKos4PmFkR8BFgUXsDxiII3H0ceAz4NuEE4tfd/UhmS5VeZvYM8AqwxcxazeyRTJdpCXwA+CnCXuKhaNqT6UKl2TrgJTN7k7DD86K7x6JLZYysAf7FzN4AXge+5e4vLOYHxKL7qIiIXFksjghEROTKFAQiIjGnIBARiTkFgYhIzCkIRERiTkEgMg8zKzOz/xA9Xm9mf5npMoksNnUfFZlHNGbRc3EZwVXiKSfTBRC5wX0BuCka1O094FZ332pmDwGfALKBrcDvAnmEC9pGgD3u3mlmNwFPAtXAIPCz7r5ir/yV5UlNQyLzexz4bjSo26/OWrcV+HHCuC//FRh09+2EK7p/OtrmKeDn3X0n8CvAl5ak1CJXQUcEItfupei+B31m1gP8bfT8W8C2aBTU7wH+IgyDBED+0hdTZH4KApFrNzLj8cSM5QnCbysL6I6OJkRuWGoaEplfH1B8LS+M7oVw0sx+FMLoqGZ252IWTmQxKAhE5uHuHcC/mtlh4Heu4S1+AngkGjnyCCv8FqmyPKn7qIhIzOmIQEQk5hQEIiIxpyAQEYk5BYGISMwpCEREYk5BICIScwoCEZGY+/+H9W++K6o0fQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plot_population(opt_dynamics)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"hide_input": false, | |
"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.4" | |
}, | |
"toc": { | |
"base_numbering": 1, | |
"nav_menu": {}, | |
"number_sections": true, | |
"sideBar": true, | |
"skip_h1_title": false, | |
"title_cell": "Table of Contents", | |
"title_sidebar": "Contents", | |
"toc_cell": false, | |
"toc_position": {}, | |
"toc_section_display": true, | |
"toc_window_display": false | |
}, | |
"varInspector": { | |
"cols": { | |
"lenName": 16, | |
"lenType": 16, | |
"lenVar": 40 | |
}, | |
"kernels_config": { | |
"python": { | |
"delete_cmd_postfix": "", | |
"delete_cmd_prefix": "del ", | |
"library": "var_list.py", | |
"varRefreshCmd": "print(var_dic_list())" | |
}, | |
"r": { | |
"delete_cmd_postfix": ") ", | |
"delete_cmd_prefix": "rm(", | |
"library": "var_list.r", | |
"varRefreshCmd": "cat(var_dic_list()) " | |
} | |
}, | |
"types_to_exclude": [ | |
"module", | |
"function", | |
"builtin_function_or_method", | |
"instance", | |
"_Feature" | |
], | |
"window_display": false | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment