# Example usage x = np.linspace(-5, 5, 1000) n = 0 # Quantum number
[ \psi_n(x) = \left(\frac{m\omega}{\pi\hbar}\right)^{1/4} \frac{1}{\sqrt{2^n n!}} H_n(\sqrt{\frac{m\omega}{\hbar}}x) e^{-\frac{m\omega x^2}{2\hbar}} ] liboff quantum mechanics solutions pdf.zip
plt.plot(x, wavefunction) plt.title(f'Wavefunction of the Quantum Harmonic Oscillator for n={n}') plt.xlabel('Position') plt.ylabel('Wavefunction') plt.show() This example calculates and plots the wave function for the ground state ((n=0)) of a quantum harmonic oscillator. You can modify n to see the wavefunctions for different energy levels. # Example usage x = np