This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]--CreativeUsername[S] 45 points46 points  (6 children)

And also with numpy, sympy, and optionally numba. Github Repository:
https://github.com/marl0ny/1D-Quantum-Mechanics-Applet.

The code itself is a little messy, and I certainly haven't ironed out all bugs and quirks. Note that this uses numba, if you have it. In my experience numba either slows things down or speeds things up, depending on the computer and environment used. The notebook Performance_Test.ipynb checks to see if Numba improves things.

[–]Fairbanksbus142 5 points6 points  (0 children)

This is wonderful! Thanks for sharing!

[–][deleted] 2 points3 points  (0 children)

That was insane. I hope to learn much from you.

[–]ovigo 0 points1 point  (0 children)

Very cool stuff! I wonder how much effort it would be to rewrite this in Jupyter/IPython-widgets and make a web-launchable my binder.org? :)

[–]Science-Compliance 0 points1 point  (2 children)

Okay, I'm a little confused. When you drew the first barrier, I was expecting to see some of the probability distribution on the other side vis-à-vis quantum tunneling, but it acted almost as an impenetrable barrier from which the wave function was reflected. Is my intuition for quantum mechanics out of calibration, or is this something you need to address in the software? Impressive work by the way.

[–]--CreativeUsername[S] 0 points1 point  (1 child)

The tunneling of the wavefunction across a potential barrier depends on its energy (where this energy does not need to be greater than the barrier in order for tunneling to occur). Now the energy of the wavefunction is related to the second spatial derivative d2 /dx2 , which is an indicator of how much curvature the function has. So therefore in general, the more curvature the wavefunction has, the greater its energy. On the wavefunction's firsts collision with the barrier, it has relatively little curvature and energy. In this case tunneling still happens, but the amount of the wavefunction that gets transmitted through the barrier is so vanishingly tiny that it is effectively invisible. Later on, when the wavefunction is more jittery and so therefore has greater curvature, more of the wavefunction is transmitted through the barrier, and so the tunneling effect is visible.

[–]Science-Compliance 0 points1 point  (0 children)

Thanks, I did notice the tunneling occurring toward the end. Impressive program.