|
29 | 29 | }, |
30 | 30 | { |
31 | 31 | "cell_type": "code", |
32 | | - "execution_count": null, |
| 32 | + "execution_count": 2, |
33 | 33 | "metadata": {}, |
34 | 34 | "outputs": [], |
35 | 35 | "source": [ |
|
45 | 45 | " state = rydstate.RydbergStateSQDTAlkali(species, n, l=l, j=l + 0.5)\n", |
46 | 46 | " potential = state.potential\n", |
47 | 47 | " nu = state.nu\n", |
| 48 | + " RadialKet.clear_cached_instances()\n", |
48 | 49 | " radial = RadialKet(nu, potential, dz=1e-3, use_njit=use_njit)\n", |
49 | 50 | " radial.integrate_wavefunction()\n", |
50 | 51 | "\n", |
51 | 52 | " results = []\n", |
52 | 53 | " for species, n, l, use_njit in test_cases:\n", |
53 | 54 | " # Setup the test function\n", |
54 | | - " stmt = \"radial = RadialKet(nu, potential, dz=1e-3, use_njit=use_njit)\\nradial.integrate_wavefunction()\"\n", |
| 55 | + " stmt = (\n", |
| 56 | + " \"RadialKet.clear_cached_instances()\\n\"\n", |
| 57 | + " \"radial = RadialKet(nu, potential, dz=1e-3, use_njit=use_njit)\\n\"\n", |
| 58 | + " \"radial.integrate_wavefunction()\"\n", |
| 59 | + " )\n", |
55 | 60 | "\n", |
56 | 61 | " # Time the integration multiple times and take average/std\n", |
57 | 62 | " globals_dict = {\n", |
|
92 | 97 | "----------------------------------------------------------------------\n", |
93 | 98 | " species n l use_njit time (ms) std (ms)\n", |
94 | 99 | "----------------------------------------------------------------------\n", |
95 | | - " H 100 80 True 14.74 0.96\n", |
96 | | - " H 100 80 False 140.28 4.93\n" |
| 100 | + " H 100 80 True 13.75 0.20\n", |
| 101 | + " H 100 80 False 136.34 10.99\n" |
97 | 102 | ] |
98 | 103 | } |
99 | 104 | ], |
|
0 commit comments