Skip to main content

Idealized 1D quantum tunneling solver with 4 classic test cases

Project description

1d-qt-ideal-solver: Idealized 1D Quantum Tunneling Solver

DOI Python License: MIT Numba PyPI

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/sandyherho/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)

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.4},
  url = {https://github.com/sandyherho/1d-qt-ideal-solver},
  license = {MIT}
}

Authors

License

MIT License — See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

1d_qt_ideal_solver-0.0.4.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

1d_qt_ideal_solver-0.0.4-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file 1d_qt_ideal_solver-0.0.4.tar.gz.

File metadata

  • Download URL: 1d_qt_ideal_solver-0.0.4.tar.gz
  • Upload date:
  • Size: 20.3 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

Hashes for 1d_qt_ideal_solver-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1bd2073e0038270132a6373e0cf99acbed35f6321f5a8e6386a04a0e76fcf3e9
MD5 07712cb69dac6baf34efc92da591cd30
BLAKE2b-256 d32e42f509173e9260ac13ad9ec61fac3392da0832e5e3dcb77f90f964e66df3

See more details on using hashes here.

File details

Details for the file 1d_qt_ideal_solver-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: 1d_qt_ideal_solver-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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

Hashes for 1d_qt_ideal_solver-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9f2ad17a66bb18651e35e6eebd718590ce7cf4ff9f9c8c7b6321ded29100ef30
MD5 c113c19a390594367c45ea89bab99ca4
BLAKE2b-256 3501f4b0385e6df6de88b404f5514ddaa4a6a39b15d13f6e4f2f1690f5103aab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page