11: Switch to Riemann midpoint sums and comment on that
This commit is contained in:
@ -259,7 +259,7 @@
|
||||
"text": [
|
||||
"Eigenstate n = 0 yields total probability mass = 0.9999999999999999\n",
|
||||
"Eigenstate n = 1 yields total probability mass = 1.0\n",
|
||||
"Eigenstate n = 2 yields total probability mass = 0.9999999999999997\n",
|
||||
"Eigenstate n = 2 yields total probability mass = 1.0\n",
|
||||
"Eigenstate n = 3 yields total probability mass = 1.0\n"
|
||||
]
|
||||
},
|
||||
@ -286,9 +286,9 @@
|
||||
"fig = plt.figure(figsize=(12,12))\n",
|
||||
"\n",
|
||||
"for n in range(the_first_few):\n",
|
||||
" # TODO: Should SEQStat return normalized eigenfunctions? \n",
|
||||
" # Normalize the found eigenfunctions\n",
|
||||
" prob_mass = np.sum((x[1:] - x[:-1])*Psi[:-1, n]**2)\n",
|
||||
" # TODO: Should SEQStat return normalized eigenfunctions?\n",
|
||||
" # Normalize the found eigenfunctions using Riemann midpoint sums\n",
|
||||
" prob_mass = np.sum((x[1:] - x[:-1])*(Psi[1:, n]**2 + Psi[:-1, n]**2)/2)\n",
|
||||
" Psi[:, n] /= np.sqrt(prob_mass)\n",
|
||||
" \n",
|
||||
" # Confirm normalization\n",
|
||||
|
||||
Reference in New Issue
Block a user