{ "cells": [ { "cell_type": "markdown", "id": "fed083e4-9be1-480c-82e9-4bfd7dbccf1f", "metadata": {}, "source": [ "# Adjoint Plugin: 2 Checking Gradients\n", "\n", "In this notebook, we will show how to use the adjoint plugin for `DiffractionMonitor` outputs and also check the gradient values against gradients obtained using transfer matrix method (TMM) to validate their accuracy for a multilayer slab problem." ] }, { "cell_type": "code", "execution_count": 1, "id": "51963da1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
[14:48:02] INFO     Using client version: 1.9.0rc1                                                  __init__.py:121\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:02]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Using client version: \u001b[1;36m1.9\u001b[0m.0rc1 \u001b]8;id=396746;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/__init__.py\u001b\\\u001b[2m__init__.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=281179;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/__init__.py#121\u001b\\\u001b[2m121\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "import jax.numpy as jnp\n", "import jax\n", "import tmm\n", "import matplotlib.pyplot as plt\n", "from typing import Tuple, List\n", "\n", "import tidy3d as td\n", "from tidy3d.web import run as run_sim\n", "from tidy3d.plugins.adjoint import JaxSimulation, JaxBox, JaxMedium, JaxStructure, JaxSimulationData\n", "from tidy3d.plugins.adjoint.web import run as run_adjoint" ] }, { "cell_type": "markdown", "id": "b33d0892-62d3-4329-810f-f29ce10056b4", "metadata": {}, "source": [ "First, we define some global parameters describing the transmission through a multilayer slab with some spacing between each slab.\n", "\n", "The layout is diagrammed below.\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "ccbd2c6a-419d-4570-8f91-f57ad5bad813", "metadata": {}, "outputs": [], "source": [ "# frequency we want to simulate at\n", "freq0 = 2.0e14\n", "k0 = 2 * np.pi * freq0 / td.C_0\n", "freqs = [freq0]\n", "wavelength = td.C_0 / freq0\n", "\n", "# background permittivity\n", "bck_eps = 1.3**2\n", "\n", "# space between each slab\n", "spc = 0.1\n", "\n", "# slab permittivities and thicknesses\n", "slab_eps0 = [2.**2, 1.8**2, 1.5**2, 1.9**2]\n", "slab_ds0 = [0.5, 0.25, 0.5, 0.5]\n", "\n", "# incidence angle\n", "theta = np.pi/8\n", "\n", "# resolution\n", "dl = 0.01" ] }, { "cell_type": "markdown", "id": "48dd37b0-ba97-45cd-a861-53ea6ae3fa74", "metadata": {}, "source": [ "## Transfer Matrix Method (Ground Truth)\n", "\n", "Next we use the `tmm` package to write a function to return the transmission `T` of `p` polarized light given a set of slab permittivities and thicknesses. We'll also write a function to compute the numerical gradient using TMM and will take these to be our \"ground truths\" when evaluating the accuracy of our values obtained through FDTD and the adjoint plugin.\n", "\n", "### Transmission Calculation with TMM\n", "\n", "First, we write a function to compute transmission." ] }, { "cell_type": "code", "execution_count": 3, "id": "cc4f6e91-6a53-476e-b4c6-e76e50246426", "metadata": {}, "outputs": [], "source": [ "def compute_T_tmm(slab_eps=slab_eps0, slab_ds=slab_ds0) -> float:\n", " \"\"\"Get transmission as a function of slab permittivities and thicknesses.\"\"\"\n", "\n", " # construct lists of permittivities and thicknesses including spaces between\n", " new_slab_eps = []\n", " new_slab_ds = []\n", " for eps, d in zip(slab_eps, slab_ds):\n", " new_slab_eps.append(eps)\n", " new_slab_eps.append(bck_eps)\n", " new_slab_ds.append(d)\n", " new_slab_ds.append(spc)\n", " slab_eps = new_slab_eps[:-1]\n", " slab_ds = new_slab_ds[:-1]\n", "\n", " # add the input and output spaces to the lists\n", " eps_list = [bck_eps] + slab_eps + [bck_eps]\n", " n_list = np.sqrt(eps_list) \n", " d_list = [np.inf] + slab_ds + [np.inf]\n", " \n", " # compute transmission with TMM\n", " return tmm.coh_tmm(\"p\", n_list, d_list, theta, wavelength)[\"T\"]" ] }, { "cell_type": "markdown", "id": "c6c0da6b-2d2f-4be5-80e6-c84afd8d1a23", "metadata": {}, "source": [ "We run this function with our starting parameters and see that we get a transmission of about 98% for the set of input parameters." ] }, { "cell_type": "code", "execution_count": 4, "id": "c1743e54-d7f3-468a-8ac4-d42d4c2bc8dc", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T (tmm) = 0.997\n" ] } ], "source": [ "T_tmm = compute_T_tmm(slab_eps=slab_eps0, slab_ds=slab_ds0)\n", "print(f\"T (tmm) = {T_tmm:.3f}\")" ] }, { "cell_type": "markdown", "id": "452db467-f486-468d-8ec9-b9e669755c92", "metadata": {}, "source": [ "### Numerical Gradient with TMM\n", "\n", "Next, we will use our `compute_T_tmm()` function to compute the \"numerical\" gradient to use as comparison against our adjoint results with FDTD.\n", "\n", "The derivative of a function $f(x)$ w.r.t. $x$ can be approximated using finite differences as\n", "\n", "$$ \\frac{df}{dx}(x) \\approx \\frac{f(x+\\Delta) - f(x-\\Delta)}{2\\Delta}$$\n", "\n", "with a small step $\\Delta$.\n", "\n", "To compute the gradient of our transmission with respect to each of the slab thicknesses and permittivities, we need to repeat this step for each of the values. Luckily, since TMM is very fast, we can compute these quantities quite quickly compared to if we were using FDTD.\n", "\n", "Here we write a function to return this gradient." ] }, { "cell_type": "code", "execution_count": 5, "id": "15d5bae1-6fc7-41c8-8772-2e80505be17d", "metadata": {}, "outputs": [], "source": [ "def compute_grad_tmm(slab_eps=slab_eps0, slab_ds=slab_ds0) -> Tuple[List[float], List[float]]:\n", " \"\"\"Compute numerical gradient of transmission w.r.t. each of the slab permittivities and thicknesses using TMM.\"\"\"\n", "\n", " delta = 1e-4\n", "\n", " # set up containers to store gradient and perturbed arguments\n", " num_slabs = len(slab_eps)\n", " grad_tmm = np.zeros((2, num_slabs), dtype=float)\n", " args = np.stack((slab_eps, slab_ds), axis=0)\n", "\n", " # loop through slab index and argument index (eps, d)\n", " for arg_index in range(2):\n", " for slab_index in range(num_slabs):\n", " grad = 0.0\n", " \n", " # perturb the argument by delta in each + and - direction\n", " for pm in (-1, +1):\n", " args_num = args.copy()\n", " args_num[arg_index][slab_index] += delta * pm\n", " \n", " # compute argument perturbed T and add to finite difference gradient contribution\n", " T_tmm = compute_T_tmm(slab_eps=args_num[0], slab_ds=args_num[1])\n", " grad += pm * T_tmm / 2 / delta \n", "\n", " grad_tmm[arg_index][slab_index] = grad\n", " grad_eps, grad_ds = grad_tmm\n", " return grad_eps, grad_ds" ] }, { "cell_type": "markdown", "id": "d3c362ca-fb31-4ead-8e7c-fcc24d0faecc", "metadata": {}, "source": [ "Let's run this function and observe the gradients. These will be saved later to compare against our adjoint plugin results." ] }, { "cell_type": "code", "execution_count": 6, "id": "b5d1cc93-6d6e-43a7-8e5f-f1829770f3d5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "gradient w.r.t. eps (tmm) = [ 0.00353246 0.0255666 0.02079163 -0.00767556]\n", "gradient w.r.t. ds (tmm) = [ 0.12389213 0.27248157 0.14586663 -0.02167071]\n" ] } ], "source": [ "grad_eps_tmm, grad_ds_tmm = compute_grad_tmm()\n", "print(f\"gradient w.r.t. eps (tmm) = {grad_eps_tmm}\")\n", "print(f\"gradient w.r.t. ds (tmm) = {grad_ds_tmm}\")" ] }, { "cell_type": "markdown", "id": "50ca68ae-ca5a-49aa-9969-ac6d43324ea9", "metadata": {}, "source": [ "## FDTD (Using adjoint plugin)\n", "\n", "Next, we will implement the same two functions using Tidy3D's adjoint plugin.\n", "\n", "### Transmission Calculation with FDTD\n", "\n", "We first write a function to compute the transmission of a multilayer slab using Tidy3D.\n", "\n", "As discussed in the previous adjoint tutorial notebook, we need to use `jax`-compatible components from the tidy3d subclass for any structures that may depend on the parameters. In this case, this means that the slabs must be `JaxStructures` containing `JaxBox` and `JaxMedium` and must be added to `JaxSimulation.input_structures`.\n", "\n", "We use a `DiffractionMonitor` to measure our transmission amplitudes. As the data corresponding to this monitor will be used in the differentiable function return value, we must add it to `JaxSimulation.output_monitors`.\n", "\n", "Below, we break up the transmission calculation into a few functions to make it easier to read and re-use later." ] }, { "cell_type": "code", "execution_count": 7, "id": "4d12f133-a8d8-4e59-938f-fca4d2e2fa0b", "metadata": {}, "outputs": [], "source": [ "def make_sim(slab_eps=slab_eps0, slab_ds=slab_ds0) -> JaxSimulation:\n", " \"\"\"Create a JaxSimulation given the slab permittivities and thicknesses.\"\"\"\n", "\n", " # frequency setup\n", " wavelength = td.C_0 / freq0\n", " fwidth = freq0 / 10.0\n", " freqs = [freq0]\n", "\n", " # geometry setup\n", " bck_medium = td.Medium(permittivity=bck_eps)\n", "\n", " space_above = 2\n", " space_below = 2\n", "\n", " length_x = 0.1\n", " length_y = 0.1\n", " length_z = space_below + sum(slab_ds0) + space_above + (len(slab_ds0) - 1) * spc\n", " sim_size = (length_x, length_y, length_z)\n", "\n", " # make structures\n", " slabs = []\n", " z_start = -length_z/2 + space_below\n", " for (d, eps) in zip(slab_ds, slab_eps):\n", " slab = JaxStructure(\n", " geometry=JaxBox(center=[0, 0, z_start + d / 2], size=[td.inf, td.inf, d]),\n", " medium=JaxMedium(permittivity=eps),\n", " )\n", " slabs.append(slab)\n", " z_start += d + spc\n", "\n", " # source setup\n", " gaussian = td.GaussianPulse(freq0=freq0, fwidth=fwidth)\n", " src_z = -length_z/2 + space_below/2.0\n", "\n", " source = td.PlaneWave(\n", " center=(0, 0, src_z),\n", " size=(td.inf, td.inf, 0),\n", " source_time=gaussian,\n", " direction=\"+\",\n", " angle_theta=theta,\n", " angle_phi=0,\n", " pol_angle=0,\n", " )\n", "\n", " # boundaries\n", " boundary_x = td.Boundary.bloch_from_source(\n", " source=source, domain_size=sim_size[0], axis=0, medium=bck_medium\n", " )\n", " boundary_y = td.Boundary.bloch_from_source(\n", " source=source, domain_size=sim_size[1], axis=1, medium=bck_medium\n", " ) \n", " boundary_spec = td.BoundarySpec(x=boundary_x, y=boundary_y, z=td.Boundary.pml(num_layers=40))\n", "\n", " # monitors\n", " mnt_z = length_z/2 - space_above/2.0\n", " monitor_1 = td.DiffractionMonitor(\n", " center=[0.0, 0.0, mnt_z],\n", " size=[td.inf, td.inf, 0],\n", " freqs=freqs,\n", " name=\"diffraction\",\n", " normal_dir=\"+\",\n", " )\n", "\n", " # make simulation\n", " return JaxSimulation(\n", " size=sim_size,\n", " grid_spec=td.GridSpec.auto(min_steps_per_wvl=100),\n", " input_structures=slabs,\n", " sources=[source],\n", " output_monitors=[monitor_1],\n", " run_time= 10 / fwidth,\n", " boundary_spec=boundary_spec,\n", " medium=bck_medium,\n", " subpixel=True,\n", " shutoff=1e-8,\n", " )" ] }, { "cell_type": "markdown", "id": "9addea1f-4dd8-4e5e-a058-b94638fb2d70", "metadata": {}, "source": [ "Let's generate a simulation and plot it to make sure it looks reasonable." ] }, { "cell_type": "code", "execution_count": 8, "id": "bc0dc456-e742-4299-ae5e-22daa49e3997", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
           INFO     Auto meshing using wavelength 1.4990 defined from sources.                     grid_spec.py:510\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Auto meshing using wavelength \u001b[1;36m1.4990\u001b[0m defined from sources. \u001b]8;id=324563;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py\u001b\\\u001b[2mgrid_spec.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=646067;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py#510\u001b\\\u001b[2m510\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAANcAAANXCAYAAACmJcrwAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9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+dJPfss88655xbtGiRk+RWrVpVbu3111/vMjIyKr2fk1X71cLS0lK9+eabuvrqq8tVLUkREREBH48cOVJRUVH+j5ctW6aSkhLdd999ioyMDFiXnJyst99+W5KUkpIiSVqyZImOHj1a4SxlX8EXL16s0tLS6n4K1dpv0aJFat++vbKysrR//37/pX///pKkFStWSJLefPNNlZaWatKkSQGfj1T+saiOzz77THv37tXo0aMVGxvr337VVVcpKyvL//ic7K677gr4+NJLL9U333xT5X3FxcX5/1xQUKD9+/fr0ksv1dGjR7Vx48Yazy59//c2ZMgQ/eEPf5D7/++/9fl8WrhwoYYOHaqEhAT/2vnz52vp0qVVXoYNG+bfp6ioKODM6GSxsbEqKiqqdL6ioiJ5vd4K9y27/uT/nm5tVfdzsmqfFu7bt0/5+fkBh/zKtG7dOuDjf/3rX5Kkdu3aBWz3eDxq06aN//rWrVtr7NixmjFjhubPn69LL71U11xzjW6++WZ/eDfccIN+97vf6b/+6780YcIEXX755frZz36m6667rtz/6Cerzn7//Oc/9dVXXyk9Pb3C29i7d68kacuWLYqMjNR5551XrcejKqd7fCQpKytLf/3rXwO2xcbGlpuxfv36OnToUJX39eWXX+qhhx7SBx98oPz8/IDr8vLyajq637Bhw7Rw4UJ9+OGH6tOnj5YtW6Y9e/bolltuCVjXu3fvGt92XFycSkpKKrzu2LFjAV8wTrd/cXFxhfuWXX/yf0+3tqr7OVmNnnPVRE2GONX06dM1YsQILV68WO+//77uvfde5eTkaM2aNWrWrJni4uK0atUqrVixQm+//bbee+89LVy4UP3799f7778fcMQ8daaq9istLVWnTp00Y8aMCm+jefPmZ/x51abTfY5VOXz4sPr27avk5GRNnTpVmZmZio2N1d/+9jeNHz++RmcCpxo0aJAaNWqkV155RX369NErr7yijIwMDRgwIGDdvn37qvWcKzEx0f88r3HjxvL5fNq7d68aNmzoX1NSUqIDBw6oSZMmld5W48aNtXPnznLbv/vuO0ny79+4ceOA7aeurep+AlT3/NHn87nk5GQ3ZMiQSteVPec69XnZggULnCT3zjvvBGwvLi52KSkp7tprrz3tbX700UdOkps4ceJp10ybNs1JckuXLq36k6lkvyuvvNI1bdo04HlTRR577DEnya1fv77SdR07dqzWc66yV72eeeaZcmvbt28f8Fyq7NXCU02ePNlV9Vf6xhtvOElu5cqVAduff/75cq9e/vSnP63xS/H333+/q1+/vjt48KBLTEx0999/f7k1Z/Kcq+y556mvFpb9v/G///u/lc71wAMPVPhqYdnff9mrhYcPH6701cLbbrut2o9FtZ9zRUZGaujQofrLX/6izz77rKJIK91/wIAB8ng8euqppwLWvvjii8rLy9NVV10lScrPz9eJEycC9u3UqZMiIyP9h+qDBw+Wu/3OnTtLqvhwXqY6+/385z/Xzp079cILL5RbW1RU5H/lc+jQoYqMjNTUqVPLfbU/+fNLSEjQ4cOHTztTmYsuukgNGzbUs88+G/A5vPvuu/rqq6/8j88PVXbEO3nGkpISPfPMM+XWJiQk1Pg08ZZbbtGhQ4d055136siRIxW+gncmz7n69++v1NRUzZkzJ+C25syZo/j4+IDHZ//+/dq4cWPAc/brrrtOPp9Pzz//vH9bcXGxXn75ZfXo0cN/RpKSkqIBAwbolVdeUUFBgX/tvHnzdOTIEV1//fXVfzCqnaH7/ntcGRkZLj4+3t13333uueeec4888ojr0KGD/3tVpztyOffvr6wDBw50Tz/9tLvnnntcVFSU69atmyspKXHOff+VtWnTpu6+++5zzzzzjHvqqadct27dXExMjPv444+dc87993//t+vSpYt76KGH3AsvvOCmTZvmmjZt6po1axbwvbBTVWc/n8/nrrzyShcREeFuvPFGN2vWLDdz5kx31113udTU1IDP6+GHH3aSXK9evdzjjz/uZs2a5YYNG+YmTJjgXzN69GgXERHhfvWrX7k//OEPbvny5c65ir/PVfbY9ejRw82cOdNlZ2e7+Ph416pVq4DvBf6QI9f+/ftd/fr1XcuWLd306dPdjBkzXJcuXdwFF1xQbp7f/va3TpK7//773YIFC9yf//znSm+7TMeOHZ0k1759+2qtr67Zs2c7Se66665zL7zwghs2bJiT5KZNmxawruxxOPV7iNdff73/qPTcc8+5X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FL37hPB6Pi4iI8L9cvmbNGjdr1izXpEkTJ8mlpKS4NWvWOOecKyoqcvXr1/d/LyspKcm98sor7tVXX3Vt27Z10dHRLjY21kVFRbmIiAgXERHh2rZt63r37u3S09NdTEyMa9mypRs5cqTbvXt3kB+Bsx9vOQGM8JwLMEJcgBHiAowQF2CEuAAjxAUYIS7ACHEBRogLMEJcgBHiAowQV4jbt2+fMjIy9Oijj/q3rV69Wh6Px/92FYQmfnA3DLzzzjsaOnSoVq9erXbt2qlz584aMmSIZsyYEezRUAniChNjxozRsmXLdNFFF2nDhg1au3Yt/6pJiCOuMFFUVKSOHTtq+/btWrdunTp16hTskVAFnnOFiS1btmjXrl0qLS0t93s0EJo4coWBkpISde/eXZ07d1a7du00c+ZMbdiwQQ0bNgz2aKgEcYWBBx98UK+99pr+7//+T4mJierbt69SUlL01ltvBXs0VILTwhCXm5urmTNnat68eUpOTlZkZKTmzZunDz/8UHPmzAn2eKgERy7ACEcuwAhxAUaICzBCXIAR4gKMEBdghLgAI8QFGCEuwAhxAUaICzDy/wCJ3epwyqF+zQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sim = make_sim()\n", "f, ax = plt.subplots(1, 1, figsize=(10, 10))\n", "sim.plot(y=0, ax=ax)\n", "plt.show()" ] }, { "cell_type": "markdown", "id": "e4c9a742-5988-444d-9ac4-34b612d42289", "metadata": {}, "source": [ "Now we write a function to post process some run results to get the transmission we are after." ] }, { "cell_type": "code", "execution_count": 9, "id": "1917a8b6-8ba9-4767-90ca-06cd6daadcd3", "metadata": {}, "outputs": [], "source": [ "def post_process_T(sim_data: JaxSimulationData) -> float:\n", " \"\"\"Given some JaxSimulationData from the run, return the transmission of \"p\" polarized light.\"\"\"\n", " amps = sim_data.output_monitor_data[\"diffraction\"].amps.sel(polarization=\"p\")\n", " return jnp.sum(abs(amps.values)**2)" ] }, { "cell_type": "markdown", "id": "b65e4d49-e8b1-4e05-9fce-57bd63b3f2cf", "metadata": {}, "source": [ "And finally, put everything together in a single function that relates the permittivities and thicknesses of each slab to the transmission, through a `JaxSimulation` run using the adjoint plugin." ] }, { "cell_type": "code", "execution_count": 10, "id": "f64ac290-b67d-4a9a-88e8-504de931fef8", "metadata": {}, "outputs": [], "source": [ "def compute_T_fdtd(slab_eps=slab_eps0, slab_ds=slab_ds0) -> float:\n", " \"\"\"Given the slab permittivities and thicknesses, compute T, making sure to use `tidy3d.plugins.adjoint.web.run_adjoint`.\"\"\"\n", " sim = make_sim(slab_eps=slab_eps, slab_ds=slab_ds)\n", " sim_data = run_adjoint(sim, task_name='slab')\n", " return post_process_T(sim_data)" ] }, { "cell_type": "markdown", "id": "c4c19d59-d9a3-4935-b785-5fb6b3b3a819", "metadata": {}, "source": [ "### Computing T and Gradient with FDTD\n", "\n", "Now that we have this function defined, we are ready to compute our transmission and gradients using Tidy3d.\n", "\n", "We first call `jax.value_and_grad()` on our transmission calculation function, which returns a function that will give us both `T` and the gradient of `T` with respect to the input parameters in one shot. For more details, see the previous tutorial." ] }, { "cell_type": "code", "execution_count": 11, "id": "59647cdf-8c2a-40d6-bbc9-b7537616938a", "metadata": {}, "outputs": [], "source": [ "compute_T_and_grad_fdtd = jax.value_and_grad(compute_T_fdtd, argnums=(0, 1))" ] }, { "cell_type": "markdown", "id": "81caed90-8554-441b-8948-b240e181e98c", "metadata": {}, "source": [ "Next, we call this function on our starting parameters, which will kick off the original (`fwd`) T transmission simulation and then the reverse (`adj`) simulation, which is used in combination with `fwd` for the gradient calculation." ] }, { "cell_type": "code", "execution_count": 12, "id": "ef6716b3-79a3-40cc-ac2a-5056b5ed2ae9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
[14:48:03] INFO     Remote TPU is not linked into jax; skipping remote TPU.                       xla_bridge.py:160\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:03]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Remote TPU is not linked into jax; skipping remote TPU. \u001b]8;id=989308;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py\u001b\\\u001b[2mxla_bridge.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=231243;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py#160\u001b\\\u001b[2m160\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Unable to initialize backend 'tpu_driver': Could not initialize backend       xla_bridge.py:333\n",
       "                    'tpu_driver'                                                                                   \n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Unable to initialize backend \u001b[32m'tpu_driver'\u001b[0m: Could not initialize backend \u001b]8;id=289490;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py\u001b\\\u001b[2mxla_bridge.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=323676;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py#333\u001b\\\u001b[2m333\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[2;36m \u001b[0m \u001b[32m'tpu_driver'\u001b[0m \u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Unable to initialize backend 'cuda': module 'jaxlib.xla_extension' has no     xla_bridge.py:333\n",
       "                    attribute 'GpuAllocatorConfig'                                                                 \n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Unable to initialize backend \u001b[32m'cuda'\u001b[0m: module \u001b[32m'jaxlib.xla_extension'\u001b[0m has no \u001b]8;id=998228;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py\u001b\\\u001b[2mxla_bridge.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=773790;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py#333\u001b\\\u001b[2m333\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[2;36m \u001b[0m attribute \u001b[32m'GpuAllocatorConfig'\u001b[0m \u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Unable to initialize backend 'rocm': module 'jaxlib.xla_extension' has no     xla_bridge.py:333\n",
       "                    attribute 'GpuAllocatorConfig'                                                                 \n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Unable to initialize backend \u001b[32m'rocm'\u001b[0m: module \u001b[32m'jaxlib.xla_extension'\u001b[0m has no \u001b]8;id=552431;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py\u001b\\\u001b[2mxla_bridge.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=398896;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py#333\u001b\\\u001b[2m333\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[2;36m \u001b[0m attribute \u001b[32m'GpuAllocatorConfig'\u001b[0m \u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Unable to initialize backend 'tpu': module 'jaxlib.xla_extension' has no      xla_bridge.py:333\n",
       "                    attribute 'get_tpu_client'                                                                     \n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Unable to initialize backend \u001b[32m'tpu'\u001b[0m: module \u001b[32m'jaxlib.xla_extension'\u001b[0m has no \u001b]8;id=895050;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py\u001b\\\u001b[2mxla_bridge.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=248335;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jax/_src/lib/xla_bridge.py#333\u001b\\\u001b[2m333\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[2;36m \u001b[0m attribute \u001b[32m'get_tpu_client'\u001b[0m \u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Auto meshing using wavelength 1.4990 defined from sources.                     grid_spec.py:510\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Auto meshing using wavelength \u001b[1;36m1.4990\u001b[0m defined from sources. \u001b]8;id=973489;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py\u001b\\\u001b[2mgrid_spec.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=340501;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py#510\u001b\\\u001b[2m510\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:04] INFO     Created task 'slab_fwd' with task_id 'b009d1ea-09fb-4fab-bb67-8b46aeb63e18'.      webapi.py:120\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:04]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Created task \u001b[32m'slab_fwd'\u001b[0m with task_id \u001b[32m'b009d1ea-09fb-4fab-bb67-8b46aeb63e18'\u001b[0m. \u001b]8;id=307600;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=291689;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#120\u001b\\\u001b[2m120\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "463ceb3a867247e9a45250eb8f56650f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:06] INFO     Maximum FlexUnit cost: 0.025                                                      webapi.py:253\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:06]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Maximum FlexUnit cost: \u001b[1;36m0.025\u001b[0m \u001b]8;id=60131;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=664184;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#253\u001b\\\u001b[2m253\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     status = queued                                                                   webapi.py:262\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = queued \u001b]8;id=316574;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=938653;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#262\u001b\\\u001b[2m262\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:09] INFO     status = preprocess                                                               webapi.py:274\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:09]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = preprocess \u001b]8;id=692349;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=709185;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#274\u001b\\\u001b[2m274\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h\r", "\u001b[1A\u001b[2K" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:13] INFO     starting up solver                                                                webapi.py:278\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:13]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m starting up solver \u001b]8;id=192222;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=523591;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#278\u001b\\\u001b[2m278\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:20] INFO     running solver                                                                    webapi.py:284\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:20]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m running solver \u001b]8;id=677288;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=9756;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#284\u001b\\\u001b[2m284\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "d83c27b9143542fa86b3d0d4c1ea22a3",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:22] INFO     early shutoff detected, exiting.                                                  webapi.py:295\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:22]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m early shutoff detected, exiting. \u001b]8;id=927438;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=709260;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#295\u001b\\\u001b[2m295\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     status = postprocess                                                              webapi.py:301\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = postprocess \u001b]8;id=5435;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=547529;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#301\u001b\\\u001b[2m301\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:26] INFO     status = success                                                                  webapi.py:307\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:26]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = success \u001b]8;id=489495;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=217568;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#307\u001b\\\u001b[2m307\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h\r", "\u001b[1A\u001b[2K" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Billed FlexUnit cost: 0.025                                                       webapi.py:311\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Billed FlexUnit cost: \u001b[1;36m0.025\u001b[0m \u001b]8;id=249905;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=268977;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#311\u001b\\\u001b[2m311\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     downloading file \"output/monitor_data.hdf5\" to \"simulation_data.hdf5\"             webapi.py:593\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m downloading file \u001b[32m\"output/monitor_data.hdf5\"\u001b[0m to \u001b[32m\"simulation_data.hdf5\"\u001b[0m \u001b]8;id=330550;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=751131;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#593\u001b\\\u001b[2m593\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "5edb752d20bd4f66bca49e08a61a431f",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:28] INFO     loading SimulationData from simulation_data.hdf5                                  webapi.py:415\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:28]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m loading SimulationData from simulation_data.hdf5 \u001b]8;id=428950;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=819511;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#415\u001b\\\u001b[2m415\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:29] INFO     Auto meshing using wavelength 1.4990 defined from sources.                     grid_spec.py:510\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:29]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Auto meshing using wavelength \u001b[1;36m1.4990\u001b[0m defined from sources. \u001b]8;id=490077;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py\u001b\\\u001b[2mgrid_spec.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=52055;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/components/grid/grid_spec.py#510\u001b\\\u001b[2m510\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     Created task 'slab_adj' with task_id 'e0ffea8f-7959-40ea-93a1-8ca81e07dfa4'.      webapi.py:120\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Created task \u001b[32m'slab_adj'\u001b[0m with task_id \u001b[32m'e0ffea8f-7959-40ea-93a1-8ca81e07dfa4'\u001b[0m. \u001b]8;id=126960;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=567257;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#120\u001b\\\u001b[2m120\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "1274c9f566de40d9b60bb738f063f392",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:31] INFO     Maximum FlexUnit cost: 0.025                                                      webapi.py:253\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:31]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Maximum FlexUnit cost: \u001b[1;36m0.025\u001b[0m \u001b]8;id=361139;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=52680;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#253\u001b\\\u001b[2m253\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     status = queued                                                                   webapi.py:262\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = queued \u001b]8;id=370755;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=895582;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#262\u001b\\\u001b[2m262\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:34] INFO     status = preprocess                                                               webapi.py:274\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:34]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = preprocess \u001b]8;id=486761;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=763403;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#274\u001b\\\u001b[2m274\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h\r", "\u001b[1A\u001b[2K" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:37] INFO     starting up solver                                                                webapi.py:278\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:37]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m starting up solver \u001b]8;id=557845;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=727832;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#278\u001b\\\u001b[2m278\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:43] INFO     running solver                                                                    webapi.py:284\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:43]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m running solver \u001b]8;id=609080;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=472430;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#284\u001b\\\u001b[2m284\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "20367e73207548cab3fde28a781158a0",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:46] INFO     early shutoff detected, exiting.                                                  webapi.py:295\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:46]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m early shutoff detected, exiting. \u001b]8;id=125975;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=976987;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#295\u001b\\\u001b[2m295\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:47] INFO     status = postprocess                                                              webapi.py:301\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:47]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = postprocess \u001b]8;id=569252;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=974439;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#301\u001b\\\u001b[2m301\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "598779ef8097442f83ddf9d11dd705cd",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
[14:48:48] INFO     status = success                                                                  webapi.py:307\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:48]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m status = success \u001b]8;id=993239;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=351317;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#307\u001b\\\u001b[2m307\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h\r", "\u001b[1A\u001b[2K" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:49] INFO     Billed FlexUnit cost: 0.025                                                       webapi.py:311\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:49]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m Billed FlexUnit cost: \u001b[1;36m0.025\u001b[0m \u001b]8;id=109124;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=772746;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#311\u001b\\\u001b[2m311\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
           INFO     downloading file \"output/monitor_data.hdf5\" to \"simulation_data.hdf5\"             webapi.py:593\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m downloading file \u001b[32m\"output/monitor_data.hdf5\"\u001b[0m to \u001b[32m\"simulation_data.hdf5\"\u001b[0m \u001b]8;id=972278;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=85871;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#593\u001b\\\u001b[2m593\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n"
      ],
      "text/plain": [
       "\u001b[?25l"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "80fff1dcaed44da391cce597b25933e0",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Output()"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "
\n",
       "
\n" ], "text/plain": [ "\n", "\u001b[?25h" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:51] INFO     loading SimulationData from simulation_data.hdf5                                  webapi.py:415\n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:51]\u001b[0m\u001b[2;36m \u001b[0m\u001b[34mINFO \u001b[0m loading SimulationData from simulation_data.hdf5 \u001b]8;id=321421;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py\u001b\\\u001b[2mwebapi.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=284982;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/web/webapi.py#415\u001b\\\u001b[2m415\u001b[0m\u001b]8;;\u001b\\\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
[14:48:52] WARNING  'JaxSimulation.input_structures' elements 0 and 1 are overlapping or          simulation.py:131\n",
       "                    touching. Geometric gradients for overlapping structures may contain errors.                   \n",
       "
\n" ], "text/plain": [ "\u001b[2;36m[14:48:52]\u001b[0m\u001b[2;36m \u001b[0m\u001b[31mWARNING \u001b[0m \u001b[32m'JaxSimulation.input_structures'\u001b[0m elements \u001b[1;36m0\u001b[0m and \u001b[1;36m1\u001b[0m are overlapping or \u001b]8;id=282221;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/plugins/adjoint/components/simulation.py\u001b\\\u001b[2msimulation.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=312888;file:///Users/twhughes/.pyenv/versions/3.10.9/lib/python3.10/site-packages/tidy3d/plugins/adjoint/components/simulation.py#131\u001b\\\u001b[2m131\u001b[0m\u001b]8;;\u001b\\\n", "\u001b[2;36m \u001b[0m touching. Geometric gradients for overlapping structures may contain errors. \u001b[2m \u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "T_fdtd, (grad_eps_fdtd, grad_ds_fdtd) = compute_T_and_grad_fdtd(slab_eps0, slab_ds0)" ] }, { "cell_type": "markdown", "id": "cbd02aa9-41f9-4e28-802d-f9a46b7f6263", "metadata": {}, "source": [ "### Checking Accuracy of TMM (Numerical) vs FDTD (Adjoint)\n", "\n", "Let's convert these from jax types to numpy arrays to work with them easier, and then display the results compared to TMM." ] }, { "cell_type": "code", "execution_count": 13, "id": "41e66722-bb8c-41d9-a0a7-85009ff46df3", "metadata": {}, "outputs": [], "source": [ "grad_eps_fdtd = np.array(grad_eps_fdtd)\n", "grad_ds_fdtd = np.array(grad_ds_fdtd)" ] }, { "cell_type": "code", "execution_count": 14, "id": "953d2497-240a-4295-9fcd-5342942983d0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T (tmm) = 0.99731\n", "T (FDTD) = 0.99713\n" ] } ], "source": [ "print(f\"T (tmm) = {T_tmm:.5f}\")\n", "print(f\"T (FDTD) = {T_fdtd:.5f}\")" ] }, { "cell_type": "markdown", "id": "809d274a-9bb4-4f24-a7c2-962fc36f0b74", "metadata": {}, "source": [ "We see that the transmission results match very well with TMM, giving us a lot of confidence that our set up is correct.\n", "\n", "Let's look at the gradients now." ] }, { "cell_type": "code", "execution_count": 15, "id": "d0e496be-a967-427d-9ed6-8eea5a96fd70", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "un-normalized:\n", "\tgrad_eps (tmm) = [ 0.00353246 0.0255666 0.02079163 -0.00767556]\n", "\tgrad_eps (FDTD) = [ 0.00351275 0.02560841 0.02075933 -0.00766569]\n", "--------------------------------------------------------------------------------\n", "\tgrad_ds (tmm) = [ 0.12389213 0.27248157 0.14586663 -0.02167071]\n", "\tgrad_ds (FDTD) = [ 0.12433368 0.2717824 0.1460508 -0.02059105]\n", "RMS error = 0.1682669588192957 %\n", "RMS error = 0.41128200939768944 %\n" ] } ], "source": [ "print(\"un-normalized:\")\n", "print(f\"\\tgrad_eps (tmm) = {grad_eps_tmm}\")\n", "print(f\"\\tgrad_eps (FDTD) = {grad_eps_fdtd}\")\n", "print(80*'-')\n", "print(f\"\\tgrad_ds (tmm) = {grad_ds_tmm}\")\n", "print(f\"\\tgrad_ds (FDTD) = {grad_ds_fdtd}\")\n", "\n", "\n", "rms_eps = np.linalg.norm(grad_eps_tmm - grad_eps_fdtd) / np.linalg.norm(grad_eps_tmm)\n", "rms_ds = np.linalg.norm(grad_ds_tmm - grad_ds_fdtd) / np.linalg.norm(grad_ds_tmm)\n", "\n", "print(f\"RMS error = {rms_eps * 100} %\")\n", "print(f\"RMS error = {rms_ds * 100} %\")" ] }, { "cell_type": "markdown", "id": "111ef29c-a78f-468a-b2a7-afa3785ab5aa", "metadata": {}, "source": [ "The gradients match to < 1% of their respective norms, which is very good agreement.\n", "\n", "If we only care about the error in the \"directions\" of the gradients, we can compare their normalized versions to each other." ] }, { "cell_type": "code", "execution_count": 16, "id": "2993410c-0c1d-412e-9c2c-1c43664ae20c", "metadata": {}, "outputs": [], "source": [ "def normalize(arr):\n", " return arr / np.linalg.norm(arr)\n", "\n", "grad_eps_tmm_norm = normalize(grad_eps_tmm)\n", "grad_ds_tmm_norm = normalize(grad_ds_tmm)\n", "grad_eps_fdtd_norm = normalize(grad_eps_fdtd)\n", "grad_ds_fdtd_norm = normalize(grad_ds_fdtd)\n", "\n", "rms_eps = np.linalg.norm(grad_eps_tmm_norm - grad_eps_fdtd_norm) / np.linalg.norm(grad_eps_tmm_norm)\n", "rms_ds = np.linalg.norm(grad_ds_tmm_norm - grad_ds_fdtd_norm) / np.linalg.norm(grad_ds_tmm_norm)" ] }, { "cell_type": "code", "execution_count": 17, "id": "8a375cb8-79ae-4b57-86bd-26af66bba8b4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "normalized:\n", "\tgrad_eps (tmm) = [ 0.10383603 0.75152497 0.61116552 -0.22562138]\n", "\tgrad_eps (FDTD) = [ 0.10323393 0.75258896 0.61008249 -0.22528199]\n", "\tRMS error = 0.1668163643627526 %\n", "--------------------------------------------------------------------------------\n", "\tgrad_ds (tmm) = [ 0.37129054 0.81659613 0.43714562 -0.06494463]\n", "\tgrad_ds (FDTD) = [ 0.37305433 0.81546366 0.438215 -0.06178198]\n", "\tRMS error = 0.39419938518606473 %\n" ] } ], "source": [ "print(\"normalized:\")\n", "print(f\"\\tgrad_eps (tmm) = {grad_eps_tmm_norm}\")\n", "print(f\"\\tgrad_eps (FDTD) = {grad_eps_fdtd_norm}\")\n", "print(f\"\\tRMS error = {rms_eps * 100} %\")\n", "print(80*'-')\n", "print(f\"\\tgrad_ds (tmm) = {grad_ds_tmm_norm}\")\n", "print(f\"\\tgrad_ds (FDTD) = {grad_ds_fdtd_norm}\")\n", "print(f\"\\tRMS error = {rms_ds * 100} %\")" ] }, { "cell_type": "markdown", "id": "a66dbc89-3804-4576-bf08-31421fcb2476", "metadata": {}, "source": [ "In which case we see slight improvement, but the unnormalized gradients already match quite well before this." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.9" }, "vscode": { "interpreter": { "hash": "9e43a20ef2440406ea6cbfb61ead7c471aba2de37f508addf1f0635fad81ef64" } }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "00b2fd25c39b41eea8d5604068d76aa0": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "042612d2ed0947d48a9db31c34f2729d": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_00b2fd25c39b41eea8d5604068d76aa0", "msg_id": "", "outputs": [ { "data": { "text/html": "
🚶  Starting 'slab_adj'...\n🚶  Starting 'slab_adj'...
\n", "text/plain": "\r\u001b[2K\u001b[32m🚶 \u001b[0m \u001b[1;32mStarting 'slab_adj'...\u001b[0m\n\u001b[32m🚶 \u001b[0m \u001b[1;32mStarting 'slab_adj'...\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "1bbefff27a0242dbb3be40be7b2f7be4": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "1fd505732e8a43578659ffad0816197a": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2078b654416d4be3b99b1242b035b4bc": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "23df6bb05b614409ba70494d15633f7b": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_810cf13ba5d042fe8fc4b40e55eb8261", "msg_id": "", "outputs": [ { "data": { "text/html": "
🏃  Finishing 'slab_adj'...\n🏃  Finishing 'slab_adj'...
\n", "text/plain": "\r\u001b[2K\u001b[32m🏃 \u001b[0m \u001b[1;32mFinishing 'slab_adj'...\u001b[0m\n\u001b[32m🏃 \u001b[0m \u001b[1;32mFinishing 'slab_adj'...\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "2b631a8f196840f6a6128322d5723694": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_2078b654416d4be3b99b1242b035b4bc", "msg_id": "", "outputs": [ { "data": { "text/html": "
 simulation.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0%0.0/5.7 kB?-:--:--\n simulation.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0%0.0/5.7 kB?-:--:--
\n", "text/plain": "\r\u001b[2K\u001b[1;31m↑\u001b[0m \u001b[1;34msimulation.json\u001b[0m \u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m0.0%\u001b[0m • \u001b[32m0.0/5.7 kB\u001b[0m • \u001b[31m?\u001b[0m • \u001b[36m-:--:--\u001b[0m\n\u001b[1;31m↑\u001b[0m \u001b[1;34msimulation.json\u001b[0m \u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m0.0%\u001b[0m • \u001b[32m0.0/5.7 kB\u001b[0m • \u001b[31m?\u001b[0m • \u001b[36m-:--:--\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "2bc7aad47b704edeba3d989447c6acb0": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "32359174e28e4358837b64156848f22a": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_4b6cc865d6a94e8b9abcdcfb6719dc60", "msg_id": "", "outputs": [ { "data": { "text/html": "
🏃  Finishing 'slab_fwd'...\n🏃  Finishing 'slab_fwd'...
\n", "text/plain": "\r\u001b[2K\u001b[32m🏃 \u001b[0m \u001b[1;32mFinishing 'slab_fwd'...\u001b[0m\n\u001b[32m🏃 \u001b[0m \u001b[1;32mFinishing 'slab_fwd'...\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "4b6cc865d6a94e8b9abcdcfb6719dc60": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "5909230a4c294168847630f8127a5c96": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_d56b34370dfc4452b988c2ab43db626c", "msg_id": "", "outputs": [ { "data": { "text/html": "
🏃  Starting 'slab_fwd'...\n🏃  Starting 'slab_fwd'...
\n", "text/plain": "\r\u001b[2K\u001b[32m🏃 \u001b[0m \u001b[1;32mStarting 'slab_fwd'...\u001b[0m\n\u001b[32m🏃 \u001b[0m \u001b[1;32mStarting 'slab_fwd'...\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "5b5e50ecfbfc49c189a0f0d8943171d8": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_2bc7aad47b704edeba3d989447c6acb0", "msg_id": "", "outputs": [ { "data": { "text/html": "
% done (field decay = 1.63e-10) ━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━  32% -:--:--\n% done (field decay = 1.63e-10) ━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━  32% -:--:--
\n", "text/plain": "\r\u001b[2K% done (field decay = 1.63e-10) \u001b[38;2;249;38;114m━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m 32%\u001b[0m \u001b[36m-:--:--\u001b[0m\n% done (field decay = 1.63e-10) \u001b[38;2;249;38;114m━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m 32%\u001b[0m \u001b[36m-:--:--\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "810cf13ba5d042fe8fc4b40e55eb8261": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "883016225eb74774a10a5a7a28e8791f": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_bdc427d34d0440f38d8f9ba17c300d11", "msg_id": "", "outputs": [ { "data": { "text/html": "
 simulation.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0%0.0/5.9 kB?-:--:--\n simulation.json ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0%0.0/5.9 kB?-:--:--
\n", "text/plain": "\r\u001b[2K\u001b[1;31m↑\u001b[0m \u001b[1;34msimulation.json\u001b[0m \u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m0.0%\u001b[0m • \u001b[32m0.0/5.9 kB\u001b[0m • \u001b[31m?\u001b[0m • \u001b[36m-:--:--\u001b[0m\n\u001b[1;31m↑\u001b[0m \u001b[1;34msimulation.json\u001b[0m \u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m0.0%\u001b[0m • \u001b[32m0.0/5.9 kB\u001b[0m • \u001b[31m?\u001b[0m • \u001b[36m-:--:--\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "993f2741882146c8bf704caf02b82014": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "aff38de6b5394f53b425ace6a5d3d42e": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_993f2741882146c8bf704caf02b82014", "msg_id": "", "outputs": [ { "data": { "text/html": "
 monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━ 93.2%3.4/3.7 MB5.5 MB/s0:00:01\n monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━ 93.2%3.4/3.7 MB5.5 MB/s0:00:01
\n", "text/plain": "\r\u001b[2K\u001b[1;32m↓\u001b[0m \u001b[1;34mmonitor_data.hdf5\u001b[0m \u001b[38;2;249;38;114m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[38;5;237m╺\u001b[0m\u001b[38;5;237m━━\u001b[0m \u001b[35m93.2%\u001b[0m • \u001b[32m3.4/3.7 MB\u001b[0m • \u001b[31m5.5 MB/s\u001b[0m • \u001b[36m0:00:01\u001b[0m\n\u001b[1;32m↓\u001b[0m \u001b[1;34mmonitor_data.hdf5\u001b[0m \u001b[38;2;249;38;114m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[38;5;237m╺\u001b[0m\u001b[38;5;237m━━\u001b[0m \u001b[35m93.2%\u001b[0m • \u001b[32m3.4/3.7 MB\u001b[0m • \u001b[31m5.5 MB/s\u001b[0m • \u001b[36m0:00:01\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "bdc427d34d0440f38d8f9ba17c300d11": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d56b34370dfc4452b988c2ab43db626c": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e2fbc5558c6846508566f1b9c8f87306": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_1fd505732e8a43578659ffad0816197a", "msg_id": "", "outputs": [ { "data": { "text/html": "
 monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━ 64.2%2.4/3.7 MB4.3 MB/s0:00:01\n monitor_data.hdf5 ━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━ 64.2%2.4/3.7 MB4.3 MB/s0:00:01
\n", "text/plain": "\r\u001b[2K\u001b[1;32m↓\u001b[0m \u001b[1;34mmonitor_data.hdf5\u001b[0m \u001b[38;2;249;38;114m━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━\u001b[0m \u001b[35m64.2%\u001b[0m • \u001b[32m2.4/3.7 MB\u001b[0m • \u001b[31m4.3 MB/s\u001b[0m • \u001b[36m0:00:01\u001b[0m\n\u001b[1;32m↓\u001b[0m \u001b[1;34mmonitor_data.hdf5\u001b[0m \u001b[38;2;249;38;114m━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━\u001b[0m \u001b[35m64.2%\u001b[0m • \u001b[32m2.4/3.7 MB\u001b[0m • \u001b[31m4.3 MB/s\u001b[0m • \u001b[36m0:00:01\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } }, "e901469e34ea4fa8a92892c700ce7334": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_1bbefff27a0242dbb3be40be7b2f7be4", "msg_id": "", "outputs": [ { "data": { "text/html": "
% done (field decay = 1.78e-10) ━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━  32% -:--:--\n% done (field decay = 1.78e-10) ━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━  32% -:--:--
\n", "text/plain": "\r\u001b[2K% done (field decay = 1.78e-10) \u001b[38;2;249;38;114m━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m 32%\u001b[0m \u001b[36m-:--:--\u001b[0m\n% done (field decay = 1.78e-10) \u001b[38;2;249;38;114m━━━━━━━━━━━━\u001b[0m\u001b[38;2;249;38;114m╸\u001b[0m\u001b[38;5;237m━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m 32%\u001b[0m \u001b[36m-:--:--\u001b[0m" }, "metadata": {}, "output_type": "display_data" } ], "tabbable": null, "tooltip": null } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }