I have just begun learning computer science to apply it to Physics and I am trying to write a code for solving Schrödinger's equation of the harmonic oscillator (setting $V=\frac{x^2}{2}$) in one dimension.
I know the basics of how to do this, but I would like to know whether some resources are available, or if someone could help me how to write my program (I feel more confident with Python, but C, C++, or any other language works fine too).
I know I should:
- Choose a value for the maximum angular momentum $\ell$ and the quantum number $n$.
- Seek an energy interval $E_i, E_{i-1}$ where I can look more accurately for the solution.
- Find the best approximate value of energy through an algorithm (ex: secant formula).
- Compare the interval in energies with a certain accuracy $\epsilon$ established at the beginning.
Thank you in advance for your help!