Comparison between exact and numerical eigenfunctions

We now compare exact and numerically calculated eigenfunctions for a couple of low lying levels and consider the case where \( N_{\mathrm{grid}}= 256 \).

fig, ax = h2morse.plot()
phase = 0.01*np.array([-1, -1, -1, -1, -1])
for s in range(5):
    ax.plot(x, energies[s] + phase[s]*psi[:, s]/np.sqrt(es.deltax),
            'o', color='magenta', markersize=3)
plt.ylim(-0.01, 0.19)
plt.xlim(0.5, 4)

plt.show()

Comparison of numerical and exact eigenfunctions