A newer version of the Streamlit SDK is available:
1.54.0
title: Hand-wave Quantum Solver
emoji: π
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.0
app_file: app.py
pinned: false
βοΈ Quantum Potential Solver
Author: Ahilan Kumaresan
Institution: Simon Fraser University
Field: Mathematical & Computational Physics
π― Overview
An advanced numerical solver for the Time-Independent SchrΓΆdinger Equation (TISE) using the Finite Difference Method. This project demonstrates rigorous computational physics methodology with comprehensive verification against analytical solutions and external libraries.
π¬ Key Features
1. Accurate Numerical Solver
- Method: 3-point Central Difference stencil for the Laplacian operator
- Grid: Adaptive resolution (1000-2000 points)
- Units: Hartree Atomic Units (β=1, m=1)
- Boundary Conditions: Dirichlet (infinite walls)
2. Multiple Potential Types
- Infinite Square Well
- Harmonic Oscillator
- Double Well Potential
- Custom potentials via hand gestures (camera input)
3. Interactive Visualizations
- Plotly-based interactive charts
- Wavefunction probability densities
- Energy level diagrams
- Real-time solver performance metrics
4. Rigorous Verification
Analytical Benchmarks
| System | Max Error |
|---|---|
| Infinite Square Well | < 0.003% |
| Harmonic Oscillator | < 0.02% |
| Half-Harmonic Oscillator | < 0.8% |
| Triangular Potential | < 0.003% |
External Library Comparison
- Cross-verified with QMSolve (Python quantum mechanics package)
- Double Well Potential: Agreement within 0.25%
- Demonstrates accuracy for systems without analytical solutions
π Mathematical Foundation
The solver discretizes the TISE:
Using finite differences:
This transforms the problem into a matrix eigenvalue equation solved via numpy.linalg.eigh.
π οΈ Technical Implementation
- Language: Python 3.12
- Core Libraries: NumPy, SciPy
- Visualization: Plotly, Matplotlib
- UI Framework: Streamlit
- Computer Vision: MediaPipe (for hand gesture input)
π Verification Scripts
The project includes comprehensive verification:
verify_physics.py: Analytical benchmarksverify_comparison.py: QMSolve cross-verificationComparison_Notebook.ipynb: Jupyter notebook with detailed analysis
π Academic Applications
This project demonstrates:
- Numerical Methods: Finite difference discretization of differential operators
- Linear Algebra: Eigenvalue problems for Hermitian matrices
- Quantum Mechanics: Stationary states and energy quantization
- Software Engineering: Modular design, comprehensive testing, professional documentation
π Usage
Interactive Simulator
- Select a potential type from the sidebar
- Adjust parameters using sliders
- View real-time solutions with interactive plots
Verification Dashboard
- Navigate to "Benchmarks & Verification" to see accuracy metrics
- Compare against analytical solutions and QMSolve
Theory Section
- Detailed mathematical background
- Implementation methodology
- Code verification
π Repository Structure
psi_solve2/
βββ app.py # Main Streamlit application
βββ functions.py # Physics engine (solver + potentials)
βββ verify_physics.py # Analytical verification script
βββ verify_comparison.py # QMSolve comparison script
βββ Comparison_Notebook.ipynb # Jupyter analysis notebook
βββ requirements.txt # Python dependencies
π Citation
If you use this solver in your research, please cite:
Kumaresan, A. (2024). Quantum Potential Solver: A Verified Finite Difference
Implementation for the Time-Independent SchrΓΆdinger Equation.
Simon Fraser University.
π§ Contact
Ahilan Kumaresan
Mathematical & Computational Physics
Simon Fraser University
This project showcases advanced computational physics methodology suitable for graduate-level research in quantum mechanics and numerical analysis.