Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,142 +1,142 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Hand-wave Quantum Solver
|
| 3 |
-
emoji: π
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: purple
|
| 6 |
-
sdk: streamlit
|
| 7 |
-
sdk_version: "1.28.0"
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
# βοΈ Quantum Potential Solver
|
| 13 |
-
|
| 14 |
-
**Author:** Ahilan Kumaresan
|
| 15 |
-
**Institution:** Simon Fraser University
|
| 16 |
-
**Field:** Mathematical & Computational Physics
|
| 17 |
-
|
| 18 |
-
---
|
| 19 |
-
|
| 20 |
-
## π― Overview
|
| 21 |
-
|
| 22 |
-
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.
|
| 23 |
-
|
| 24 |
-
## π¬ Key Features
|
| 25 |
-
|
| 26 |
-
### 1. **Accurate Numerical Solver**
|
| 27 |
-
- **Method:** 3-point Central Difference stencil for the Laplacian operator
|
| 28 |
-
- **Grid:** Adaptive resolution (1000-2000 points)
|
| 29 |
-
- **Units:** Hartree Atomic Units (β=1, m=1)
|
| 30 |
-
- **Boundary Conditions:** Dirichlet (infinite walls)
|
| 31 |
-
|
| 32 |
-
### 2. **Multiple Potential Types**
|
| 33 |
-
- Infinite Square Well
|
| 34 |
-
- Harmonic Oscillator
|
| 35 |
-
- Double Well Potential
|
| 36 |
-
- Custom potentials via hand gestures (camera input)
|
| 37 |
-
|
| 38 |
-
### 3. **Interactive Visualizations**
|
| 39 |
-
- Plotly-based interactive charts
|
| 40 |
-
- Wavefunction probability densities
|
| 41 |
-
- Energy level diagrams
|
| 42 |
-
- Real-time solver performance metrics
|
| 43 |
-
|
| 44 |
-
### 4. **Rigorous Verification**
|
| 45 |
-
|
| 46 |
-
#### Analytical Benchmarks
|
| 47 |
-
| System | Max Error |
|
| 48 |
-
|--------|-----------|
|
| 49 |
-
| Infinite Square Well | < 0.003% |
|
| 50 |
-
| Harmonic Oscillator | < 0.02% |
|
| 51 |
-
| Half-Harmonic Oscillator | < 0.8% |
|
| 52 |
-
| Triangular Potential | < 0.003% |
|
| 53 |
-
|
| 54 |
-
#### External Library Comparison
|
| 55 |
-
- **Cross-verified with QMSolve** (Python quantum mechanics package)
|
| 56 |
-
- **Double Well Potential:** Agreement within 0.25%
|
| 57 |
-
- Demonstrates accuracy for systems without analytical solutions
|
| 58 |
-
|
| 59 |
-
## π Mathematical Foundation
|
| 60 |
-
|
| 61 |
-
The solver discretizes the TISE:
|
| 62 |
-
|
| 63 |
-
$$\hat{H}\psi(x) = E\psi(x)$$
|
| 64 |
-
|
| 65 |
-
$$\left[ -\frac{\hbar^2}{2m}\frac{d^2}{dx^2} + V(x) \right]\psi(x) = E\psi(x)$$
|
| 66 |
-
|
| 67 |
-
Using finite differences:
|
| 68 |
-
|
| 69 |
-
$$\frac{d^2\psi}{dx^2} \approx \frac{\psi_{i+1} - 2\psi_i + \psi_{i-1}}{\Delta x^2}$$
|
| 70 |
-
|
| 71 |
-
This transforms the problem into a matrix eigenvalue equation solved via `numpy.linalg.eigh`.
|
| 72 |
-
|
| 73 |
-
## π οΈ Technical Implementation
|
| 74 |
-
|
| 75 |
-
- **Language:** Python 3.12
|
| 76 |
-
- **Core Libraries:** NumPy, SciPy
|
| 77 |
-
- **Visualization:** Plotly, Matplotlib
|
| 78 |
-
- **UI Framework:** Streamlit
|
| 79 |
-
- **Computer Vision:** MediaPipe (for hand gesture input)
|
| 80 |
-
|
| 81 |
-
## π Verification Scripts
|
| 82 |
-
|
| 83 |
-
The project includes comprehensive verification:
|
| 84 |
-
- `verify_physics.py`: Analytical benchmarks
|
| 85 |
-
- `verify_comparison.py`: QMSolve cross-verification
|
| 86 |
-
- `Comparison_Notebook.ipynb`: Jupyter notebook with detailed analysis
|
| 87 |
-
|
| 88 |
-
## π Academic Applications
|
| 89 |
-
|
| 90 |
-
This project demonstrates:
|
| 91 |
-
1. **Numerical Methods:** Finite difference discretization of differential operators
|
| 92 |
-
2. **Linear Algebra:** Eigenvalue problems for Hermitian matrices
|
| 93 |
-
3. **Quantum Mechanics:** Stationary states and energy quantization
|
| 94 |
-
4. **Software Engineering:** Modular design, comprehensive testing, professional documentation
|
| 95 |
-
|
| 96 |
-
## π Usage
|
| 97 |
-
|
| 98 |
-
### Interactive Simulator
|
| 99 |
-
1. Select a potential type from the sidebar
|
| 100 |
-
2. Adjust parameters using sliders
|
| 101 |
-
3. View real-time solutions with interactive plots
|
| 102 |
-
|
| 103 |
-
### Verification Dashboard
|
| 104 |
-
- Navigate to "Benchmarks & Verification" to see accuracy metrics
|
| 105 |
-
- Compare against analytical solutions and QMSolve
|
| 106 |
-
|
| 107 |
-
### Theory Section
|
| 108 |
-
- Detailed mathematical background
|
| 109 |
-
- Implementation methodology
|
| 110 |
-
- Code verification
|
| 111 |
-
|
| 112 |
-
## π Repository Structure
|
| 113 |
-
|
| 114 |
-
```
|
| 115 |
-
psi_solve2/
|
| 116 |
-
βββ app.py # Main Streamlit application
|
| 117 |
-
βββ functions.py # Physics engine (solver + potentials)
|
| 118 |
-
βββ verify_physics.py # Analytical verification script
|
| 119 |
-
βββ verify_comparison.py # QMSolve comparison script
|
| 120 |
-
βββ Comparison_Notebook.ipynb # Jupyter analysis notebook
|
| 121 |
-
βββ requirements.txt # Python dependencies
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
## π Citation
|
| 125 |
-
|
| 126 |
-
If you use this solver in your research, please cite:
|
| 127 |
-
|
| 128 |
-
```
|
| 129 |
-
Kumaresan, A. (2024). Quantum Potential Solver: A Verified Finite Difference
|
| 130 |
-
Implementation for the Time-Independent SchrΓΆdinger Equation.
|
| 131 |
-
Simon Fraser University.
|
| 132 |
-
```
|
| 133 |
-
|
| 134 |
-
## π§ Contact
|
| 135 |
-
|
| 136 |
-
**Ahilan Kumaresan**
|
| 137 |
-
Mathematical & Computational Physics
|
| 138 |
-
Simon Fraser University
|
| 139 |
-
|
| 140 |
-
---
|
| 141 |
-
|
| 142 |
-
*This project showcases advanced computational physics methodology suitable for graduate-level research in quantum mechanics and numerical analysis.*
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Hand-wave Quantum Solver
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: "1.28.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# βοΈ Quantum Potential Solver
|
| 13 |
+
|
| 14 |
+
**Author:** Ahilan Kumaresan
|
| 15 |
+
**Institution:** Simon Fraser University
|
| 16 |
+
**Field:** Mathematical & Computational Physics
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## π― Overview
|
| 21 |
+
|
| 22 |
+
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.
|
| 23 |
+
|
| 24 |
+
## π¬ Key Features
|
| 25 |
+
|
| 26 |
+
### 1. **Accurate Numerical Solver**
|
| 27 |
+
- **Method:** 3-point Central Difference stencil for the Laplacian operator
|
| 28 |
+
- **Grid:** Adaptive resolution (1000-2000 points)
|
| 29 |
+
- **Units:** Hartree Atomic Units (β=1, m=1)
|
| 30 |
+
- **Boundary Conditions:** Dirichlet (infinite walls)
|
| 31 |
+
|
| 32 |
+
### 2. **Multiple Potential Types**
|
| 33 |
+
- Infinite Square Well
|
| 34 |
+
- Harmonic Oscillator
|
| 35 |
+
- Double Well Potential
|
| 36 |
+
- Custom potentials via hand gestures (camera input)
|
| 37 |
+
|
| 38 |
+
### 3. **Interactive Visualizations**
|
| 39 |
+
- Plotly-based interactive charts
|
| 40 |
+
- Wavefunction probability densities
|
| 41 |
+
- Energy level diagrams
|
| 42 |
+
- Real-time solver performance metrics
|
| 43 |
+
|
| 44 |
+
### 4. **Rigorous Verification**
|
| 45 |
+
|
| 46 |
+
#### Analytical Benchmarks
|
| 47 |
+
| System | Max Error |
|
| 48 |
+
|--------|-----------|
|
| 49 |
+
| Infinite Square Well | < 0.003% |
|
| 50 |
+
| Harmonic Oscillator | < 0.02% |
|
| 51 |
+
| Half-Harmonic Oscillator | < 0.8% |
|
| 52 |
+
| Triangular Potential | < 0.003% |
|
| 53 |
+
|
| 54 |
+
#### External Library Comparison
|
| 55 |
+
- **Cross-verified with QMSolve** (Python quantum mechanics package)
|
| 56 |
+
- **Double Well Potential:** Agreement within 0.25%
|
| 57 |
+
- Demonstrates accuracy for systems without analytical solutions
|
| 58 |
+
|
| 59 |
+
## π Mathematical Foundation
|
| 60 |
+
|
| 61 |
+
The solver discretizes the TISE:
|
| 62 |
+
|
| 63 |
+
$$\hat{H}\psi(x) = E\psi(x)$$
|
| 64 |
+
|
| 65 |
+
$$\left[ -\frac{\hbar^2}{2m}\frac{d^2}{dx^2} + V(x) \right]\psi(x) = E\psi(x)$$
|
| 66 |
+
|
| 67 |
+
Using finite differences:
|
| 68 |
+
|
| 69 |
+
$$\frac{d^2\psi}{dx^2} \approx \frac{\psi_{i+1} - 2\psi_i + \psi_{i-1}}{\Delta x^2}$$
|
| 70 |
+
|
| 71 |
+
This transforms the problem into a matrix eigenvalue equation solved via `numpy.linalg.eigh`.
|
| 72 |
+
|
| 73 |
+
## π οΈ Technical Implementation
|
| 74 |
+
|
| 75 |
+
- **Language:** Python 3.12
|
| 76 |
+
- **Core Libraries:** NumPy, SciPy
|
| 77 |
+
- **Visualization:** Plotly, Matplotlib
|
| 78 |
+
- **UI Framework:** Streamlit
|
| 79 |
+
- **Computer Vision:** MediaPipe (for hand gesture input)
|
| 80 |
+
|
| 81 |
+
## π Verification Scripts
|
| 82 |
+
|
| 83 |
+
The project includes comprehensive verification:
|
| 84 |
+
- `verify_physics.py`: Analytical benchmarks
|
| 85 |
+
- `verify_comparison.py`: QMSolve cross-verification
|
| 86 |
+
- `Comparison_Notebook.ipynb`: Jupyter notebook with detailed analysis
|
| 87 |
+
|
| 88 |
+
## π Academic Applications
|
| 89 |
+
|
| 90 |
+
This project demonstrates:
|
| 91 |
+
1. **Numerical Methods:** Finite difference discretization of differential operators
|
| 92 |
+
2. **Linear Algebra:** Eigenvalue problems for Hermitian matrices
|
| 93 |
+
3. **Quantum Mechanics:** Stationary states and energy quantization
|
| 94 |
+
4. **Software Engineering:** Modular design, comprehensive testing, professional documentation
|
| 95 |
+
|
| 96 |
+
## π Usage
|
| 97 |
+
|
| 98 |
+
### Interactive Simulator
|
| 99 |
+
1. Select a potential type from the sidebar
|
| 100 |
+
2. Adjust parameters using sliders
|
| 101 |
+
3. View real-time solutions with interactive plots
|
| 102 |
+
|
| 103 |
+
### Verification Dashboard
|
| 104 |
+
- Navigate to "Benchmarks & Verification" to see accuracy metrics
|
| 105 |
+
- Compare against analytical solutions and QMSolve
|
| 106 |
+
|
| 107 |
+
### Theory Section
|
| 108 |
+
- Detailed mathematical background
|
| 109 |
+
- Implementation methodology
|
| 110 |
+
- Code verification
|
| 111 |
+
|
| 112 |
+
## π Repository Structure
|
| 113 |
+
|
| 114 |
+
```
|
| 115 |
+
psi_solve2/
|
| 116 |
+
βββ app.py # Main Streamlit application
|
| 117 |
+
βββ functions.py # Physics engine (solver + potentials)
|
| 118 |
+
βββ verify_physics.py # Analytical verification script
|
| 119 |
+
βββ verify_comparison.py # QMSolve comparison script
|
| 120 |
+
βββ Comparison_Notebook.ipynb # Jupyter analysis notebook
|
| 121 |
+
βββ requirements.txt # Python dependencies
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
## π Citation
|
| 125 |
+
|
| 126 |
+
If you use this solver in your research, please cite:
|
| 127 |
+
|
| 128 |
+
```
|
| 129 |
+
Kumaresan, A. (2024). Quantum Potential Solver: A Verified Finite Difference
|
| 130 |
+
Implementation for the Time-Independent SchrΓΆdinger Equation.
|
| 131 |
+
Simon Fraser University.
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## π§ Contact
|
| 135 |
+
|
| 136 |
+
**Ahilan Kumaresan**
|
| 137 |
+
Mathematical & Computational Physics
|
| 138 |
+
Simon Fraser University
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
*This project showcases advanced computational physics methodology suitable for graduate-level research in quantum mechanics and numerical analysis.*
|