|
106 | 106 | },
|
107 | 107 | {
|
108 | 108 | "cell_type": "code",
|
109 |
| - "execution_count": null, |
| 109 | + "execution_count": 5, |
110 | 110 | "metadata": {},
|
111 | 111 | "outputs": [],
|
112 | 112 | "source": [
|
|
121 | 121 | },
|
122 | 122 | {
|
123 | 123 | "cell_type": "code",
|
124 |
| - "execution_count": null, |
| 124 | + "execution_count": 6, |
125 | 125 | "metadata": {},
|
126 | 126 | "outputs": [],
|
127 | 127 | "source": [
|
|
221 | 221 | },
|
222 | 222 | {
|
223 | 223 | "cell_type": "code",
|
224 |
| - "execution_count": null, |
| 224 | + "execution_count": 7, |
225 | 225 | "metadata": {},
|
226 |
| - "outputs": [], |
| 226 | + "outputs": [ |
| 227 | + { |
| 228 | + "data": { |
| 229 | + "application/vnd.jupyter.widget-view+json": { |
| 230 | + "model_id": "0c205274437f4883b6b9a654632ebc51", |
| 231 | + "version_major": 2, |
| 232 | + "version_minor": 0 |
| 233 | + }, |
| 234 | + "text/plain": [ |
| 235 | + "HBox(children=(VBox(children=(Label(value='Targeted eigenvalue'), HBox(children=(FloatSlider(value=-0.03, layo…" |
| 236 | + ] |
| 237 | + }, |
| 238 | + "metadata": {}, |
| 239 | + "output_type": "display_data" |
| 240 | + }, |
| 241 | + { |
| 242 | + "data": { |
| 243 | + "application/vnd.jupyter.widget-view+json": { |
| 244 | + "model_id": "7befa6aa973542e698ef88e678524448", |
| 245 | + "version_major": 2, |
| 246 | + "version_minor": 0 |
| 247 | + }, |
| 248 | + "text/plain": [ |
| 249 | + "Output()" |
| 250 | + ] |
| 251 | + }, |
| 252 | + "metadata": {}, |
| 253 | + "output_type": "display_data" |
| 254 | + } |
| 255 | + ], |
227 | 256 | "source": [
|
228 | 257 | "mu = 0.06 # Potential parameter\n",
|
229 | 258 | "L = 1.5 # x range [-L,L]\n",
|
|
363 | 392 | "\n",
|
364 | 393 | "def on_width_change(change):\n",
|
365 | 394 | " global ew, ef, x, dx, V\n",
|
366 |
| - " ax[0].lines.clear()\n", |
367 |
| - " ax[1].lines.clear()\n", |
| 395 | + " ax[0].clear()\n", |
| 396 | + " ax[1].clear()\n", |
368 | 397 | " \n",
|
369 | 398 | " try:\n",
|
370 | 399 | " ann.remove()\n",
|
|
377 | 406 | "\n",
|
378 | 407 | "def on_depth_change(change):\n",
|
379 | 408 | " global ew, ef, x, dx, V\n",
|
380 |
| - " ax[0].lines.clear()\n", |
381 |
| - " ax[1].lines.clear()\n", |
| 409 | + " ax[0].clear()\n", |
| 410 | + " ax[1].clear()\n", |
382 | 411 | " \n",
|
383 | 412 | " try:\n",
|
384 | 413 | " ann.remove()\n",
|
|
391 | 420 | " loop1.max = max(V)\n",
|
392 | 421 | " \n",
|
393 | 422 | "def on_xfak_change(change):\n",
|
394 |
| - " ax[0].lines.clear()\n", |
395 |
| - " ax[1].lines.clear()\n", |
| 423 | + " ax[0].clear()\n", |
| 424 | + " ax[1].clear()\n", |
396 | 425 | " \n",
|
397 | 426 | " try:\n",
|
398 | 427 | " ann.remove()\n",
|
|
455 | 484 | "label3 = Label(value=\"(click on a state to select it)\")\n",
|
456 | 485 | "label4 = Label(value=\"(tune to zoom the eigenfunctions)\")\n",
|
457 | 486 | "\n",
|
458 |
| - "display(HBox([VBox([label1, HBox([loop1, loop2, loop3, loop4]), Leng, search, order, label2, flip]), output]))" |
| 487 | + "full_layout=HBox([VBox([label1, HBox([loop1, loop2, loop3, loop4]), Leng, search, order, label2, flip]),output])\n", |
| 488 | + "display(full_layout)" |
459 | 489 | ]
|
460 | 490 | },
|
461 | 491 | {
|
|
467 | 497 | },
|
468 | 498 | {
|
469 | 499 | "cell_type": "code",
|
470 |
| - "execution_count": null, |
| 500 | + "execution_count": 8, |
471 | 501 | "metadata": {},
|
472 |
| - "outputs": [], |
| 502 | + "outputs": [ |
| 503 | + { |
| 504 | + "data": { |
| 505 | + "application/vnd.jupyter.widget-view+json": { |
| 506 | + "model_id": "d36195895f1c408c806c02869c447a75", |
| 507 | + "version_major": 2, |
| 508 | + "version_minor": 0 |
| 509 | + }, |
| 510 | + "text/plain": [ |
| 511 | + "HBox(children=(FloatSlider(value=1.2, description='Width: ', max=2.0, min=0.1), FloatSlider(value=0.2, descrip…" |
| 512 | + ] |
| 513 | + }, |
| 514 | + "metadata": {}, |
| 515 | + "output_type": "display_data" |
| 516 | + }, |
| 517 | + { |
| 518 | + "data": { |
| 519 | + "application/vnd.jupyter.widget-view+json": { |
| 520 | + "model_id": "028876bb1fec458ab2cf5bc547bd4011", |
| 521 | + "version_major": 2, |
| 522 | + "version_minor": 0 |
| 523 | + }, |
| 524 | + "text/plain": [ |
| 525 | + "VBox(children=(HBox(children=(FloatSlider(value=3.0, description='Zoom factor: ', max=5.0, min=1.0, step=0.5),…" |
| 526 | + ] |
| 527 | + }, |
| 528 | + "metadata": {}, |
| 529 | + "output_type": "display_data" |
| 530 | + } |
| 531 | + ], |
473 | 532 | "source": [
|
474 | 533 | "display(HBox([swidth, sdepth]), VBox([HBox([sfak, label4]), HBox([update, label3])]))"
|
475 | 534 | ]
|
|
535 | 594 | "name": "python",
|
536 | 595 | "nbconvert_exporter": "python",
|
537 | 596 | "pygments_lexer": "ipython3",
|
538 |
| - "version": "3.11.0" |
| 597 | + "version": "3.10.12" |
539 | 598 | },
|
540 | 599 | "voila": {
|
541 | 600 | "authors": "Dou Du and Giovanni Pizzi"
|
|
0 commit comments