Quantum Wave Function Simulation
- Rust 86.2%
- Makefile 11.7%
- Java 2.1%
| frames | ||
| schroidnger-equation | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| output.mp4 | ||
| README.md | ||
| wave_fn.mp4 | ||
Quantum Wave Function Simulation
This is a Rust project that simulates the evolution of a quantum wave function based on the Schrödinger equation. The project contains a WaveFunction struct that represents a quantum state, including properties for the wave function itself, its derivatives, the energy of the system, potential energy function, position, change in position, and mass of the particle.
Features
- Defines and updates a
WaveFunctionstruct based on the Schrödinger equation. - Calculates potential energy based on the harmonic oscillator potential.
- Generates a series of frames, each displaying the wave function at a given point in time.
- Uses the Plotters library to create these frames as PNG images.
- Uses FFmpeg to convert these frames into a video, allowing for easy visualization of the wave function's evolution over time.
Usage
Prerequisites
This project requires that Rust and FFmpeg are installed on your machine.
Running the Simulation
- Clone the repository.
- Run
cargo buildto compile the project. - Run
cargo runto execute the simulation. This will generate a series of PNG images in aframesdirectory. - The images in the
framesdirectory are then compiled into anoutput.mp4video file.
The simulation parameters can be adjusted by modifying the WaveFunction::new() call in the main() function.
Contributing
Please feel free to submit issues and pull requests.
License
This project is licensed under the MIT License.