This Python script simulates and visualizes the quantum mechanical behavior of a particle in a one-dimensional infinite potential well (particle in a box). The program generates interactive plots of both the wavefunctions and probability densities for different quantum states.
- Calculation of wavefunctions for different quantum states (n=1,2,3)
- Visualization of probability densities
- Interactive plots using Plotly
- LaTeX-formatted equations and labels
- Multiple quantum states displayed simultaneously
To run this simulation, you'll need Python and the following Python packages:
numpy
plotly- Clone this repository (or download the .zip file in the main page):
git clone https://github.com/Wolfbanus/CF2-python-playground.git - Install the required packages:
pip install numpy plotly
Simply run the Python script with the terminal in the same folder as the .py file:
python3 particle_in_a_box.py