{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0",
   "metadata": {},
   "source": [
    "# Getting started: setting up your first quantum simulation problem\n",
    "\n",
    "To get familiar with the main concepts of QruiseML, you can work through this example notebook. We'll briefly explain how to define a drive and Hamiltonian, set up and solve a quantum problem, and plot the results. \n",
    "\n",
    "## Defining the Hamiltonian\n",
    "\n",
    "We describe the dynamics of a quantum system using a Hamiltonian of the form\n",
    "\n",
    "$$\n",
    "H_{\\text{total}} (t; p) = H_0 + H(t; p),\n",
    "$$\n",
    "\n",
    "where $H_0$ and $H(t, p)$ are the stationary and time-dependent parts, respectively, and $p$ represents the drive parameter set $p$.\n",
    "\n",
    "\n",
    "### Time-dependent drive functions\n",
    "\n",
    "The time-dependent part is constructed by combining drive functions with quantum operators. A drive function is a time-dependent control field applied to the system, which determines the evolution of the quantum state.\n",
    "\n",
    "For example, we could use a sinusoidal drive of the form\n",
    "\n",
    "$$\n",
    "f(t; \\{a, \\omega, \\phi\\}) = a \\sin(\\omega t + \\phi),\n",
    "$$\n",
    "\n",
    "where $a$ is the amplitude, $\\omega$ the frequency, and $\\phi$ the phase.\n",
    "\n",
    "In QruiseML, drive functions are defined as annotated Python functions. This means that each input parameter, as well as the function output, must have a type annotation. These annotations must use the types defined in the [`types`](../src/qruise/toolset/types.py) module in QruiseML.\n",
    "\n",
    "For example, we can define a sine drive and a cosine drive, where the inputs and the output are all 64-bit floating-point numbers:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:56.967675Z",
     "iopub.status.busy": "2026-08-20T10:23:56.967461Z",
     "iopub.status.idle": "2026-08-20T10:23:58.235643Z",
     "shell.execute_reply": "2026-08-20T10:23:58.234753Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from qruise.toolset.types import Float64\n",
    "\n",
    "\n",
    "# define sine drive\n",
    "def f(t: Float64, a: Float64, w: Float64, p: Float64) -> Float64:\n",
    "    return a * np.sin(w * t + p)\n",
    "\n",
    "\n",
    "# define cosine drive\n",
    "def g(t: Float64, a: Float64, w: Float64, p: Float64) -> Float64:\n",
    "    return a * np.cos(w * t + p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2",
   "metadata": {},
   "source": [
    "### Drive parameters and channels\n",
    "\n",
    "Next, we define the parameter values associated with each drive function. \n",
    "\n",
    "When working with multiple drives in QruiseML, we need to specify which parameters belong to which drive channel. This ensures that parameters with the same name &mdash; such as `a`, `w`, and `p` &mdash; are associated with the correct drive channel. We can do this by creating a `Parameters` object with two drive channels, `\"d1\"` and `\"d2\"`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:58.238529Z",
     "iopub.status.busy": "2026-08-20T10:23:58.238176Z",
     "iopub.status.idle": "2026-08-20T10:23:58.254578Z",
     "shell.execute_reply": "2026-08-20T10:23:58.253720Z"
    }
   },
   "outputs": [],
   "source": [
    "from qruise.toolset import Parameters\n",
    "\n",
    "ps = Parameters(\n",
    "    {\"d1\": {\"a\": 1.0, \"w\": 2.0, \"p\": 0.01}, \"d2\": {\"a\": 0.5, \"w\": 1.8, \"p\": -0.3}}\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4",
   "metadata": {},
   "source": [
    "We then use the `Drive` class to associate the parameters of each drive function (`f` and `g`) with their corresponding channel (`\"d1\"` and `\"d2\"`):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:58.256521Z",
     "iopub.status.busy": "2026-08-20T10:23:58.256345Z",
     "iopub.status.idle": "2026-08-20T10:23:58.536301Z",
     "shell.execute_reply": "2026-08-20T10:23:58.535371Z"
    }
   },
   "outputs": [],
   "source": [
    "from qruise.toolset import Drive\n",
    "\n",
    "drv1 = Drive(\"d1\", f)\n",
    "drv2 = Drive(\"d2\", g)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6",
   "metadata": {},
   "source": [
    "### Constructing the Hamiltonian \n",
    "\n",
    "The Hamiltonian is constructed in a similar way to `QuTiP`. We define the stationary part, `H0`, and the time-dependent part, which consists of pairs of drives ($d_n$) and quantum operators ($A_n$), e.g. \n",
    "\n",
    "$$\n",
    "(d_1, A_1), (d_2, A_2), \\cdots, (d_N, A_N).\n",
    "$$\n",
    "\n",
    "Let's construct the Hamiltonian\n",
    "\n",
    "$$\n",
    "H_{\\text{total}} (t; p) = \\sigma_z + d_1 \\sigma_x + d_2 \\sigma_y, \n",
    "$$\n",
    "\n",
    "where $\\sigma_{x,y,z}$ are Pauli operators. We instantiate this using the `Hamiltonian` class by passing the stationary part of the Hamiltonian together with a list\n",
    "of `(drive, operator)` pairs defining the time-dependent terms:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:58.538425Z",
     "iopub.status.busy": "2026-08-20T10:23:58.538249Z",
     "iopub.status.idle": "2026-08-20T10:23:58.543554Z",
     "shell.execute_reply": "2026-08-20T10:23:58.542743Z"
    }
   },
   "outputs": [],
   "source": [
    "import qutip as qt\n",
    "from qruise.toolset import Hamiltonian\n",
    "\n",
    "# define Pauli operators\n",
    "sx = qt.sigmax()\n",
    "sy = qt.sigmay()\n",
    "sz = qt.sigmaz()\n",
    "\n",
    "# define Hamiltonian\n",
    "H = Hamiltonian(sz, [(drv1, sx), (drv2, sy)])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8",
   "metadata": {},
   "source": [
    "## Defining the quantum simulation problem\n",
    "\n",
    "Now that we've defined our Hamiltonian, we can start setting up a quantum simulation problem. In QruiseML, we use the `Problem` class to group together the equations and parameters that govern the system. To instantiate the `Problem`, we need:\n",
    "\n",
    "- the equation that governs the dynamics (e.g. `\"Schroedinger\"` or `\"Master Equation\"`)\n",
    "- the Hamiltonian (`H`)\n",
    "- the initial qubit state (`u0`)\n",
    "- the time interval of the simulation (`t0` to `tfinal`)\n",
    "- the pulse parameters (`ps`)\n",
    "\n",
    "---\n",
    "\n",
    "**Note:** If you select `\"Master Equation\"`, the absence or presence of collapse operators (`c_ops`) determines whether the von Neumann or Lindblad equation is used.\n",
    "\n",
    "---\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:58.545475Z",
     "iopub.status.busy": "2026-08-20T10:23:58.545307Z",
     "iopub.status.idle": "2026-08-20T10:23:58.552462Z",
     "shell.execute_reply": "2026-08-20T10:23:58.551673Z"
    }
   },
   "outputs": [],
   "source": [
    "from qruise.toolset import Problem\n",
    "\n",
    "t0 = 0.0  # start time\n",
    "tfinal = 1.0  # end time\n",
    "ts = np.linspace(t0, tfinal, 100)  # to save the result at these timestamps\n",
    "u0 = qt.basis(2, 0)  # initial qubit state |0>\n",
    "\n",
    "prob = Problem(\"Schroedinger\", H, u0, (t0, tfinal), ps)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "10",
   "metadata": {},
   "source": [
    "## Starting a session and solving the problem\n",
    "\n",
    "The `Problem` object defines the quantum system we want to simulate,\n",
    "but it does not run the simulation itself. To do this, we need to create a `Session` and initialise the `Problem` object within it using `qsprob_init`. The session prepares the problem for numerical simulation and manages the solver execution."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "11",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:23:58.554413Z",
     "iopub.status.busy": "2026-08-20T10:23:58.554235Z",
     "iopub.status.idle": "2026-08-20T10:24:10.531676Z",
     "shell.execute_reply": "2026-08-20T10:24:10.530605Z"
    }
   },
   "outputs": [],
   "source": [
    "from qruise.toolset.session import Session\n",
    "\n",
    "sess = Session()\n",
    "sess.qsprob_init(prob)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "12",
   "metadata": {},
   "source": [
    "To compute the system time evolution, we use the `evolve` method to solve the quantum simulation problem numerically. \n",
    "\n",
    "In the implementation below, `\"Tsit5\"` specifies the ODE algorithm, `reltol`\n",
    "and `abstol` the numerical tolerances, and `saveat` the times at which the result is stored. Other solver options can also be passed as keyword arguments."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "13",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:24:10.534190Z",
     "iopub.status.busy": "2026-08-20T10:24:10.533985Z",
     "iopub.status.idle": "2026-08-20T10:24:17.115688Z",
     "shell.execute_reply": "2026-08-20T10:24:17.114889Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\r",
      "\u001b[KODE [                                        ]   0%\r",
      "\u001b[KODE [########################################] 100%\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in notebooks */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(\n",
       "    --jp-content-font-color0,\n",
       "    var(--pst-color-text-base rgba(0, 0, 0, 1))\n",
       "  );\n",
       "  --xr-font-color2: var(\n",
       "    --jp-content-font-color2,\n",
       "    var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n",
       "  );\n",
       "  --xr-font-color3: var(\n",
       "    --jp-content-font-color3,\n",
       "    var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n",
       "  );\n",
       "  --xr-border-color: var(\n",
       "    --jp-border-color2,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n",
       "  );\n",
       "  --xr-disabled-color: var(\n",
       "    --jp-layout-color3,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n",
       "  );\n",
       "  --xr-background-color: var(\n",
       "    --jp-layout-color0,\n",
       "    var(--pst-color-on-background, white)\n",
       "  );\n",
       "  --xr-background-color-row-even: var(\n",
       "    --jp-layout-color1,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n",
       "  );\n",
       "  --xr-background-color-row-odd: var(\n",
       "    --jp-layout-color2,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n",
       "  );\n",
       "}\n",
       "\n",
       "html[theme=\"dark\"],\n",
       "html[data-theme=\"dark\"],\n",
       "body[data-theme=\"dark\"],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: var(\n",
       "    --jp-content-font-color0,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 1))\n",
       "  );\n",
       "  --xr-font-color2: var(\n",
       "    --jp-content-font-color2,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n",
       "  );\n",
       "  --xr-font-color3: var(\n",
       "    --jp-content-font-color3,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n",
       "  );\n",
       "  --xr-border-color: var(\n",
       "    --jp-border-color2,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n",
       "  );\n",
       "  --xr-disabled-color: var(\n",
       "    --jp-layout-color3,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n",
       "  );\n",
       "  --xr-background-color: var(\n",
       "    --jp-layout-color0,\n",
       "    var(--pst-color-on-background, #111111)\n",
       "  );\n",
       "  --xr-background-color-row-even: var(\n",
       "    --jp-layout-color1,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n",
       "  );\n",
       "  --xr-background-color-row-odd: var(\n",
       "    --jp-layout-color2,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n",
       "  );\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "  line-height: 1.6;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "  margin-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-obj-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-group-box-contents > label {\n",
       "  color: var(--xr-font-color2);\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
       "  margin-block-start: 0;\n",
       "  margin-block-end: 0;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item > input,\n",
       ".xr-group-box-contents > input,\n",
       ".xr-array-wrap > input {\n",
       "  display: block;\n",
       "  opacity: 0;\n",
       "  height: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-section-item > input + label,\n",
       ".xr-var-item > input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item > input:enabled + label,\n",
       ".xr-var-item > input:enabled + label,\n",
       ".xr-array-wrap > input:enabled + label,\n",
       ".xr-group-box-contents > input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item > input:focus-visible + label,\n",
       ".xr-var-item > input:focus-visible + label,\n",
       ".xr-array-wrap > input:focus-visible + label,\n",
       ".xr-group-box-contents > input:focus-visible + label {\n",
       "  outline: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item > input:enabled + label:hover,\n",
       ".xr-var-item > input:enabled + label:hover,\n",
       ".xr-array-wrap > input:enabled + label:hover,\n",
       ".xr-group-box-contents > input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "  white-space: nowrap;\n",
       "}\n",
       "\n",
       ".xr-section-summary > em {\n",
       "  font-weight: normal;\n",
       "}\n",
       "\n",
       ".xr-span-grid {\n",
       "  grid-column-end: -1;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.3em;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.6em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: \"►\";\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: \"▼\";\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details,\n",
       ".xr-group-box-contents > label {\n",
       "  padding-top: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  grid-column: 1 / -1;\n",
       "  margin-top: 4px;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in ~ .xr-section-details {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-children {\n",
       "  display: inline-grid;\n",
       "  grid-template-columns: 100%;\n",
       "  grid-column: 1 / -1;\n",
       "  padding-top: 4px;\n",
       "}\n",
       "\n",
       ".xr-group-box {\n",
       "  display: inline-grid;\n",
       "  grid-template-columns: 0px 30px auto;\n",
       "}\n",
       "\n",
       ".xr-group-box-vline {\n",
       "  grid-column-start: 1;\n",
       "  border-right: 0.2em solid;\n",
       "  border-color: var(--xr-border-color);\n",
       "  width: 0px;\n",
       "}\n",
       "\n",
       ".xr-group-box-hline {\n",
       "  grid-column-start: 2;\n",
       "  grid-row-start: 1;\n",
       "  height: 1em;\n",
       "  width: 26px;\n",
       "  border-bottom: 0.2em solid;\n",
       "  border-color: var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-group-box-contents {\n",
       "  grid-column-start: 3;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > label::before {\n",
       "  content: \"📂\";\n",
       "  padding-right: 0.3em;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label::before {\n",
       "  content: \"📁\";\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label {\n",
       "  padding-bottom: 0px;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked ~ .xr-sections {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-group-box-ellipsis {\n",
       "  font-size: 1.4em;\n",
       "  font-weight: 900;\n",
       "  color: var(--xr-font-color2);\n",
       "  letter-spacing: 0.15em;\n",
       "  cursor: default;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: \"(\";\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: \")\";\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: \",\";\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  border-color: var(--xr-background-color-row-odd);\n",
       "  margin-bottom: 0;\n",
       "  padding-top: 2px;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "  border-color: var(--xr-background-color-row-even);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  border-top: 2px dotted var(--xr-background-color);\n",
       "  padding-bottom: 20px !important;\n",
       "  padding-top: 10px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in + label,\n",
       ".xr-var-data-in + label,\n",
       ".xr-index-data-in + label {\n",
       "  padding: 0 1px;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-data > pre,\n",
       ".xr-index-data > pre,\n",
       ".xr-var-data > table > tbody > tr {\n",
       "  background-color: transparent !important;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n",
       ".xr-var-data-in:checked + label > .xr-icon-database,\n",
       ".xr-index-data-in:checked + label > .xr-icon-database {\n",
       "  color: var(--xr-font-color0);\n",
       "  filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n",
       "  stroke-width: 0.8px;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 4kB\n",
       "Dimensions:  (time: 100, row: 2)\n",
       "Coordinates:\n",
       "  * time     (time) float64 800B 0.0 0.0101 0.0202 0.0303 ... 0.9798 0.9899 1.0\n",
       "Dimensions without coordinates: row\n",
       "Data variables:\n",
       "    qstates  (time, row) complex128 3kB (1+0j) ... (0.13077861932833706-0.479...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e2d43398-7f41-45c3-885d-35612937daed' class='xr-section-summary-in' type='checkbox' disabled /><label for='section-e2d43398-7f41-45c3-885d-35612937daed' class='xr-section-summary'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 100</li><li><span>row</span>: 2</li></ul></div></li><li class='xr-section-item'><input id='section-7f9715a4-64f2-45d6-97b7-233721ee626a' class='xr-section-summary-in' type='checkbox' checked /><label for='section-7f9715a4-64f2-45d6-97b7-233721ee626a' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 0.0101 0.0202 ... 0.9899 1.0</div><input id='attrs-21d365d6-1a2c-4404-be36-e5ccc2b97932' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-21d365d6-1a2c-4404-be36-e5ccc2b97932' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-65f48a0f-c94d-4a1f-ac0b-2e94bcc1bd12' class='xr-var-data-in' type='checkbox'><label for='data-65f48a0f-c94d-4a1f-ac0b-2e94bcc1bd12' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0.      , 0.010101, 0.020202, 0.030303, 0.040404, 0.050505, 0.060606,\n",
       "       0.070707, 0.080808, 0.090909, 0.10101 , 0.111111, 0.121212, 0.131313,\n",
       "       0.141414, 0.151515, 0.161616, 0.171717, 0.181818, 0.191919, 0.20202 ,\n",
       "       0.212121, 0.222222, 0.232323, 0.242424, 0.252525, 0.262626, 0.272727,\n",
       "       0.282828, 0.292929, 0.30303 , 0.313131, 0.323232, 0.333333, 0.343434,\n",
       "       0.353535, 0.363636, 0.373737, 0.383838, 0.393939, 0.40404 , 0.414141,\n",
       "       0.424242, 0.434343, 0.444444, 0.454545, 0.464646, 0.474747, 0.484848,\n",
       "       0.494949, 0.505051, 0.515152, 0.525253, 0.535354, 0.545455, 0.555556,\n",
       "       0.565657, 0.575758, 0.585859, 0.59596 , 0.606061, 0.616162, 0.626263,\n",
       "       0.636364, 0.646465, 0.656566, 0.666667, 0.676768, 0.686869, 0.69697 ,\n",
       "       0.707071, 0.717172, 0.727273, 0.737374, 0.747475, 0.757576, 0.767677,\n",
       "       0.777778, 0.787879, 0.79798 , 0.808081, 0.818182, 0.828283, 0.838384,\n",
       "       0.848485, 0.858586, 0.868687, 0.878788, 0.888889, 0.89899 , 0.909091,\n",
       "       0.919192, 0.929293, 0.939394, 0.949495, 0.959596, 0.969697, 0.979798,\n",
       "       0.989899, 1.      ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-da4ce9ca-ccea-4f83-bf05-36ba6de40869' class='xr-section-summary-in' type='checkbox' checked /><label for='section-da4ce9ca-ccea-4f83-bf05-36ba6de40869' class='xr-section-summary' title='Expand/collapse section'>Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>qstates</span></div><div class='xr-var-dims'>(time, row)</div><div class='xr-var-dtype'>complex128</div><div class='xr-var-preview xr-preview'>(1+0j) ... (0.13077861932833706-...</div><input id='attrs-0cb72f67-6f6b-46d5-8d30-e44f4e8a3d10' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cb72f67-6f6b-46d5-8d30-e44f4e8a3d10' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-03e4f9b0-6231-4a6f-8d2f-a66db2bdba49' class='xr-var-data-in' type='checkbox'><label for='data-03e4f9b0-6231-4a6f-8d2f-a66db2bdba49' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.        +0.00000000e+00j, 0.        +0.00000000e+00j],\n",
       "       [0.99993726-1.01009609e-02j, 0.00483779-2.03063064e-04j],\n",
       "       [0.9997487 -2.02016343e-02j, 0.00969845-6.10299596e-04j],\n",
       "       [0.99943374-3.03017242e-02j, 0.01457769-1.22167954e-03j],\n",
       "       [0.99899174-4.04009189e-02j, 0.01947121-2.03700442e-03j],\n",
       "       [0.99842195-5.04988906e-02j, 0.02437472-3.05590733e-03j],\n",
       "       [0.99772359-6.05952956e-02j, 0.02928391-4.27785294e-03j],\n",
       "       [0.99689579-7.06897635e-02j, 0.03419448-5.70213641e-03j],\n",
       "       [0.99593761-8.07818988e-02j, 0.03910213-7.32788269e-03j],\n",
       "       [0.99484801-9.08713012e-02j, 0.04400254-9.15404946e-03j],\n",
       "       [0.9936259 -1.00957531e-01j, 0.04889138-1.11794246e-02j],\n",
       "       [0.99227013-1.11040109e-01j, 0.05376438-1.34026262e-02j],\n",
       "       [0.99077952-1.21118513e-01j, 0.05861728-1.58221025e-02j],\n",
       "       [0.98915284-1.31192182e-01j, 0.06344583-1.84361318e-02j],\n",
       "       [0.9873888 -1.41260513e-01j, 0.06824582-2.12428225e-02j],\n",
       "       [0.98548606-1.51322863e-01j, 0.07301308-2.42401133e-02j],\n",
       "       [0.98344325-1.61378549e-01j, 0.07774343-2.74257730e-02j],\n",
       "       [0.98125896-1.71426846e-01j, 0.08243274-3.07974005e-02j],\n",
       "       [0.97893169-1.81466988e-01j, 0.0870769 -3.43524247e-02j],\n",
       "       [0.97645998-1.91498163e-01j, 0.09167186-3.80881181e-02j],\n",
       "...\n",
       "       [0.52148613-7.23431691e-01j, 0.17704609-4.16358393e-01j],\n",
       "       [0.50957398-7.29575667e-01j, 0.17498457-4.21229774e-01j],\n",
       "       [0.49757749-7.35601354e-01j, 0.17285486-4.25944279e-01j],\n",
       "       [0.48550135-7.41508011e-01j, 0.17066144-4.30498347e-01j],\n",
       "       [0.47335023-7.47294977e-01j, 0.16840884-4.34888623e-01j],\n",
       "       [0.46112883-7.52961669e-01j, 0.16610168-4.39111968e-01j],\n",
       "       [0.44884186-7.58507585e-01j, 0.16374459-4.43165451e-01j],\n",
       "       [0.43649404-7.63932301e-01j, 0.16134229-4.47046352e-01j],\n",
       "       [0.42409007-7.69235470e-01j, 0.15889954-4.50752161e-01j],\n",
       "       [0.41163469-7.74416827e-01j, 0.15642117-4.54280581e-01j],\n",
       "       [0.39913263-7.79476185e-01j, 0.15391204-4.57629523e-01j],\n",
       "       [0.38658863-7.84413437e-01j, 0.1513771 -4.60797112e-01j],\n",
       "       [0.37400745-7.89228553e-01j, 0.14882133-4.63781681e-01j],\n",
       "       [0.36139384-7.93921584e-01j, 0.14624977-4.66581775e-01j],\n",
       "       [0.34875256-7.98492658e-01j, 0.14366754-4.69196149e-01j],\n",
       "       [0.33608839-8.02941986e-01j, 0.14107978-4.71623769e-01j],\n",
       "       [0.32340612-8.07269853e-01j, 0.13849171-4.73863812e-01j],\n",
       "       [0.31071051-8.11476626e-01j, 0.1359086 -4.75915666e-01j],\n",
       "       [0.29800639-8.15562752e-01j, 0.13333577-4.77778930e-01j],\n",
       "       [0.28529853-8.19528755e-01j, 0.13077862-4.79453412e-01j]])</pre></div></li></ul></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset> Size: 4kB\n",
       "Dimensions:  (time: 100, row: 2)\n",
       "Coordinates:\n",
       "  * time     (time) float64 800B 0.0 0.0101 0.0202 0.0303 ... 0.9798 0.9899 1.0\n",
       "Dimensions without coordinates: row\n",
       "Data variables:\n",
       "    qstates  (time, row) complex128 3kB (1+0j) ... (0.13077861932833706-0.479..."
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ds = sess.evolve(\"Tsit5\", reltol=1e-3, abstol=1e-4, saveat=ts)\n",
    "ds"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "14",
   "metadata": {},
   "source": [
    "## Plotting the simulation results\n",
    "\n",
    "The result returned by `Session.evolve()` is an `xarray.Dataset` object. It contains coordinates corresponding to the time axis and quantum-state labels (here, $|0\\rangle$ and $|1\\rangle$), as well as the variable `qstates`, which stores either the state vector or density matrix of the system.\n",
    "\n",
    "We can also add derived quantities to the dataset. For instance, we can use it to compute the state populations and store them as a new variable. We can also rename the `row` dimension to `state` and assign the basis-state labels $|0\\rangle$ and $|1\\rangle$ for clearer indexing and visualisation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "15",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:24:17.117547Z",
     "iopub.status.busy": "2026-08-20T10:24:17.117369Z",
     "iopub.status.idle": "2026-08-20T10:24:17.134336Z",
     "shell.execute_reply": "2026-08-20T10:24:17.133537Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in notebooks */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(\n",
       "    --jp-content-font-color0,\n",
       "    var(--pst-color-text-base rgba(0, 0, 0, 1))\n",
       "  );\n",
       "  --xr-font-color2: var(\n",
       "    --jp-content-font-color2,\n",
       "    var(--pst-color-text-base, rgba(0, 0, 0, 0.54))\n",
       "  );\n",
       "  --xr-font-color3: var(\n",
       "    --jp-content-font-color3,\n",
       "    var(--pst-color-text-base, rgba(0, 0, 0, 0.38))\n",
       "  );\n",
       "  --xr-border-color: var(\n",
       "    --jp-border-color2,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 10))\n",
       "  );\n",
       "  --xr-disabled-color: var(\n",
       "    --jp-layout-color3,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 40))\n",
       "  );\n",
       "  --xr-background-color: var(\n",
       "    --jp-layout-color0,\n",
       "    var(--pst-color-on-background, white)\n",
       "  );\n",
       "  --xr-background-color-row-even: var(\n",
       "    --jp-layout-color1,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 5))\n",
       "  );\n",
       "  --xr-background-color-row-odd: var(\n",
       "    --jp-layout-color2,\n",
       "    hsl(from var(--pst-color-on-background, white) h s calc(l - 15))\n",
       "  );\n",
       "}\n",
       "\n",
       "html[theme=\"dark\"],\n",
       "html[data-theme=\"dark\"],\n",
       "body[data-theme=\"dark\"],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: var(\n",
       "    --jp-content-font-color0,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 1))\n",
       "  );\n",
       "  --xr-font-color2: var(\n",
       "    --jp-content-font-color2,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 0.54))\n",
       "  );\n",
       "  --xr-font-color3: var(\n",
       "    --jp-content-font-color3,\n",
       "    var(--pst-color-text-base, rgba(255, 255, 255, 0.38))\n",
       "  );\n",
       "  --xr-border-color: var(\n",
       "    --jp-border-color2,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 10))\n",
       "  );\n",
       "  --xr-disabled-color: var(\n",
       "    --jp-layout-color3,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 40))\n",
       "  );\n",
       "  --xr-background-color: var(\n",
       "    --jp-layout-color0,\n",
       "    var(--pst-color-on-background, #111111)\n",
       "  );\n",
       "  --xr-background-color-row-even: var(\n",
       "    --jp-layout-color1,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 5))\n",
       "  );\n",
       "  --xr-background-color-row-odd: var(\n",
       "    --jp-layout-color2,\n",
       "    hsl(from var(--pst-color-on-background, #111111) h s calc(l + 15))\n",
       "  );\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "  line-height: 1.6;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "  margin-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-obj-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-group-box-contents > label {\n",
       "  color: var(--xr-font-color2);\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
       "  margin-block-start: 0;\n",
       "  margin-block-end: 0;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item > input,\n",
       ".xr-group-box-contents > input,\n",
       ".xr-array-wrap > input {\n",
       "  display: block;\n",
       "  opacity: 0;\n",
       "  height: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-section-item > input + label,\n",
       ".xr-var-item > input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item > input:enabled + label,\n",
       ".xr-var-item > input:enabled + label,\n",
       ".xr-array-wrap > input:enabled + label,\n",
       ".xr-group-box-contents > input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item > input:focus-visible + label,\n",
       ".xr-var-item > input:focus-visible + label,\n",
       ".xr-array-wrap > input:focus-visible + label,\n",
       ".xr-group-box-contents > input:focus-visible + label {\n",
       "  outline: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item > input:enabled + label:hover,\n",
       ".xr-var-item > input:enabled + label:hover,\n",
       ".xr-array-wrap > input:enabled + label:hover,\n",
       ".xr-group-box-contents > input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "  white-space: nowrap;\n",
       "}\n",
       "\n",
       ".xr-section-summary > em {\n",
       "  font-weight: normal;\n",
       "}\n",
       "\n",
       ".xr-span-grid {\n",
       "  grid-column-end: -1;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.3em;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.6em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: \"►\";\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: \"▼\";\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details,\n",
       ".xr-group-box-contents > label {\n",
       "  padding-top: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  grid-column: 1 / -1;\n",
       "  margin-top: 4px;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in ~ .xr-section-details {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-children {\n",
       "  display: inline-grid;\n",
       "  grid-template-columns: 100%;\n",
       "  grid-column: 1 / -1;\n",
       "  padding-top: 4px;\n",
       "}\n",
       "\n",
       ".xr-group-box {\n",
       "  display: inline-grid;\n",
       "  grid-template-columns: 0px 30px auto;\n",
       "}\n",
       "\n",
       ".xr-group-box-vline {\n",
       "  grid-column-start: 1;\n",
       "  border-right: 0.2em solid;\n",
       "  border-color: var(--xr-border-color);\n",
       "  width: 0px;\n",
       "}\n",
       "\n",
       ".xr-group-box-hline {\n",
       "  grid-column-start: 2;\n",
       "  grid-row-start: 1;\n",
       "  height: 1em;\n",
       "  width: 26px;\n",
       "  border-bottom: 0.2em solid;\n",
       "  border-color: var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-group-box-contents {\n",
       "  grid-column-start: 3;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > label::before {\n",
       "  content: \"📂\";\n",
       "  padding-right: 0.3em;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label::before {\n",
       "  content: \"📁\";\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked + label {\n",
       "  padding-bottom: 0px;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input:checked ~ .xr-sections {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-group-box-contents > input + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-group-box-ellipsis {\n",
       "  font-size: 1.4em;\n",
       "  font-weight: 900;\n",
       "  color: var(--xr-font-color2);\n",
       "  letter-spacing: 0.15em;\n",
       "  cursor: default;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: \"(\";\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: \")\";\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: \",\";\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  border-color: var(--xr-background-color-row-odd);\n",
       "  margin-bottom: 0;\n",
       "  padding-top: 2px;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "  border-color: var(--xr-background-color-row-even);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  border-top: 2px dotted var(--xr-background-color);\n",
       "  padding-bottom: 20px !important;\n",
       "  padding-top: 10px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in + label,\n",
       ".xr-var-data-in + label,\n",
       ".xr-index-data-in + label {\n",
       "  padding: 0 1px;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-data > pre,\n",
       ".xr-index-data > pre,\n",
       ".xr-var-data > table > tbody > tr {\n",
       "  background-color: transparent !important;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked + label > .xr-icon-file-text2,\n",
       ".xr-var-data-in:checked + label > .xr-icon-database,\n",
       ".xr-index-data-in:checked + label > .xr-icon-database {\n",
       "  color: var(--xr-font-color0);\n",
       "  filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n",
       "  stroke-width: 0.8px;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 6kB\n",
       "Dimensions:     (time: 100, state: 2)\n",
       "Coordinates:\n",
       "  * time        (time) float64 800B 0.0 0.0101 0.0202 ... 0.9798 0.9899 1.0\n",
       "  * state       (state) &lt;U3 24B &#x27;|0&gt;&#x27; &#x27;|1&gt;&#x27;\n",
       "Data variables:\n",
       "    qstates     (time, state) complex128 3kB (1+0j) ... (0.13077861932833706-...\n",
       "    population  (time, state) float64 2kB 1.0 0.0 1.0 ... 0.2461 0.753 0.247</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-b26bb704-3efa-4ed0-bb3c-4a733ee2367b' class='xr-section-summary-in' type='checkbox' disabled /><label for='section-b26bb704-3efa-4ed0-bb3c-4a733ee2367b' class='xr-section-summary'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 100</li><li><span class='xr-has-index'>state</span>: 2</li></ul></div></li><li class='xr-section-item'><input id='section-b8bd7023-427e-433e-b903-8baa06456b89' class='xr-section-summary-in' type='checkbox' checked /><label for='section-b8bd7023-427e-433e-b903-8baa06456b89' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 0.0101 0.0202 ... 0.9899 1.0</div><input id='attrs-96c4eade-4d0d-406e-97ee-3d1d0041daca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-96c4eade-4d0d-406e-97ee-3d1d0041daca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-af25d4fc-ca86-4281-9a14-172fee9aff2c' class='xr-var-data-in' type='checkbox'><label for='data-af25d4fc-ca86-4281-9a14-172fee9aff2c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0.      , 0.010101, 0.020202, 0.030303, 0.040404, 0.050505, 0.060606,\n",
       "       0.070707, 0.080808, 0.090909, 0.10101 , 0.111111, 0.121212, 0.131313,\n",
       "       0.141414, 0.151515, 0.161616, 0.171717, 0.181818, 0.191919, 0.20202 ,\n",
       "       0.212121, 0.222222, 0.232323, 0.242424, 0.252525, 0.262626, 0.272727,\n",
       "       0.282828, 0.292929, 0.30303 , 0.313131, 0.323232, 0.333333, 0.343434,\n",
       "       0.353535, 0.363636, 0.373737, 0.383838, 0.393939, 0.40404 , 0.414141,\n",
       "       0.424242, 0.434343, 0.444444, 0.454545, 0.464646, 0.474747, 0.484848,\n",
       "       0.494949, 0.505051, 0.515152, 0.525253, 0.535354, 0.545455, 0.555556,\n",
       "       0.565657, 0.575758, 0.585859, 0.59596 , 0.606061, 0.616162, 0.626263,\n",
       "       0.636364, 0.646465, 0.656566, 0.666667, 0.676768, 0.686869, 0.69697 ,\n",
       "       0.707071, 0.717172, 0.727273, 0.737374, 0.747475, 0.757576, 0.767677,\n",
       "       0.777778, 0.787879, 0.79798 , 0.808081, 0.818182, 0.828283, 0.838384,\n",
       "       0.848485, 0.858586, 0.868687, 0.878788, 0.888889, 0.89899 , 0.909091,\n",
       "       0.919192, 0.929293, 0.939394, 0.949495, 0.959596, 0.969697, 0.979798,\n",
       "       0.989899, 1.      ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>state</span></div><div class='xr-var-dims'>(state)</div><div class='xr-var-dtype'>&lt;U3</div><div class='xr-var-preview xr-preview'>&#x27;|0&gt;&#x27; &#x27;|1&gt;&#x27;</div><input id='attrs-1b1da718-d945-4c07-bfc6-d7a588e57168' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1b1da718-d945-4c07-bfc6-d7a588e57168' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1d4901e4-f577-4ba0-a39f-00107dcb6d24' class='xr-var-data-in' type='checkbox'><label for='data-1d4901e4-f577-4ba0-a39f-00107dcb6d24' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;|0&gt;&#x27;, &#x27;|1&gt;&#x27;], dtype=&#x27;&lt;U3&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-171d1d80-5337-458d-be4e-dcf4e5d61e99' class='xr-section-summary-in' type='checkbox' checked /><label for='section-171d1d80-5337-458d-be4e-dcf4e5d61e99' class='xr-section-summary' title='Expand/collapse section'>Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>qstates</span></div><div class='xr-var-dims'>(time, state)</div><div class='xr-var-dtype'>complex128</div><div class='xr-var-preview xr-preview'>(1+0j) ... (0.13077861932833706-...</div><input id='attrs-b43fb757-4670-4b37-9a33-5d141f763e70' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b43fb757-4670-4b37-9a33-5d141f763e70' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3ceb78f6-ad6f-43c1-a77b-d1a69faef31b' class='xr-var-data-in' type='checkbox'><label for='data-3ceb78f6-ad6f-43c1-a77b-d1a69faef31b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.        +0.00000000e+00j, 0.        +0.00000000e+00j],\n",
       "       [0.99993726-1.01009609e-02j, 0.00483779-2.03063064e-04j],\n",
       "       [0.9997487 -2.02016343e-02j, 0.00969845-6.10299596e-04j],\n",
       "       [0.99943374-3.03017242e-02j, 0.01457769-1.22167954e-03j],\n",
       "       [0.99899174-4.04009189e-02j, 0.01947121-2.03700442e-03j],\n",
       "       [0.99842195-5.04988906e-02j, 0.02437472-3.05590733e-03j],\n",
       "       [0.99772359-6.05952956e-02j, 0.02928391-4.27785294e-03j],\n",
       "       [0.99689579-7.06897635e-02j, 0.03419448-5.70213641e-03j],\n",
       "       [0.99593761-8.07818988e-02j, 0.03910213-7.32788269e-03j],\n",
       "       [0.99484801-9.08713012e-02j, 0.04400254-9.15404946e-03j],\n",
       "       [0.9936259 -1.00957531e-01j, 0.04889138-1.11794246e-02j],\n",
       "       [0.99227013-1.11040109e-01j, 0.05376438-1.34026262e-02j],\n",
       "       [0.99077952-1.21118513e-01j, 0.05861728-1.58221025e-02j],\n",
       "       [0.98915284-1.31192182e-01j, 0.06344583-1.84361318e-02j],\n",
       "       [0.9873888 -1.41260513e-01j, 0.06824582-2.12428225e-02j],\n",
       "       [0.98548606-1.51322863e-01j, 0.07301308-2.42401133e-02j],\n",
       "       [0.98344325-1.61378549e-01j, 0.07774343-2.74257730e-02j],\n",
       "       [0.98125896-1.71426846e-01j, 0.08243274-3.07974005e-02j],\n",
       "       [0.97893169-1.81466988e-01j, 0.0870769 -3.43524247e-02j],\n",
       "       [0.97645998-1.91498163e-01j, 0.09167186-3.80881181e-02j],\n",
       "...\n",
       "       [0.52148613-7.23431691e-01j, 0.17704609-4.16358393e-01j],\n",
       "       [0.50957398-7.29575667e-01j, 0.17498457-4.21229774e-01j],\n",
       "       [0.49757749-7.35601354e-01j, 0.17285486-4.25944279e-01j],\n",
       "       [0.48550135-7.41508011e-01j, 0.17066144-4.30498347e-01j],\n",
       "       [0.47335023-7.47294977e-01j, 0.16840884-4.34888623e-01j],\n",
       "       [0.46112883-7.52961669e-01j, 0.16610168-4.39111968e-01j],\n",
       "       [0.44884186-7.58507585e-01j, 0.16374459-4.43165451e-01j],\n",
       "       [0.43649404-7.63932301e-01j, 0.16134229-4.47046352e-01j],\n",
       "       [0.42409007-7.69235470e-01j, 0.15889954-4.50752161e-01j],\n",
       "       [0.41163469-7.74416827e-01j, 0.15642117-4.54280581e-01j],\n",
       "       [0.39913263-7.79476185e-01j, 0.15391204-4.57629523e-01j],\n",
       "       [0.38658863-7.84413437e-01j, 0.1513771 -4.60797112e-01j],\n",
       "       [0.37400745-7.89228553e-01j, 0.14882133-4.63781681e-01j],\n",
       "       [0.36139384-7.93921584e-01j, 0.14624977-4.66581775e-01j],\n",
       "       [0.34875256-7.98492658e-01j, 0.14366754-4.69196149e-01j],\n",
       "       [0.33608839-8.02941986e-01j, 0.14107978-4.71623769e-01j],\n",
       "       [0.32340612-8.07269853e-01j, 0.13849171-4.73863812e-01j],\n",
       "       [0.31071051-8.11476626e-01j, 0.1359086 -4.75915666e-01j],\n",
       "       [0.29800639-8.15562752e-01j, 0.13333577-4.77778930e-01j],\n",
       "       [0.28529853-8.19528755e-01j, 0.13077862-4.79453412e-01j]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>population</span></div><div class='xr-var-dims'>(time, state)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.0 0.0 1.0 ... 0.2461 0.753 0.247</div><input id='attrs-35a2d345-7e13-4f27-b8ea-0eafc6c1871a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-35a2d345-7e13-4f27-b8ea-0eafc6c1871a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-623780e1-3c17-474b-a574-858cf38564a5' class='xr-var-data-in' type='checkbox'><label for='data-623780e1-3c17-474b-a574-858cf38564a5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.00000000e+00, 0.00000000e+00],\n",
       "       [9.99976556e-01, 2.34454589e-05],\n",
       "       [9.99905571e-01, 9.44323629e-05],\n",
       "       [9.99786000e-01, 2.14001407e-04],\n",
       "       [9.99616721e-01, 3.83277375e-04],\n",
       "       [9.99396533e-01, 6.03465532e-04],\n",
       "       [9.99124152e-01, 8.75847339e-04],\n",
       "       [9.98798252e-01, 1.20177671e-03],\n",
       "       [9.98417433e-01, 1.58267465e-03],\n",
       "       [9.97980153e-01, 2.02001998e-03],\n",
       "       [9.97484846e-01, 2.51534695e-03],\n",
       "       [9.96929920e-01, 3.07023937e-03],\n",
       "       [9.96313760e-01, 3.68632412e-03],\n",
       "       [9.95634730e-01, 4.36526397e-03],\n",
       "       [9.94891166e-01, 5.10874986e-03],\n",
       "       [9.94081383e-01, 5.91849255e-03],\n",
       "       [9.93203671e-01, 6.79621370e-03],\n",
       "       [9.92256300e-01, 7.74363642e-03],\n",
       "       [9.91237517e-01, 8.76247528e-03],\n",
       "       [9.90145639e-01, 9.85443379e-03],\n",
       "...\n",
       "       [7.95301193e-01, 2.04699631e-01],\n",
       "       [7.91946297e-01, 2.08054123e-01],\n",
       "       [7.88692714e-01, 2.11307332e-01],\n",
       "       [7.85545687e-01, 2.14454152e-01],\n",
       "       [7.82510218e-01, 2.17489653e-01],\n",
       "       [7.79591074e-01, 2.20409088e-01],\n",
       "       [7.76792776e-01, 2.23207908e-01],\n",
       "       [7.74119604e-01, 2.25881775e-01],\n",
       "       [7.71575596e-01, 2.28426575e-01],\n",
       "       [7.69164540e-01, 2.30838427e-01],\n",
       "       [7.66889980e-01, 2.33113697e-01],\n",
       "       [7.64755212e-01, 2.35249004e-01],\n",
       "       [7.62763282e-01, 2.37241235e-01],\n",
       "       [7.60916988e-01, 2.39087548e-01],\n",
       "       [7.59218875e-01, 2.40785387e-01],\n",
       "       [7.57671241e-01, 2.42332482e-01],\n",
       "       [7.56276131e-01, 2.43726865e-01],\n",
       "       [7.55035339e-01, 2.44966868e-01],\n",
       "       [7.53950408e-01, 2.46051135e-01],\n",
       "       [7.53022633e-01, 2.46978622e-01]])</pre></div></li></ul></div></li></ul></div></div>"
      ],
      "text/plain": [
       "<xarray.Dataset> Size: 6kB\n",
       "Dimensions:     (time: 100, state: 2)\n",
       "Coordinates:\n",
       "  * time        (time) float64 800B 0.0 0.0101 0.0202 ... 0.9798 0.9899 1.0\n",
       "  * state       (state) <U3 24B '|0>' '|1>'\n",
       "Data variables:\n",
       "    qstates     (time, state) complex128 3kB (1+0j) ... (0.13077861932833706-...\n",
       "    population  (time, state) float64 2kB 1.0 0.0 1.0 ... 0.2461 0.753 0.247"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ds[\"population\"] = np.abs(ds[\"qstates\"]) ** 2  # calculate the population\n",
    "\n",
    "ds = ds.rename({\"row\": \"state\"})  # rename the dimension \"row\" to \"states\"\n",
    "ds = ds.assign_coords(state=[r\"|0>\", r\"|1>\"])  # assign labels to the dimensions\n",
    "ds"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "16",
   "metadata": {},
   "source": [
    "`xarray` provides different backends to conveniently plot the result. For example, we can use `hvplot` with the native `matplotlib` backend to plot the population of each state:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "17",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-08-20T10:24:17.136178Z",
     "iopub.status.busy": "2026-08-20T10:24:17.136012Z",
     "iopub.status.idle": "2026-08-20T10:24:20.646368Z",
     "shell.execute_reply": "2026-08-20T10:24:20.645532Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
       "*[data-root-id] > * {\n",
       "  box-sizing: border-box;\n",
       "  font-family: var(--jp-ui-font-family);\n",
       "  font-size: var(--jp-ui-font-size1);\n",
       "  color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n",
       "}\n",
       "\n",
       "/* Override VSCode background color */\n",
       ".cell-output-ipywidget-background:has(\n",
       "  > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n",
       "),\n",
       ".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n",
       "  background-color: transparent !important;\n",
       "}\n",
       "</style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  const force = true;\n",
       "  const version = '3.9.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n",
       "  const reloading = false;\n",
       "  const Bokeh = root.Bokeh;\n",
       "  const BK_RE = /^https:\\/\\/cdn\\.bokeh\\.org\\/bokeh\\/(release|dev)\\/bokeh-/;\n",
       "  const PN_RE = /^https:\\/\\/cdn\\.holoviz\\.org\\/panel\\/[^/]+\\/dist\\/panel/i;\n",
       "\n",
       "  // Set a timeout for this load but only if we are not already initializing\n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks;\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, js_modules, js_exports, Bokeh, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "    if (js_modules == null) js_modules = [];\n",
       "    if (js_exports == null) js_exports = {};\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      // Don't load bokeh if it is still initializing\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n",
       "      // There is nothing to load\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "    window._bokeh_on_load = on_load\n",
       "\n",
       "    function on_error(e) {\n",
       "      const src_el = e.srcElement\n",
       "      console.error(\"failed to load \" + (src_el.href || src_el.src));\n",
       "    }\n",
       "\n",
       "    const skip = [];\n",
       "    if (window.requirejs) {\n",
       "      window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n",
       "      root._bokeh_is_loading = css_urls.length + 0;\n",
       "    } else {\n",
       "      root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n",
       "    }\n",
       "\n",
       "    const existing_stylesheets = []\n",
       "    const links = document.getElementsByTagName('link')\n",
       "    for (let i = 0; i < links.length; i++) {\n",
       "      const link = links[i]\n",
       "      if (link.href != null) {\n",
       "        existing_stylesheets.push(link.href)\n",
       "      }\n",
       "    }\n",
       "    for (let i = 0; i < css_urls.length; i++) {\n",
       "      const url = css_urls[i];\n",
       "      const escaped = encodeURI(url)\n",
       "      if (existing_stylesheets.indexOf(escaped) !== -1) {\n",
       "        on_load()\n",
       "        continue;\n",
       "      }\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }    var existing_scripts = []\n",
       "    const scripts = document.getElementsByTagName('script')\n",
       "    for (let i = 0; i < scripts.length; i++) {\n",
       "      var script = scripts[i]\n",
       "      if (script.src != null) {\n",
       "        existing_scripts.push(script.src)\n",
       "      }\n",
       "    }\n",
       "    for (let i = 0; i < js_urls.length; i++) {\n",
       "      const url = js_urls[i];\n",
       "      const escaped = encodeURI(url)\n",
       "      const shouldSkip = skip.includes(escaped) || existing_scripts.includes(escaped)\n",
       "      const isBokehOrPanel = BK_RE.test(escaped) || PN_RE.test(escaped)\n",
       "      const missingOrBroken = Bokeh == null || Bokeh.Panel == null || (Bokeh.version != version && !Bokeh.versions?.has(version)) || Bokeh.versions?.get(version)?.Panel == null;\n",
       "      if (shouldSkip && !(isBokehOrPanel && missingOrBroken)) {\n",
       "        if (!window.requirejs) {\n",
       "          on_load();\n",
       "        }\n",
       "        continue;\n",
       "      }\n",
       "      const element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "    for (let i = 0; i < js_modules.length; i++) {\n",
       "      const url = js_modules[i];\n",
       "      const escaped = encodeURI(url)\n",
       "      if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
       "        if (!window.requirejs) {\n",
       "          on_load();\n",
       "        }\n",
       "        continue;\n",
       "      }\n",
       "      var element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      element.type = \"module\";\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "    for (const name in js_exports) {\n",
       "      const url = js_exports[name];\n",
       "      const escaped = encodeURI(url)\n",
       "      if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n",
       "        if (!window.requirejs) {\n",
       "          on_load();\n",
       "        }\n",
       "        continue;\n",
       "      }\n",
       "      var element = document.createElement('script');\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.type = \"module\";\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      element.textContent = `\n",
       "      import ${name} from \"${url}\"\n",
       "      window.${name} = ${name}\n",
       "      window._bokeh_on_load()\n",
       "      `\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "    if (!js_urls.length && !js_modules.length) {\n",
       "      on_load()\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  const js_urls = [\"https://cdn.holoviz.org/panel/1.8.10/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.9.0.min.js\", \"https://cdn.holoviz.org/panel/1.8.10/dist/panel.min.js\"];\n",
       "  const js_modules = [];\n",
       "  const js_exports = {};\n",
       "  const css_urls = [];\n",
       "  const inline_js = [    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "function(Bokeh) {} // ensure no trailing comma for IE\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    if ((root.Bokeh !== undefined) || (force === true)) {\n",
       "      for (let i = 0; i < inline_js.length; i++) {\n",
       "        try {\n",
       "          inline_js[i].call(root, root.Bokeh);\n",
       "        } catch(e) {\n",
       "          if (!reloading) {\n",
       "            throw e;\n",
       "          }\n",
       "        }\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    }\n",
       "    root._bokeh_is_initializing = false;\n",
       "  }\n",
       "\n",
       "  function load_or_wait() {\n",
       "    // Implement a backoff loop that tries to ensure we do not load multiple\n",
       "    // versions of Bokeh and its dependencies at the same time.\n",
       "    // In recent versions we use the root._bokeh_is_initializing flag\n",
       "    // to determine whether there is an ongoing attempt to initialize\n",
       "    // bokeh, however for backward compatibility we also try to ensure\n",
       "    // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n",
       "    // before older versions are fully initialized.\n",
       "    if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n",
       "      // If the timeout and bokeh was not successfully loaded we reset\n",
       "      // everything and try loading again\n",
       "      root._bokeh_timeout = Date.now() + 5000;\n",
       "      root._bokeh_is_initializing = false;\n",
       "      root._bokeh_onload_callbacks = undefined;\n",
       "      root._bokeh_is_loading = 0;\n",
       "      console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n",
       "      load_or_wait();\n",
       "    } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n",
       "      setTimeout(load_or_wait, 100);\n",
       "    } else {\n",
       "      root._bokeh_is_initializing = true;\n",
       "      root._bokeh_onload_callbacks = [];\n",
       "      const bokeh_loaded = Bokeh != null && ((Bokeh.version === version && Bokeh.Panel) || (Bokeh.versions?.has(version) && Bokeh.versions.get(version)?.Panel));\n",
       "      if (!reloading && !bokeh_loaded) {\n",
       "        if (root.Bokeh) {\n",
       "          root.Bokeh = undefined;\n",
       "        }\n",
       "        console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "      }\n",
       "      load_libs(css_urls, js_urls, js_modules, js_exports, Bokeh, function() {\n",
       "        console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "        run_inline_js();\n",
       "        if (Bokeh != undefined && !reloading) {\n",
       "          const NewBokeh = root.Bokeh;\n",
       "          if (Bokeh.versions === undefined) {\n",
       "            Bokeh.versions = new Map();\n",
       "          }\n",
       "          if (NewBokeh.version !== Bokeh.version) {\n",
       "            Bokeh[NewBokeh.version] = NewBokeh;\n",
       "            Bokeh.versions.set(NewBokeh.version, NewBokeh);\n",
       "          }\n",
       "          root.Bokeh = Bokeh;\n",
       "        }\n",
       "      });\n",
       "    }\n",
       "  }\n",
       "  // Give older versions of the autoload script a head-start to ensure\n",
       "  // they initialize before we start loading newer version.\n",
       "  setTimeout(load_or_wait, 100)\n",
       "}(window));"
      ],
      "application/vnd.holoviews_load.v0+json": "(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  const force = true;\n  const version = '3.9.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n  const reloading = false;\n  const Bokeh = root.Bokeh;\n  const BK_RE = /^https:\\/\\/cdn\\.bokeh\\.org\\/bokeh\\/(release|dev)\\/bokeh-/;\n  const PN_RE = /^https:\\/\\/cdn\\.holoviz\\.org\\/panel\\/[^/]+\\/dist\\/panel/i;\n\n  // Set a timeout for this load but only if we are not already initializing\n  if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks;\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, js_modules, js_exports, Bokeh, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n    if (js_modules == null) js_modules = [];\n    if (js_exports == null) js_exports = {};\n\n    root._bokeh_onload_callbacks.push(callback);\n\n    if (root._bokeh_is_loading > 0) {\n      // Don't load bokeh if it is still initializing\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n      // There is nothing to load\n      run_callbacks();\n      return null;\n    }\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n    window._bokeh_on_load = on_load\n\n    function on_error(e) {\n      const src_el = e.srcElement\n      console.error(\"failed to load \" + (src_el.href || src_el.src));\n    }\n\n    const skip = [];\n    if (window.requirejs) {\n      window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n      root._bokeh_is_loading = css_urls.length + 0;\n    } else {\n      root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n    }\n\n    const existing_stylesheets = []\n    const links = document.getElementsByTagName('link')\n    for (let i = 0; i < links.length; i++) {\n      const link = links[i]\n      if (link.href != null) {\n        existing_stylesheets.push(link.href)\n      }\n    }\n    for (let i = 0; i < css_urls.length; i++) {\n      const url = css_urls[i];\n      const escaped = encodeURI(url)\n      if (existing_stylesheets.indexOf(escaped) !== -1) {\n        on_load()\n        continue;\n      }\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }    var existing_scripts = []\n    const scripts = document.getElementsByTagName('script')\n    for (let i = 0; i < scripts.length; i++) {\n      var script = scripts[i]\n      if (script.src != null) {\n        existing_scripts.push(script.src)\n      }\n    }\n    for (let i = 0; i < js_urls.length; i++) {\n      const url = js_urls[i];\n      const escaped = encodeURI(url)\n      const shouldSkip = skip.includes(escaped) || existing_scripts.includes(escaped)\n      const isBokehOrPanel = BK_RE.test(escaped) || PN_RE.test(escaped)\n      const missingOrBroken = Bokeh == null || Bokeh.Panel == null || (Bokeh.version != version && !Bokeh.versions?.has(version)) || Bokeh.versions?.get(version)?.Panel == null;\n      if (shouldSkip && !(isBokehOrPanel && missingOrBroken)) {\n        if (!window.requirejs) {\n          on_load();\n        }\n        continue;\n      }\n      const element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.async = false;\n      element.src = url;\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n    for (let i = 0; i < js_modules.length; i++) {\n      const url = js_modules[i];\n      const escaped = encodeURI(url)\n      if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n        if (!window.requirejs) {\n          on_load();\n        }\n        continue;\n      }\n      var element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.async = false;\n      element.src = url;\n      element.type = \"module\";\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n    for (const name in js_exports) {\n      const url = js_exports[name];\n      const escaped = encodeURI(url)\n      if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n        if (!window.requirejs) {\n          on_load();\n        }\n        continue;\n      }\n      var element = document.createElement('script');\n      element.onerror = on_error;\n      element.async = false;\n      element.type = \"module\";\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      element.textContent = `\n      import ${name} from \"${url}\"\n      window.${name} = ${name}\n      window._bokeh_on_load()\n      `\n      document.head.appendChild(element);\n    }\n    if (!js_urls.length && !js_modules.length) {\n      on_load()\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  const js_urls = [\"https://cdn.holoviz.org/panel/1.8.10/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.9.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.9.0.min.js\", \"https://cdn.holoviz.org/panel/1.8.10/dist/panel.min.js\"];\n  const js_modules = [];\n  const js_exports = {};\n  const css_urls = [];\n  const inline_js = [    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n  ];\n\n  function run_inline_js() {\n    if ((root.Bokeh !== undefined) || (force === true)) {\n      for (let i = 0; i < inline_js.length; i++) {\n        try {\n          inline_js[i].call(root, root.Bokeh);\n        } catch(e) {\n          if (!reloading) {\n            throw e;\n          }\n        }\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    }\n    root._bokeh_is_initializing = false;\n  }\n\n  function load_or_wait() {\n    // Implement a backoff loop that tries to ensure we do not load multiple\n    // versions of Bokeh and its dependencies at the same time.\n    // In recent versions we use the root._bokeh_is_initializing flag\n    // to determine whether there is an ongoing attempt to initialize\n    // bokeh, however for backward compatibility we also try to ensure\n    // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n    // before older versions are fully initialized.\n    if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n      // If the timeout and bokeh was not successfully loaded we reset\n      // everything and try loading again\n      root._bokeh_timeout = Date.now() + 5000;\n      root._bokeh_is_initializing = false;\n      root._bokeh_onload_callbacks = undefined;\n      root._bokeh_is_loading = 0;\n      console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n      load_or_wait();\n    } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n      setTimeout(load_or_wait, 100);\n    } else {\n      root._bokeh_is_initializing = true;\n      root._bokeh_onload_callbacks = [];\n      const bokeh_loaded = Bokeh != null && ((Bokeh.version === version && Bokeh.Panel) || (Bokeh.versions?.has(version) && Bokeh.versions.get(version)?.Panel));\n      if (!reloading && !bokeh_loaded) {\n        if (root.Bokeh) {\n          root.Bokeh = undefined;\n        }\n        console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n      }\n      load_libs(css_urls, js_urls, js_modules, js_exports, Bokeh, function() {\n        console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n        run_inline_js();\n        if (Bokeh != undefined && !reloading) {\n          const NewBokeh = root.Bokeh;\n          if (Bokeh.versions === undefined) {\n            Bokeh.versions = new Map();\n          }\n          if (NewBokeh.version !== Bokeh.version) {\n            Bokeh[NewBokeh.version] = NewBokeh;\n            Bokeh.versions.set(NewBokeh.version, NewBokeh);\n          }\n          root.Bokeh = Bokeh;\n        }\n      });\n    }\n  }\n  // Give older versions of the autoload script a head-start to ensure\n  // they initialize before we start loading newer version.\n  setTimeout(load_or_wait, 100)\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n",
       "  window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n",
       "}\n",
       "\n",
       "\n",
       "    function JupyterCommManager() {\n",
       "    }\n",
       "\n",
       "    JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n",
       "      if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
       "        var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
       "        comm_manager.register_target(comm_id, function(comm) {\n",
       "          comm.on_msg(msg_handler);\n",
       "        });\n",
       "      } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
       "        window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n",
       "          comm.onMsg = msg_handler;\n",
       "        });\n",
       "      } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
       "        google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n",
       "          var messages = comm.messages[Symbol.asyncIterator]();\n",
       "          function processIteratorResult(result) {\n",
       "            var message = result.value;\n",
       "            var content = {data: message.data, comm_id};\n",
       "            var buffers = []\n",
       "            for (var buffer of message.buffers || []) {\n",
       "              buffers.push(new DataView(buffer))\n",
       "            }\n",
       "            var metadata = message.metadata || {};\n",
       "            var msg = {content, buffers, metadata}\n",
       "            msg_handler(msg);\n",
       "            return messages.next().then(processIteratorResult);\n",
       "          }\n",
       "          return messages.next().then(processIteratorResult);\n",
       "        })\n",
       "      }\n",
       "    }\n",
       "\n",
       "    JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n",
       "      if (comm_id in window.PyViz.comms) {\n",
       "        return window.PyViz.comms[comm_id];\n",
       "      } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
       "        var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
       "        var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n",
       "        if (msg_handler) {\n",
       "          comm.on_msg(msg_handler);\n",
       "        }\n",
       "      } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
       "        var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n",
       "        let retries = 0;\n",
       "        const open = () => {\n",
       "          if (comm.active) {\n",
       "            comm.open();\n",
       "          } else if (retries > 3) {\n",
       "            console.warn('Comm target never activated')\n",
       "          } else {\n",
       "            retries += 1\n",
       "            setTimeout(open, 500)\n",
       "          }\n",
       "        }\n",
       "        if (comm.active) {\n",
       "          comm.open();\n",
       "        } else {\n",
       "          setTimeout(open, 500)\n",
       "        }\n",
       "        if (msg_handler) {\n",
       "          comm.onMsg = msg_handler;\n",
       "        }\n",
       "      } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
       "        var comm_promise = google.colab.kernel.comms.open(comm_id)\n",
       "        comm_promise.then((comm) => {\n",
       "          window.PyViz.comms[comm_id] = comm;\n",
       "          if (msg_handler) {\n",
       "            var messages = comm.messages[Symbol.asyncIterator]();\n",
       "            function processIteratorResult(result) {\n",
       "              var message = result.value;\n",
       "              var content = {data: message.data};\n",
       "              var metadata = message.metadata || {comm_id};\n",
       "              var msg = {content, metadata}\n",
       "              msg_handler(msg);\n",
       "              return messages.next().then(processIteratorResult);\n",
       "            }\n",
       "            return messages.next().then(processIteratorResult);\n",
       "          }\n",
       "        })\n",
       "        var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n",
       "          return comm_promise.then((comm) => {\n",
       "            comm.send(data, metadata, buffers, disposeOnDone);\n",
       "          });\n",
       "        };\n",
       "        var comm = {\n",
       "          send: sendClosure\n",
       "        };\n",
       "      }\n",
       "      window.PyViz.comms[comm_id] = comm;\n",
       "      return comm;\n",
       "    }\n",
       "    window.PyViz.comm_manager = new JupyterCommManager();\n",
       "    \n",
       "\n",
       "\n",
       "var JS_MIME_TYPE = 'application/javascript';\n",
       "var HTML_MIME_TYPE = 'text/html';\n",
       "var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n",
       "var CLASS_NAME = 'output';\n",
       "\n",
       "/**\n",
       " * Render data to the DOM node\n",
       " */\n",
       "function render(props, node) {\n",
       "  var div = document.createElement(\"div\");\n",
       "  var script = document.createElement(\"script\");\n",
       "  node.appendChild(div);\n",
       "  node.appendChild(script);\n",
       "}\n",
       "\n",
       "/**\n",
       " * Handle when a new output is added\n",
       " */\n",
       "function handle_add_output(event, handle) {\n",
       "  var output_area = handle.output_area;\n",
       "  var output = handle.output;\n",
       "  if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
       "    return\n",
       "  }\n",
       "  var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "  var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "  if (id !== undefined) {\n",
       "    var nchildren = toinsert.length;\n",
       "    var html_node = toinsert[nchildren-1].children[0];\n",
       "    html_node.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "    var scripts = [];\n",
       "    var nodelist = html_node.querySelectorAll(\"script\");\n",
       "    for (var i in nodelist) {\n",
       "      if (nodelist.hasOwnProperty(i)) {\n",
       "        scripts.push(nodelist[i])\n",
       "      }\n",
       "    }\n",
       "\n",
       "    scripts.forEach( function (oldScript) {\n",
       "      var newScript = document.createElement(\"script\");\n",
       "      var attrs = [];\n",
       "      var nodemap = oldScript.attributes;\n",
       "      for (var j in nodemap) {\n",
       "        if (nodemap.hasOwnProperty(j)) {\n",
       "          attrs.push(nodemap[j])\n",
       "        }\n",
       "      }\n",
       "      attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n",
       "      newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n",
       "      oldScript.parentNode.replaceChild(newScript, oldScript);\n",
       "    });\n",
       "    if (JS_MIME_TYPE in output.data) {\n",
       "      toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n",
       "    }\n",
       "    output_area._hv_plot_id = id;\n",
       "    if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n",
       "      window.PyViz.plot_index[id] = Bokeh.index[id];\n",
       "    } else {\n",
       "      window.PyViz.plot_index[id] = null;\n",
       "    }\n",
       "  } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "    var bk_div = document.createElement(\"div\");\n",
       "    bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "    var script_attrs = bk_div.children[0].attributes;\n",
       "    for (var i = 0; i < script_attrs.length; i++) {\n",
       "      toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "    }\n",
       "    // store reference to server id on output_area\n",
       "    output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "  }\n",
       "}\n",
       "\n",
       "/**\n",
       " * Handle when an output is cleared or removed\n",
       " */\n",
       "function handle_clear_output(event, handle) {\n",
       "  var id = handle.cell.output_area._hv_plot_id;\n",
       "  var server_id = handle.cell.output_area._bokeh_server_id;\n",
       "  if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n",
       "  var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n",
       "  if (server_id !== null) {\n",
       "    comm.send({event_type: 'server_delete', 'id': server_id});\n",
       "    return;\n",
       "  } else if (comm !== null) {\n",
       "    comm.send({event_type: 'delete', 'id': id});\n",
       "  }\n",
       "  delete PyViz.plot_index[id];\n",
       "  if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n",
       "    var doc = window.Bokeh.index[id].model.document\n",
       "    doc.clear();\n",
       "    const i = window.Bokeh.documents.indexOf(doc);\n",
       "    if (i > -1) {\n",
       "      window.Bokeh.documents.splice(i, 1);\n",
       "    }\n",
       "  }\n",
       "}\n",
       "\n",
       "/**\n",
       " * Handle kernel restart event\n",
       " */\n",
       "function handle_kernel_cleanup(event, handle) {\n",
       "  delete PyViz.comms[\"hv-extension-comm\"];\n",
       "  window.PyViz.plot_index = {}\n",
       "}\n",
       "\n",
       "/**\n",
       " * Handle update_display_data messages\n",
       " */\n",
       "function handle_update_output(event, handle) {\n",
       "  handle_clear_output(event, {cell: {output_area: handle.output_area}})\n",
       "  handle_add_output(event, handle)\n",
       "}\n",
       "\n",
       "function register_renderer(events, OutputArea) {\n",
       "  function append_mime(data, metadata, element) {\n",
       "    // create a DOM node to render to\n",
       "    var toinsert = this.create_output_subarea(\n",
       "    metadata,\n",
       "    CLASS_NAME,\n",
       "    EXEC_MIME_TYPE\n",
       "    );\n",
       "    this.keyboard_manager.register_events(toinsert);\n",
       "    // Render to node\n",
       "    var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "    render(props, toinsert[0]);\n",
       "    element.append(toinsert);\n",
       "    return toinsert\n",
       "  }\n",
       "\n",
       "  events.on('output_added.OutputArea', handle_add_output);\n",
       "  events.on('output_updated.OutputArea', handle_update_output);\n",
       "  events.on('clear_output.CodeCell', handle_clear_output);\n",
       "  events.on('delete.Cell', handle_clear_output);\n",
       "  events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n",
       "\n",
       "  OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "    safe: true,\n",
       "    index: 0\n",
       "  });\n",
       "}\n",
       "\n",
       "if (window.Jupyter !== undefined) {\n",
       "  try {\n",
       "    var events = require('base/js/events');\n",
       "    var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  } catch(err) {\n",
       "  }\n",
       "}\n"
      ],
      "application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n  window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n    function JupyterCommManager() {\n    }\n\n    JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n      if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n        var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n        comm_manager.register_target(comm_id, function(comm) {\n          comm.on_msg(msg_handler);\n        });\n      } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n        window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n          comm.onMsg = msg_handler;\n        });\n      } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n        google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n          var messages = comm.messages[Symbol.asyncIterator]();\n          function processIteratorResult(result) {\n            var message = result.value;\n            var content = {data: message.data, comm_id};\n            var buffers = []\n            for (var buffer of message.buffers || []) {\n              buffers.push(new DataView(buffer))\n            }\n            var metadata = message.metadata || {};\n            var msg = {content, buffers, metadata}\n            msg_handler(msg);\n            return messages.next().then(processIteratorResult);\n          }\n          return messages.next().then(processIteratorResult);\n        })\n      }\n    }\n\n    JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n      if (comm_id in window.PyViz.comms) {\n        return window.PyViz.comms[comm_id];\n      } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n        var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n        var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n        if (msg_handler) {\n          comm.on_msg(msg_handler);\n        }\n      } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n        var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n        let retries = 0;\n        const open = () => {\n          if (comm.active) {\n            comm.open();\n          } else if (retries > 3) {\n            console.warn('Comm target never activated')\n          } else {\n            retries += 1\n            setTimeout(open, 500)\n          }\n        }\n        if (comm.active) {\n          comm.open();\n        } else {\n          setTimeout(open, 500)\n        }\n        if (msg_handler) {\n          comm.onMsg = msg_handler;\n        }\n      } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n        var comm_promise = google.colab.kernel.comms.open(comm_id)\n        comm_promise.then((comm) => {\n          window.PyViz.comms[comm_id] = comm;\n          if (msg_handler) {\n            var messages = comm.messages[Symbol.asyncIterator]();\n            function processIteratorResult(result) {\n              var message = result.value;\n              var content = {data: message.data};\n              var metadata = message.metadata || {comm_id};\n              var msg = {content, metadata}\n              msg_handler(msg);\n              return messages.next().then(processIteratorResult);\n            }\n            return messages.next().then(processIteratorResult);\n          }\n        })\n        var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n          return comm_promise.then((comm) => {\n            comm.send(data, metadata, buffers, disposeOnDone);\n          });\n        };\n        var comm = {\n          send: sendClosure\n        };\n      }\n      window.PyViz.comms[comm_id] = comm;\n      return comm;\n    }\n    window.PyViz.comm_manager = new JupyterCommManager();\n    \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n  var div = document.createElement(\"div\");\n  var script = document.createElement(\"script\");\n  node.appendChild(div);\n  node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n  var output_area = handle.output_area;\n  var output = handle.output;\n  if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n    return\n  }\n  var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n  var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n  if (id !== undefined) {\n    var nchildren = toinsert.length;\n    var html_node = toinsert[nchildren-1].children[0];\n    html_node.innerHTML = output.data[HTML_MIME_TYPE];\n    var scripts = [];\n    var nodelist = html_node.querySelectorAll(\"script\");\n    for (var i in nodelist) {\n      if (nodelist.hasOwnProperty(i)) {\n        scripts.push(nodelist[i])\n      }\n    }\n\n    scripts.forEach( function (oldScript) {\n      var newScript = document.createElement(\"script\");\n      var attrs = [];\n      var nodemap = oldScript.attributes;\n      for (var j in nodemap) {\n        if (nodemap.hasOwnProperty(j)) {\n          attrs.push(nodemap[j])\n        }\n      }\n      attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n      newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n      oldScript.parentNode.replaceChild(newScript, oldScript);\n    });\n    if (JS_MIME_TYPE in output.data) {\n      toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n    }\n    output_area._hv_plot_id = id;\n    if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n      window.PyViz.plot_index[id] = Bokeh.index[id];\n    } else {\n      window.PyViz.plot_index[id] = null;\n    }\n  } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n    var bk_div = document.createElement(\"div\");\n    bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n    var script_attrs = bk_div.children[0].attributes;\n    for (var i = 0; i < script_attrs.length; i++) {\n      toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n    }\n    // store reference to server id on output_area\n    output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n  }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n  var id = handle.cell.output_area._hv_plot_id;\n  var server_id = handle.cell.output_area._bokeh_server_id;\n  if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n  var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n  if (server_id !== null) {\n    comm.send({event_type: 'server_delete', 'id': server_id});\n    return;\n  } else if (comm !== null) {\n    comm.send({event_type: 'delete', 'id': id});\n  }\n  delete PyViz.plot_index[id];\n  if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n    var doc = window.Bokeh.index[id].model.document\n    doc.clear();\n    const i = window.Bokeh.documents.indexOf(doc);\n    if (i > -1) {\n      window.Bokeh.documents.splice(i, 1);\n    }\n  }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n  delete PyViz.comms[\"hv-extension-comm\"];\n  window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n  handle_clear_output(event, {cell: {output_area: handle.output_area}})\n  handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n  function append_mime(data, metadata, element) {\n    // create a DOM node to render to\n    var toinsert = this.create_output_subarea(\n    metadata,\n    CLASS_NAME,\n    EXEC_MIME_TYPE\n    );\n    this.keyboard_manager.register_events(toinsert);\n    // Render to node\n    var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n    render(props, toinsert[0]);\n    element.append(toinsert);\n    return toinsert\n  }\n\n  events.on('output_added.OutputArea', handle_add_output);\n  events.on('output_updated.OutputArea', handle_update_output);\n  events.on('clear_output.CodeCell', handle_clear_output);\n  events.on('delete.Cell', handle_clear_output);\n  events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n  OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n    safe: true,\n    index: 0\n  });\n}\n\nif (window.Jupyter !== undefined) {\n  try {\n    var events = require('base/js/events');\n    var OutputArea = require('notebook/js/outputarea').OutputArea;\n    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n      register_renderer(events, OutputArea);\n    }\n  } catch(err) {\n  }\n}\n"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.holoviews_exec.v0+json": "",
      "text/html": [
       "<div id='c90275b9-3f6d-408a-9935-065cf82abea2'>\n",
       "  <div id=\"cf9af080-e942-4b25-96b6-a8e231244991\" data-root-id=\"c90275b9-3f6d-408a-9935-065cf82abea2\" style=\"display: contents;\"></div>\n",
       "</div>\n",
       "<script type=\"application/javascript\">(function(root) {\n",
       "  var docs_json = {\"bab51115-5e40-4b2e-bc5d-6c861adc6487\":{\"version\":\"3.9.0\",\"title\":\"Bokeh Application\",\"config\":{\"type\":\"object\",\"name\":\"DocumentConfig\",\"id\":\"b0d43450-3f2b-4a1e-a27d-a67cce4417a2\",\"attributes\":{\"notifications\":{\"type\":\"object\",\"name\":\"Notifications\",\"id\":\"da83e787-eb1f-4c11-a1d1-7a084651ca66\"}}},\"roots\":[{\"type\":\"object\",\"name\":\"panel.models.browser.BrowserInfo\",\"id\":\"c90275b9-3f6d-408a-9935-065cf82abea2\"},{\"type\":\"object\",\"name\":\"panel.models.comm_manager.CommManager\",\"id\":\"3f544e08-a7ad-438f-9723-1978062da69b\",\"attributes\":{\"plot_id\":\"c90275b9-3f6d-408a-9935-065cf82abea2\",\"comm_id\":\"1b99ae9f0d214ca09760c85b7fadaaf0\",\"client_comm_id\":\"1188268319fe43fcb3a0d7433165abc3\"}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"start\",\"kind\":\"Any\",\"default\":0},{\"name\":\"end\",\"kind\":\"Any\",\"default\":100},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"ReactiveESM1\",\"properties\":[{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"JSComponent1\",\"properties\":[{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"ReactComponent1\",\"properties\":[{\"name\":\"use_shadow_dom\",\"kind\":\"Any\",\"default\":true},{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"AnyWidgetComponent1\",\"properties\":[{\"name\":\"use_shadow_dom\",\"kind\":\"Any\",\"default\":true},{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"max_notifications\",\"kind\":\"Any\",\"default\":5},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_rendered\",\"kind\":\"Any\",\"default\":false},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"request_value1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"_synced\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_request_sync\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"holoviews.plotting.bokeh.raster.HoverModel\",\"properties\":[{\"name\":\"xy\",\"kind\":\"Any\",\"default\":null},{\"name\":\"data\",\"kind\":\"Any\",\"default\":null}]}]}};\n",
       "  var render_items = [{\"docid\":\"bab51115-5e40-4b2e-bc5d-6c861adc6487\",\"roots\":{\"c90275b9-3f6d-408a-9935-065cf82abea2\":\"cf9af080-e942-4b25-96b6-a8e231244991\"},\"root_ids\":[\"c90275b9-3f6d-408a-9935-065cf82abea2\"]}];\n",
       "  var docs = Object.values(docs_json)\n",
       "  if (!docs) {\n",
       "    return\n",
       "  }\n",
       "  const version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n",
       "  async function embed_document(root) {\n",
       "    var Bokeh = get_bokeh(root)\n",
       "    await Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "    for (const render_item of render_items) {\n",
       "      for (const root_id of render_item.root_ids) {\n",
       "\tconst id_el = document.getElementById(root_id)\n",
       "\tif (id_el.children.length && id_el.children[0].hasAttribute('data-root-id')) {\n",
       "\t  const root_el = id_el.children[0]\n",
       "\t  root_el.id = root_el.id + '-rendered'\n",
       "\t  for (const child of root_el.children) {\n",
       "            // Ensure JupyterLab does not capture keyboard shortcuts\n",
       "            // see: https://jupyterlab.readthedocs.io/en/4.1.x/extension/notebook.html#keyboard-interaction-model\n",
       "\t    child.setAttribute('data-lm-suppress-shortcuts', 'true')\n",
       "\t  }\n",
       "\t}\n",
       "      }\n",
       "    }\n",
       "  }\n",
       "  function get_bokeh(root) {\n",
       "    if (root.Bokeh === undefined) {\n",
       "      return null\n",
       "    } else if (root.Bokeh.version !== version) {\n",
       "      if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(version)) {\n",
       "\treturn null\n",
       "      }\n",
       "      return root.Bokeh.versions.get(version);\n",
       "    } else if (root.Bokeh.version === version) {\n",
       "      return root.Bokeh\n",
       "    }\n",
       "    return null\n",
       "  }\n",
       "  function is_loaded(root) {\n",
       "    var Bokeh = get_bokeh(root)\n",
       "    return (Bokeh != null && Bokeh.Panel !== undefined)\n",
       "  }\n",
       "  if (is_loaded(root)) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (is_loaded(root)) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else if (document.readyState == \"complete\") {\n",
       "        attempts++;\n",
       "        if (attempts > 200) {\n",
       "          clearInterval(timer);\n",
       "\t  var Bokeh = get_bokeh(root)\n",
       "\t  if (Bokeh == null || Bokeh.Panel == null) {\n",
       "            console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n",
       "\t  } else {\n",
       "\t    console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n",
       "\t    embed_document(root)\n",
       "\t  }\n",
       "        }\n",
       "      }\n",
       "    }, 25, root)\n",
       "  }\n",
       "})(window);</script>"
      ]
     },
     "metadata": {
      "application/vnd.holoviews_exec.v0+json": {
       "id": "c90275b9-3f6d-408a-9935-065cf82abea2"
      }
     },
     "output_type": "display_data"
    },
    {
     "data": {},
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.holoviews_exec.v0+json": "",
      "text/html": [
       "<div id='6033504c-7cd7-4a59-aeb5-27d09d3f2d14'>\n",
       "  <div id=\"cc940056-6cdb-4812-8c0b-45acd9d5bb7e\" data-root-id=\"6033504c-7cd7-4a59-aeb5-27d09d3f2d14\" style=\"display: contents;\"></div>\n",
       "</div>\n",
       "<script type=\"application/javascript\">(function(root) {\n",
       "  var docs_json = {\"cb069bed-f61f-4b46-b1b1-b48e21f83a66\":{\"version\":\"3.9.0\",\"title\":\"Bokeh Application\",\"config\":{\"type\":\"object\",\"name\":\"DocumentConfig\",\"id\":\"6d3b4d75-a040-40c9-805a-a2a17fe21c30\",\"attributes\":{\"notifications\":{\"type\":\"object\",\"name\":\"Notifications\",\"id\":\"13764959-c724-4478-bbef-cfae1411bf74\"}}},\"roots\":[{\"type\":\"object\",\"name\":\"Row\",\"id\":\"6033504c-7cd7-4a59-aeb5-27d09d3f2d14\",\"attributes\":{\"name\":\"Row00296\",\"tags\":[\"embedded\"],\"stylesheets\":[\"\\n:host(.pn-loading):before, .pn-loading:before {\\n  background-color: #c3c3c3;\\n  mask-size: auto calc(min(50%, 300px));\\n  -webkit-mask-size: auto calc(min(50%, 300px));\\n}\",{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"a7237540-19a5-4acd-a337-0ab3584b800d\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.8.10/dist/css/loading.css?v=1.8.10\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"c71af973-6290-49ec-89bf-045f4c850b47\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.8.10/dist/css/listpanel.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"ebaa6630-22fa-417b-98b7-5ec3ae215fd2\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.8.10/dist/bundled/theme/default.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"322e843c-a16b-49b1-8cb2-fd2774549ea6\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.8.10/dist/bundled/theme/native.css\"}}],\"min_width\":700,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\",\"children\":[{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"6fcece4f-7b13-42a3-9fbf-821cf99fa572\",\"attributes\":{\"name\":\"HSpacer00300\",\"stylesheets\":[\"\\n:host(.pn-loading):before, .pn-loading:before {\\n  background-color: #c3c3c3;\\n  mask-size: auto calc(min(50%, 300px));\\n  -webkit-mask-size: auto calc(min(50%, 300px));\\n}\",{\"id\":\"a7237540-19a5-4acd-a337-0ab3584b800d\"},{\"id\":\"ebaa6630-22fa-417b-98b7-5ec3ae215fd2\"},{\"id\":\"322e843c-a16b-49b1-8cb2-fd2774549ea6\"}],\"min_width\":0,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}},{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"de02d4cf-a860-4a86-ab39-0b5e46956a87\",\"attributes\":{\"width\":700,\"height\":300,\"margin\":[5,10],\"sizing_mode\":\"fixed\",\"align\":\"start\",\"x_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"e4c82137-644c-4f8c-9c99-f952d21ca492\",\"attributes\":{\"name\":\"time\",\"tags\":[[[\"time\",null]],[]],\"reset_start\":0.0,\"reset_end\":1.0}},\"y_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"6febe375-93ee-4249-b30e-979e26393ace\",\"attributes\":{\"name\":\"population\",\"tags\":[[[\"population\",null]],{\"type\":\"map\",\"entries\":[[\"invert_yaxis\",false],[\"autorange\",false]]}],\"start\":-0.1,\"end\":1.1,\"reset_start\":-0.1,\"reset_end\":1.1}},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"0c5c1a3b-9411-4791-aab5-fed7ef35ee9b\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"45713447-5912-486f-92aa-e7a4fad969b6\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"2cf40a82-b5e1-4d34-9468-be765c73b5ea\",\"attributes\":{\"text_color\":\"black\",\"text_font_size\":\"12pt\"}},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"d102826e-83bd-41c0-bc56-aedf6cbf37e2\",\"attributes\":{\"name\":\"|0>\",\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"b170c72e-eb7b-405d-89ca-04f31c450071\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"25e058d6-e477-46d2-9918-0172abc36754\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"3a480029-189f-45ef-a2e3-361c062f1b69\"},\"data\":{\"type\":\"map\",\"entries\":[[\"time\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"H4sIAAEAAAAA/y2Ta0hUURSFpbCiIkMLjYypMMWipAhLEldSRoqKFVkUmphRiFFGFooVUQQiiGCBIFGIgv0QQRQphOmhTOIj3zqZOTN33nceggghBJ49s86fw7l3n73X+vY+ERHhddN4+eNs12uE97fYYqhd/rb5A89tOPHg7sWRhU/83oWHctzTzf89uBBb9Hgiq49xn7HPVBlvquxnvBE1Z86V/h37ynvfcacpL9Vc9oP3B3BJv7Z1em2QeUxIl/DGn8w3hKSWiu6hxGHmHUHMypM3A/2jzP8LL9rPdt5KHmedcVRNZIki1ptE+f+clzeMk6w7hZLkAqnI+tMovCprhjpmkKuiFRHqmUOmyl6gz1HXPE6Zy8QB9ZlxNFIq/KbOBRw8HgJGvX8QJ3hiF6l7ETvqqoUI9S9hY+9z5WCJPix4pugbai30Y8FT5fb9ASt9WfFI0Y03WenPhvuKTkuFjT5tuCftidboV8NtRbO5T6NvO4pFTpGd/u24rui/2+AgBweuqGnY1eEgDwfyVbea8pzk4kS2pF9xko8L56VdzS5ycgH/LK+iMtzk5UZag3a6QXOTmwcnE5z+7XUe8vMg5Yu7tf6Ylxy9OBxqj5c8dRyS8GqdXHXsl/E0+MjXh73RMhA+cvZjd8fqkchyP3n7sTNDBAXIPYBtYrc3QP5BbAoNSJB9CCL8KpaxDgLTzaAgAwAA\"},\"shape\":[100],\"dtype\":\"float64\",\"order\":\"little\"}],[\"population\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"H4sIAAEAAAAA/xXKfVDMeQDHcTQokjCUh+4qkkzTeOqaO9VnMiEPO4zUFgnbrB5Wt7R3k0VTN8qiFEVo0SyVSWvaYSJGo1YpKU89bLQkQ31/j9/S0rqernv/8/rnPWHC//XhSl1r28sxijuWS4O/j5saccwXoxQNCuMa8zCFzp1ROgxRfFhm+a3FSiHVFld7/qCwzjG52A1QfNroPOcvShF40Bwu5yjq37vmveuheCP1kTd3U6zKUu8JMFO4Jd0c82inyEopMJ54RdGx44NjaANFY29XyLlqCpklr8qvcvz/sp6sL6eo7cjWPyimyAyvCDytpdDHzBu+f45if7wiLSCDYmvpSNF8NUW6a3tqyEEKJwdWVh9NYdgd3Jm3neLeSm9DWRBFr+2mz/arKGzya29XuFHYf084WuRIMXLiudU0KqL661abbbwIkyFab/tOhG2uxH5ynYjEniprsEFE5QzPkIYCEa0e5/flpIvw4iX+2kQRhRN3xQph478heVgTIGJK46QbiUtErD2QclI3TUTYnrYozz4BygJZhE2bgF7V9WV/PBSQnHDB8vqqgOwW+/DmVAH9C5J2+soElCkP750ZLGBLu3STzEPAqafeQb5TBKRoMptyenh4D/nXqJ/xWBw5VD9UzIOPdL/7awYPbe7mATGGh5fWLlq1jofthgMeD1x5FM8oNdWOctCZOiJumTk4Kr6a4x9x8Fv+T7fTZQ6a1jLPqr85XAzp08tDObQflha5rOSQXjNb2e/AoaTu0wWBZ2Eq8nn8ywsWvuqfuvOl41YmzQo9xUJlp+hUxrKY6qZptmxgMT12Xam4lIU87umChKksJEEny1WEQbS8u8mpkUFWVHyJTM9Arz+7el8OA6345fhCFYO3h5KNhVIGaVcupVn9GTzX+VSsWMzg9sPCjzumMbiW+eTfuG8EkYNdGcc7Cd6zVJ1fR+C3vVzyxECQO29wYPQqQYpibmfUGYLQzYF81xECSb5jZnYcQYzNiot/RhL4uFv2Z2whqOn3NpoCCQYTRsbiVxMs0jR9hBdB2k6JNsqVwOXRdc7oTPAfyJtwZyADAAA=\"},\"shape\":[100],\"dtype\":\"float64\",\"order\":\"little\"}],[\"state\",[\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\",\"|0>\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"630476d2-70c4-4ad0-9901-e407836933a1\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"b590b094-532d-4813-accf-be34c1792196\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"e14b0368-118d-457b-9097-2073ed0d3aef\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#30a2da\",\"line_width\":2}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"9a4a7eeb-dd0a-4d41-b4d0-b90199e51583\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#30a2da\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"29030f76-da7c-42e0-8512-dd7b0b252012\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#30a2da\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"19ec1243-b096-4897-97d9-df84a444a39d\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#30a2da\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"f559644e-96ee-48ec-80fa-a47d5504d76f\",\"attributes\":{\"name\":\"|1>\",\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"305d8be5-064a-483c-8534-beac169078c4\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"66455526-eda7-42bf-a19a-08a1ebf18888\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"1ce5c195-7743-4f8c-8b38-20ed7aa2cb66\"},\"data\":{\"type\":\"map\",\"entries\":[[\"time\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"H4sIAAEAAAAA/y2Ta0hUURSFpbCiIkMLjYypMMWipAhLEldSRoqKFVkUmphRiFFGFooVUQQiiGCBIFGIgv0QQRQphOmhTOIj3zqZOTN33nceggghBJ49s86fw7l3n73X+vY+ERHhddN4+eNs12uE97fYYqhd/rb5A89tOPHg7sWRhU/83oWHctzTzf89uBBb9Hgiq49xn7HPVBlvquxnvBE1Z86V/h37ynvfcacpL9Vc9oP3B3BJv7Z1em2QeUxIl/DGn8w3hKSWiu6hxGHmHUHMypM3A/2jzP8LL9rPdt5KHmedcVRNZIki1ptE+f+clzeMk6w7hZLkAqnI+tMovCprhjpmkKuiFRHqmUOmyl6gz1HXPE6Zy8QB9ZlxNFIq/KbOBRw8HgJGvX8QJ3hiF6l7ETvqqoUI9S9hY+9z5WCJPix4pugbai30Y8FT5fb9ASt9WfFI0Y03WenPhvuKTkuFjT5tuCftidboV8NtRbO5T6NvO4pFTpGd/u24rui/2+AgBweuqGnY1eEgDwfyVbea8pzk4kS2pF9xko8L56VdzS5ycgH/LK+iMtzk5UZag3a6QXOTmwcnE5z+7XUe8vMg5Yu7tf6Ylxy9OBxqj5c8dRyS8GqdXHXsl/E0+MjXh73RMhA+cvZjd8fqkchyP3n7sTNDBAXIPYBtYrc3QP5BbAoNSJB9CCL8KpaxDgLTzaAgAwAA\"},\"shape\":[100],\"dtype\":\"float64\",\"order\":\"little\"}],[\"population\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"H4sIAAEAAAAA/yXBe1DLAQAH8EL08ughpdR1MhN5TEZmfXPkrhNxvSThEvIIi7tajym6iNRMGtOOKXVLWW1RC1nbZO31m0rLuYnUMdXuxO5oefzh87Gz+y9A8K2ee/NneIgwogad3hDer50vdl2BgZHX6lj/MPA31Ozb1LUFf70H+xdLohHXYDfKb4qF9umwdb0lCdetQT+jSg/iPCOoat6dNFjfPFonJx0DUdawWkU5hYCEN3djPjIQLMy4bR47hwf6UPymZ+NGuq90T38u2HwRR916HhqGS/HciUKYqd+elK8sgsdRGTOKUwyfmqG2Bf4l2L4wIovouYowUpATmsvwRelzxMvERnu+kzk4iwMSgwTq0gqMNLmUXh2/CT/3RHKWmosUw4VBesdtDFuNZL/uO9BKLMmRo3zQC/hnGO73cDm3UuREE6BKs3Hi3On7MC4PZ0pF1Vi5imoasNWAecJlR3dsLTwtOmNOax1ClwQlGklClM122ywX1CMhkZbjTW5A6Lbn5CZpI8TxJZf2JIjg+CvMNMZqAjcjd/dkYjNUxZ/2rqGK4Rzc+OW4jwTWHx3OefYtMI+7vV9naQG3TMU8PPgY6sjZpt6+J5gSvTZF6luhHSvxztO0IbXC/iNFK8XnK2ntJEM7yCFZdZ7GpygvTJ356MMz2DSGjYKx58iM2OnFm+zAZPn1aYEOMhCHxhfduyZD+qzaiSqvTlwj55PNdzvh8KKPHb9MDvut9uFisRzDWyt4epoCcVPsAqZSAZsva1dhtBIZZ6IcW3qVWHz5e9Jg0ktwHGydhvcvsU9RwI9P7cJfRkAEbbgLI72ZTjFpr1BJj87ZP/QKMawbUev3q/C1ty+7zqiCYg4rPX9nNwILK8cvybuhXLjNemutGg5ni3OLBGok8EIO+LtqEL3aYqCd1cC8rJEh6deAze05nULVgupcVO3B0WLCVSpsNmtRa/P940nXQRH30GNRqQ6SbLeTD/t1eMuvb6z20+NdBaVtNEUPiW5+2wmeHpFDqRvm9OhBkSWvlc0gMPdgXSCDQoDQkhw9kglMuWcW8VgE8i5OH/hTReAfXxMMFyADAAA=\"},\"shape\":[100],\"dtype\":\"float64\",\"order\":\"little\"}],[\"state\",[\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\",\"|1>\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"afdb4fc3-631c-4f32-a8a6-9df57893f990\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"2bf7ed8f-6623-4180-b621-1063bb40abd7\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"dbf9b68d-c584-4221-af38-9609026da39c\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#fc4f30\",\"line_width\":2}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"324d4674-c382-4f0e-b5e5-289e6f8726bb\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#fc4f30\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"e03a18cc-13ca-4be4-b0a7-eb92f7ddb080\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#fc4f30\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"8d7a1e0f-d243-4b3b-a6cb-876754c514f6\",\"attributes\":{\"tags\":[\"apply_ranges\"],\"x\":{\"type\":\"field\",\"field\":\"time\"},\"y\":{\"type\":\"field\",\"field\":\"population\"},\"line_color\":\"#fc4f30\",\"line_alpha\":0.2,\"line_width\":2}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"3ff7f518-60af-46d2-af9e-450591148459\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"9d45f56f-e7ac-43cd-953d-d4b6a89c1cd7\",\"attributes\":{\"tags\":[\"hv_created\"],\"renderers\":\"auto\",\"zoom_together\":\"none\"}},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"b79885f5-0514-4995-9d8c-f43b9f550a1e\",\"attributes\":{\"tags\":[\"hv_created\"],\"renderers\":[{\"id\":\"d102826e-83bd-41c0-bc56-aedf6cbf37e2\"},{\"id\":\"f559644e-96ee-48ec-80fa-a47d5504d76f\"}],\"tooltips\":[[\"state\",\"@{state}\"],[\"time\",\"@{time}\"],[\"population\",\"@{population}\"]],\"sort_by\":null}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"d9d9513f-d75e-4d6f-afd4-069dd30c8288\"},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"284f6cb4-bfc1-4046-b2a7-4a5a19a5f62c\"},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"058163ed-28e8-4666-9755-6da84af8aecb\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"70e502c4-10e5-4d66-8891-76444b892f16\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"37f45802-8f34-4818-a5af-c52887265807\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"70983dc6-79bb-4990-b987-ec8b08354f59\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"fe06fed0-7f9b-4295-9db9-4f7b2901989f\"}],\"active_drag\":{\"id\":\"284f6cb4-bfc1-4046-b2a7-4a5a19a5f62c\"},\"active_scroll\":{\"id\":\"9d45f56f-e7ac-43cd-953d-d4b6a89c1cd7\"}}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"bde0afa1-49c7-4d51-88b3-85f7b962a1dc\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"2af46441-e2b0-49dc-a464-d4932c77c0a4\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"1cde1e2d-3a58-4a17-a6ad-cdb15ff2da1e\"},\"axis_label\":\"population\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"fc4506dc-be11-4a6a-8b43-d744657f0259\"}}}],\"right\":[{\"type\":\"object\",\"name\":\"Legend\",\"id\":\"81e551ec-8373-4f72-8b6d-3b56907ffb27\",\"attributes\":{\"location\":[0,0],\"title\":\"state\",\"click_policy\":\"mute\",\"items\":[{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"7b029eca-f033-4d5e-bd1e-8ed0bdc8370d\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"|0>\"},\"renderers\":[{\"id\":\"d102826e-83bd-41c0-bc56-aedf6cbf37e2\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"202a06e8-cc06-4f3b-a0e9-2ee161c23643\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"|1>\"},\"renderers\":[{\"id\":\"f559644e-96ee-48ec-80fa-a47d5504d76f\"}]}}]}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"629d0ed0-d761-4ac0-82b0-7c9323c56eb5\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"b38d6fee-b4e7-4b20-8cfe-de6b549d7f8c\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"3462347d-29b7-4e68-bd3d-d03d7f4f24a7\"},\"axis_label\":\"time [arb. u.]\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"ccfdacb7-5b07-4d76-91d6-9bae1ece39db\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"cb9ec08c-c1da-42e6-b9f1-87414018d822\",\"attributes\":{\"axis\":{\"id\":\"629d0ed0-d761-4ac0-82b0-7c9323c56eb5\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"a3c8ef5e-cbb5-48e2-9185-02d417d9d5c7\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"bde0afa1-49c7-4d51-88b3-85f7b962a1dc\"},\"grid_line_color\":null}}],\"min_border_top\":10,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"output_backend\":\"webgl\"}},{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"89826fd0-1d85-4f6f-92ed-35d67022317e\",\"attributes\":{\"name\":\"HSpacer00301\",\"stylesheets\":[\"\\n:host(.pn-loading):before, .pn-loading:before {\\n  background-color: #c3c3c3;\\n  mask-size: auto calc(min(50%, 300px));\\n  -webkit-mask-size: auto calc(min(50%, 300px));\\n}\",{\"id\":\"a7237540-19a5-4acd-a337-0ab3584b800d\"},{\"id\":\"ebaa6630-22fa-417b-98b7-5ec3ae215fd2\"},{\"id\":\"322e843c-a16b-49b1-8cb2-fd2774549ea6\"}],\"min_width\":0,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}}]}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"start\",\"kind\":\"Any\",\"default\":0},{\"name\":\"end\",\"kind\":\"Any\",\"default\":100},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"ReactiveESM1\",\"properties\":[{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"JSComponent1\",\"properties\":[{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"ReactComponent1\",\"properties\":[{\"name\":\"use_shadow_dom\",\"kind\":\"Any\",\"default\":true},{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"AnyWidgetComponent1\",\"properties\":[{\"name\":\"use_shadow_dom\",\"kind\":\"Any\",\"default\":true},{\"name\":\"esm_constants\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"max_notifications\",\"kind\":\"Any\",\"default\":5},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_rendered\",\"kind\":\"Any\",\"default\":false},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"request_value1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"_synced\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_request_sync\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"holoviews.plotting.bokeh.raster.HoverModel\",\"properties\":[{\"name\":\"xy\",\"kind\":\"Any\",\"default\":null},{\"name\":\"data\",\"kind\":\"Any\",\"default\":null}]}]}};\n",
       "  var render_items = [{\"docid\":\"cb069bed-f61f-4b46-b1b1-b48e21f83a66\",\"roots\":{\"6033504c-7cd7-4a59-aeb5-27d09d3f2d14\":\"cc940056-6cdb-4812-8c0b-45acd9d5bb7e\"},\"root_ids\":[\"6033504c-7cd7-4a59-aeb5-27d09d3f2d14\"]}];\n",
       "  var docs = Object.values(docs_json)\n",
       "  if (!docs) {\n",
       "    return\n",
       "  }\n",
       "  const version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n",
       "  async function embed_document(root) {\n",
       "    var Bokeh = get_bokeh(root)\n",
       "    await Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "    for (const render_item of render_items) {\n",
       "      for (const root_id of render_item.root_ids) {\n",
       "\tconst id_el = document.getElementById(root_id)\n",
       "\tif (id_el.children.length && id_el.children[0].hasAttribute('data-root-id')) {\n",
       "\t  const root_el = id_el.children[0]\n",
       "\t  root_el.id = root_el.id + '-rendered'\n",
       "\t  for (const child of root_el.children) {\n",
       "            // Ensure JupyterLab does not capture keyboard shortcuts\n",
       "            // see: https://jupyterlab.readthedocs.io/en/4.1.x/extension/notebook.html#keyboard-interaction-model\n",
       "\t    child.setAttribute('data-lm-suppress-shortcuts', 'true')\n",
       "\t  }\n",
       "\t}\n",
       "      }\n",
       "    }\n",
       "  }\n",
       "  function get_bokeh(root) {\n",
       "    if (root.Bokeh === undefined) {\n",
       "      return null\n",
       "    } else if (root.Bokeh.version !== version) {\n",
       "      if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(version)) {\n",
       "\treturn null\n",
       "      }\n",
       "      return root.Bokeh.versions.get(version);\n",
       "    } else if (root.Bokeh.version === version) {\n",
       "      return root.Bokeh\n",
       "    }\n",
       "    return null\n",
       "  }\n",
       "  function is_loaded(root) {\n",
       "    var Bokeh = get_bokeh(root)\n",
       "    return (Bokeh != null && Bokeh.Panel !== undefined)\n",
       "  }\n",
       "  if (is_loaded(root)) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (is_loaded(root)) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else if (document.readyState == \"complete\") {\n",
       "        attempts++;\n",
       "        if (attempts > 200) {\n",
       "          clearInterval(timer);\n",
       "\t  var Bokeh = get_bokeh(root)\n",
       "\t  if (Bokeh == null || Bokeh.Panel == null) {\n",
       "            console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n",
       "\t  } else {\n",
       "\t    console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n",
       "\t    embed_document(root)\n",
       "\t  }\n",
       "        }\n",
       "      }\n",
       "    }, 25, root)\n",
       "  }\n",
       "})(window);</script>"
      ],
      "text/plain": [
       ":NdOverlay   [state]\n",
       "   :Curve   [time]   (population)"
      ]
     },
     "execution_count": 9,
     "metadata": {
      "application/vnd.holoviews_exec.v0+json": {
       "id": "6033504c-7cd7-4a59-aeb5-27d09d3f2d14"
      }
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import hvplot.xarray\n",
    "\n",
    "ds.hvplot.line(x=\"time\", y=\"population\", by=\"state\", xlabel=\"time [arb. u.]\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "18",
   "metadata": {},
   "source": [
    "Great, you just simulated your first quantum system in QruiseML! You can now explore the other notebooks for more advanced examples covering different quantum platforms and QruiseML features."
   ]
  }
 ],
 "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.11.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
