Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/saviornt/wave-function-with-probability-density
- Owner: saviornt
- License: mit
- Created: 2024-04-24T09:11:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-24T09:24:09.000Z (10 months ago)
- Last Synced: 2024-12-15T03:18:48.461Z (about 2 months ago)
- Topics: jupyter-notebook, physics, quantum-physics, simulation
- Language: Jupyter Notebook
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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:
- Make sure you have the required libraries installed: numpy, plotly, ipywidgets. You can install them using pip install numpy plotly ipywidgets.
- Save the code in a Python file (e.g., wavefunction_visualization.py).
- 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.