From aa85c6892a331082ce4617bc2e07a8d7b09c90b2 Mon Sep 17 00:00:00 2001 From: Matheus Gomes Cordeiro Date: Mon, 18 Nov 2024 13:35:51 -0300 Subject: [PATCH] Criado usando o Colab --- examples/speed_tests_numba_and_cython.ipynb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/speed_tests_numba_and_cython.ipynb b/examples/speed_tests_numba_and_cython.ipynb index 1392f15..1649f7a 100644 --- a/examples/speed_tests_numba_and_cython.ipynb +++ b/examples/speed_tests_numba_and_cython.ipynb @@ -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, @@ -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", @@ -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." ] }, { @@ -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",