Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/saviornt/wave-function-with-probability-density

Jupyter notebook that visualizes a wave function for a particle at a specific time.
https://github.com/saviornt/wave-function-with-probability-density

jupyter-notebook physics quantum-physics simulation

Last synced: 3 days ago
JSON representation

Jupyter notebook that visualizes a wave function for a particle at a specific time.

Awesome Lists containing this project

README

        

Wavefunction Visualization

This Python code visualizes a wave function (Ψ) for a particle and its probability density. The wave function describes the probability of finding the particle at a specific position (x) and time (t).

Features:


  • Interactive plot using Plotly.

  • Sliders to adjust wave number (k) and time (t).

  • Real part of the wave function and probability density are displayed.


Running the Script:



  1. Make sure you have the required libraries installed: numpy, plotly, ipywidgets. You can install them using pip install numpy plotly ipywidgets.

  2. Save the code in a Python file (e.g., wavefunction_visualization.py).

  3. Run the script from your terminal using python wavefunction_visualization.py.



Explanation:




  • Wave number (k): Relates to the momentum of the particle.

  • Time (t): Represents the specific time at which the wave function is visualized.




Mathematical Background:



The wave function is visualized using the following equation:



Ψ(x, t) = exp(1j * (k * x - t)) + exp(-1j * (k * x + t))



where:




  • Ψ(x, t): Wave function at position (x) and time (t)

  • k: Wave number (related to momentum)

  • t: Time

  • j: Imaginary unit




Further Customization:



You can modify the code to visualize the imaginary part of the wave function instead of the real part.
The code can be extended to include additional features, such as animation to show wave function evolution over time.