Skip to content

Commit

Permalink
Criado usando o Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
fobos123deimos committed Nov 18, 2024
1 parent 73cc016 commit aa85c68
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions examples/speed_tests_numba_and_cython.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"source": [
"## Performance Comparison: Mr Mustard vs. Fast Wave for Single Fock & Single Position Wavefunctions\n",
"---\n",
"$$$$\n",
"**Explanation:** This analysis evaluates the computational efficiency of three approaches—Mr Mustard, Fast Wave (Numba), and Fast Wave (Cython)—for calculating the squared amplitude $|\\psi_n(x)|^2$ of a Single Fock & Single Position Wavefunction $\\psi_n(x)$. The Single Fock & Single Position wavefunction, $\\psi_{i}(x)$, maps a scalar input $x$ to a scalar output. Execution times for each method are plotted to facilitate comparison."
],
"metadata": {
"id": "f3JX7gvQA77f"
}
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -112,7 +124,6 @@
}
],
"source": [
"#@title Comparing Mr Mustard's speed to Fast Wave (Single Fock & Single Position; real values)\n",
"n = 30 #@param\n",
"x_max = 5.0 #@param\n",
"x_min = -5.0 #@param\n",
Expand Down Expand Up @@ -164,8 +175,10 @@
"id": "j4MOFicqZYF6"
},
"source": [
"\n",
"[Scptt: add text to explain the difference between the first comparison \"single fock, signle position\" and the second comparison \"single fock, multile position\".]"
"## Performance Comparison: Mr Mustard vs. Fast Wave for Single Fock & Multiple Position Wavefunctions\n",
"---\n",
"$$$$\n",
"**Explanation:** This analysis evaluates the computational efficiency of three approaches—Mr Mustard, Fast Wave (Numba), and Fast Wave (Cython)—for calculating the squared amplitude $|\\psi_n(X_{m})|^2$ of a Single Fock & Multiple Position Wavefunction $\\psi_n(X_{m})$. The Single Fock & Multiple Position wavefunction, $\\psi_{i}(X)$, maps an array of position inputs $X_{m}$ to an array of corresponding outputs: $[\\psi_{i}(x_{1}), \\psi_{i}(x_{2}), ..., \\psi_{i}(x_{m})]$. Execution times for each method are plotted to facilitate comparison."
]
},
{
Expand Down Expand Up @@ -193,8 +206,6 @@
}
],
"source": [
"#@title Comparing Mr Mustard's speed to Fast Wave (Single Fock & Multiple Position; real values)\n",
"\n",
"n = 50 #@param\n",
"x_max = 5.0 #@param\n",
"x_min = -5.0 #@param\n",
Expand Down

0 comments on commit aa85c68

Please sign in to comment.