Simplified 1D quantum tunneling solver with 4 classic test cases
Project description
1d-qt-ideal-solver: Idealized 1D Quantum Tunneling Solver
High-performance 1D quantum tunneling solver implementing the split-operator Fourier method with adaptive time stepping, Numba-accelerated parallel computation, and optional stochastic noise for idealized simulations of coherent tunneling dynamics in nanoscale barrier systems.
Physics
Solves the time-dependent Schrödinger equation in natural units ($\hbar = m_e = 1$):
$$i\frac{\partial \psi}{\partial t} = \hat{H}\psi = \left[-\frac{1}{2}\nabla^2 + V(x,t)\right]\psi$$
The wavefunction evolves via the split-operator method:
$$\psi(x, t+\delta t) = e^{-iV\delta t/2} \cdot \mathcal{F}^{-1}\left[e^{-ik^2\delta t/2}\mathcal{F}[\psi]\right] \cdot e^{-iV\delta t/2}$$
Key Observables:
- Transmission coefficient: $T = \int_{x>x_b} |\psi(x,t_f)|^2 dx$
- Reflection coefficient: $R = \int_{x<x_a} |\psi(x,t_f)|^2 dx$
- Unitarity: $T + R \approx 1$
Features
- Adaptive Time Stepping: Automatically adjusts $\delta t$ based on wavefunction dynamics
- Numba JIT Compilation: 10-100× speedup via parallel CPU execution
- Stochastic Environments: Ornstein-Uhlenbeck noise ($\tau_{\text{corr}}$) and decoherence ($\gamma$)
- Conservation Monitoring: Real-time validation of $|\psi|^2 = 1$ and energy conservation
- Professional Visualization: Parallel-rendered GIF animations with publication-quality aesthetics
- NetCDF4 Output: Self-describing, compressed data format for reproducible research
Installation
From PyPI:
pip install 1d-qt-ideal-solver
From source:
git clone https://github.com/yourusername/1d-qt-ideal-solver.git
cd 1d-qt-ideal-solver
pip install -e .
Quick Start
Command-line interface:
# Run individual test case
qt1d-simulate case1 # Rectangular barrier
qt1d-simulate case2 --cores 8 # Double barrier (8 cores)
# Run all 4 cases sequentially
qt1d-simulate --all
# Custom configuration
qt1d-simulate --config myconfig.txt
Python API:
from qt1d_ideal import QuantumTunneling1D, GaussianWavePacket
# Initialize solver
solver = QuantumTunneling1D(nx=2048, x_min=-10, x_max=10)
# Prepare initial Gaussian wave packet
psi0 = GaussianWavePacket(x0=-5.0, k0=5.0, sigma=0.5)(solver.x)
# Define rectangular barrier: V₀ = 2 eV, width = 2 nm
V = solver.rectangular_barrier(height=2.0, width=2.0)
# Solve dynamics
result = solver.solve(
psi0=psi0,
V=V,
t_final=5.0,
n_snapshots=200,
noise_amplitude=0.05, # 50 meV stochastic noise
decoherence_rate=0.001 # T₂ ≈ 1 ps
)
print(f"T = {result['transmission_coefficient']:.2%}")
print(f"R = {result['reflection_coefficient']:.2%}")
Output Files
Simulation data (in outputs/):
*.nc— NetCDF4 format (wavefunction evolution, parameters, metadata)*.gif— High-quality animations with statistics overlay
Diagnostics (in logs/):
*.log— Complete simulation records with conservation diagnostics
Physical Applications
Relevant for idealized studies of quantum tunneling in:
- Nuclear Physics: α-decay (fm scale)
- Surface Science: STM imaging, field emission (Å scale)
- Chemical Dynamics: Proton transfer reactions (nm scale)
- Nanoelectronics: Resonant tunneling diodes, Josephson junctions (μm scale)
Performance
- Runtime: 10-30 seconds per case (2048 grid points, 200 frames)
- Parallel Rendering: ~10× faster GIF generation via multiprocessing
- Accuracy: Norm error < 0.1%, energy conservation < 1%
Citation
If you use this solver in your research, please cite:
@software{qt1d_solver_2025,
author = {Kaban, Siti N. and Herho, Sandy H. S. and Prayogo, Sonny and Anwar, Iwan P.},
title = {1D Quantum Tunneling Solver: Idealized Split-Operator Method},
year = {2025},
version = {0.0.1},
url = {https://github.com/yourusername/1d-qt-ideal-solver},
license = {MIT}
}
Authors
- Siti N. Kaban
- Sandy H. S. Herho (sandy.herho@email.ucr.edu)
- Sonny Prayogo
- Iwan P. Anwar
License
MIT License — See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 1d_qt_ideal_solver-0.0.1.tar.gz.
File metadata
- Download URL: 1d_qt_ideal_solver-0.0.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.2 Linux/6.11.9-100.fc39.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cfac882d850bf5ababf8b220ce0ea9c07968652a338458e889f7c4a3938a2dc
|
|
| MD5 |
87f825f361af7dbda26a4fca3b91c1bb
|
|
| BLAKE2b-256 |
338b43c47c4b34c9bf02cfb2ee4e0fdc05ea3f9feb00b1c9fdaac8c8912e0bb0
|
File details
Details for the file 1d_qt_ideal_solver-0.0.1-py3-none-any.whl.
File metadata
- Download URL: 1d_qt_ideal_solver-0.0.1-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.2 Linux/6.11.9-100.fc39.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45c67cae6c517a3fd1995e52a24c8ebd94d25d37dd98e98ff0da40cb0d1af1f7
|
|
| MD5 |
90dc7271cf028bc10feb25234b0d6927
|
|
| BLAKE2b-256 |
4c2774193223314d032e02c4cdcc341fd8c1eff8f2adcc6d7e9fb738e3d8ada9
|