Skip to content

Commit

Permalink
Added missing fix to the shooting method notebook which allows proper…
Browse files Browse the repository at this point in the history
… rendering of all widgets in voila.
  • Loading branch information
Taylor-96 committed May 4, 2024
1 parent 9c9350c commit 4c71401
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions notebook/quantum-mechanics/shooting_method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -115,13 +115,13 @@
"from numpy import linspace, sqrt, ones, arange, diag, argsort, zeros\n",
"from scipy.linalg import eigh_tridiagonal\n",
"import matplotlib.pyplot as plt\n",
"from ipywidgets import FloatSlider, jslink, VBox, HBox, Button, Label, Layout, Checkbox, Output\n",
"from ipywidgets import FloatSlider, jslink, VBox, HBox, Button, Label, Layout, AppLayout, Checkbox, Output\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -221,32 +221,18 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0c205274437f4883b6b9a654632ebc51",
"model_id": "71b830916f404fb08f740ad0ea47e840",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Label(value='Targeted eigenvalue'), HBox(children=(FloatSlider(value=-0.03, layo…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7befa6aa973542e698ef88e678524448",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
"AppLayout(children=(VBox(children=(Label(value='Targeted eigenvalue'), HBox(children=(FloatSlider(value=-0.03,…"
]
},
"metadata": {},
Expand Down Expand Up @@ -484,7 +470,7 @@
"label3 = Label(value=\"(click on a state to select it)\")\n",
"label4 = Label(value=\"(tune to zoom the eigenfunctions)\")\n",
"\n",
"full_layout=HBox([VBox([label1, HBox([loop1, loop2, loop3, loop4]), Leng, search, order, label2, flip]),output])\n",
"full_layout=AppLayout(left_sidebar=VBox([label1, HBox([loop1, loop2, loop3, loop4]), Leng, search, order, label2, flip]),center=output,right_sidebar=None)\n",
"display(full_layout)"
]
},
Expand All @@ -497,13 +483,13 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d36195895f1c408c806c02869c447a75",
"model_id": "8d6196df0174453ca1a8662d5fc121d3",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -517,7 +503,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "028876bb1fec458ab2cf5bc547bd4011",
"model_id": "44a2d7e7ed2745f881463b76be807edc",
"version_major": 2,
"version_minor": 0
},
Expand Down

0 comments on commit 4c71401

Please sign in to comment.