Giter Site home page Giter Site logo

saviornt / wave-function-with-probability-density Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6 KB

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

License: MIT License

Jupyter Notebook 100.00%
physics quantum-physics simulation jupyter-notebook

wave-function-with-probability-density's Introduction

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.

wave-function-with-probability-density's People

Contributors

saviornt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.