Interactive particle-in-a-box wavefunctions in Jupyter

(0 comments)

A very quick plot of particle-in-a-box wavefunctions with interactive control over the box length, $L$ – this kind of thing is very easy with Jupyter and ipywidgets' interact method: Just define a function to plot the wavefunction for a provided argument $L$ and pass it to interact along with a range and stepsize of values of $L$ and a slider will appear above the plot. Event callbacks and range-checking are all handled for you.

The Jupyter Notebook can be downloaded here or using the nbviewer website. Some example (static!) images of the output plot are given below.

Particle in a box: L=1

Particle in a box: L=3.6

Current rating: 2

Comments

Comments are pre-moderated. Please be patient and your comment will appear soon.

There are currently no comments

New Comment

required

required (not published)

optional

required