Skip to content

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

License

Notifications You must be signed in to change notification settings

saviornt/Wave-Function-with-Probability-Density

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published