Python package for time-dependent wave-packet transport in 2D Dirac and Weyl systems with tilted, anisotropic cones, arbitrary barrier geometries, valley chirality, and intervalley coupling.
Project description
dirac-wavepacket
Time-dependent wave-packet transport in 2D tilted Dirac/Weyl systems.
dirac_wavepacket solves the time-dependent Dirac equation for a two-component
spinor on a 2D grid using a symmetric split-operator Fourier scheme. It
is designed for continuum-limit transport calculations in Dirac and
Weyl materials with anisotropic Fermi velocities and tilted cones, and
supports arbitrary electrostatic barrier shapes, reflecting mass-wall
confinement, absorbing drain contacts, source–drain bias, and
pseudo-spin-preserving intervalley coupling between K and K'.
Physical model
For valley index τ = ±1 (K and K′):
H_τ = ℏ (v_x σ_x k_x + v_y σ_y k_y)
+ τ ℏ (w_x k_x + w_y k_y) I
+ V(x, y) I + M(y) σ_z
The anisotropic Dirac term carries the pseudo-spin texture; the tilt
term is proportional to the identity and rigidly displaces the Fermi
contour along w. V(x, y) is an arbitrary electrostatic barrier
(rectangular / p-n / shaped / polygon / multi-barrier), and M(y) σ_z
implements reflecting channel walls via a local gap — the correct
confinement for Dirac fermions, which cannot be reflected by a scalar
wall because of Klein tunneling.
A 4-component coupled propagator is available for simulations with
spatially local, pseudo-spin-preserving intervalley coupling
U_KK'(x, y) · I_2. At zero coupling it reproduces two independent
single-valley propagations bit-for-bit.
Installation
git clone https://github.com/can-yesilyurt/Dirac-Wavepacket
cd Dirac-Wavepacket
pip install -e .
# Optional: FFT acceleration (2–5× speedup on typical problems)
pip install -e ".[fft]"
# For running the tests
pip install -e ".[dev]"
Quickstart
from dirac_wavepacket import SimConfig, load_config, run_simulation
cfg = load_config("examples/configs/reflecting_walls_w35_W50.yaml")
cfg.output_dir = "results/quickstart"
result = run_simulation(cfg, make_animation=False, verbose=True)
print(f"T = {result['T']:.4f}, R = {result['R']:.4f}")
Or from the command line:
dwp examples/configs/reflecting_walls_w35_W50.yaml \
--output results/quickstart
Worked examples
Two self-contained scripts in examples/ reproduce the figures in the
companion paper:
| Script | What it shows |
|---|---|
01_angled_barrier_valley_filter.py |
All-electrostatic valley filter via barrier rotation |
02_klein_angular_dependence.py |
Angular dependence of Klein tunneling, T(θ) scan |
Each script has a --quick mode for laptop-scale smoke testing
(~1–3 min) and a default mode for the publication-quality figure
(~10–30 min on a modern multi-core CPU or a single GPU).
Production drivers
For parameter sweeps over many V_0, geometry, or source–drain
voltage values, use the checkpointed parallel drivers installed as
console scripts:
dwp-sweep --config examples/configs/reflecting_walls_w35_W50.yaml \
--v0-min 0 --v0-max 1.6 --v0-step 0.02 --workers 8 --no-anim
dwp-sweep-vsd --config ... --v0 0.228 --vsd-min -0.02 --vsd-max 0.02 \
--vsd-step 0.004 --jobs 8
Sweeps are resumable (per-task JSON checkpoints) and graceful against
worker crashes — see docs/user_guide.md.
Repository layout
dirac_wavepacket/ Python package (propagator, potentials, etc.)
cli/ Console-script entry points (sweep drivers)
examples/ Self-contained worked examples
configs/ YAML configurations
tests/ pytest suite
docs/ User guide and theory notes
docs/paper/ SoftwareX manuscript draft
Citation
If dirac_wavepacket contributes to a publication, please cite this
repository. A software paper describing the package is in preparation
for submission to SoftwareX; citation details will be updated here
once the paper is accepted. In the meantime, please cite as:
@software{yesilyurt_dirac_wavepacket_2026,
author = {Yesilyurt, Can},
title = {Dirac-Wavepacket: time-dependent wave-packet transport
in two-dimensional tilted Dirac and Weyl systems},
year = {2026},
version = {1.0.0},
url = {https://github.com/can-yesilyurt/Dirac-Wavepacket}
}
A Zenodo DOI will be minted on the first tagged release and the citation above will be updated accordingly.
License
MIT — see LICENSE.
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 dirac_wavepacket-1.0.0.tar.gz.
File metadata
- Download URL: dirac_wavepacket-1.0.0.tar.gz
- Upload date:
- Size: 95.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a2ca165b7e111e3f5b939b531cf244c584c1149f9e67a078dab8d927006f502
|
|
| MD5 |
3d72445e87e9560e03d6cae478e34d1f
|
|
| BLAKE2b-256 |
c50953759b9e6a0b872d0946b1e8d9bfb04355335b21156fa9990fc593d22cb6
|
File details
Details for the file dirac_wavepacket-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dirac_wavepacket-1.0.0-py3-none-any.whl
- Upload date:
- Size: 103.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c4459afbc5f03f8007448251d60d7d0ba3648e06592112d2e7543247fc3f8c
|
|
| MD5 |
2a20e12c41764fc0161dd0d521908df9
|
|
| BLAKE2b-256 |
0c3b524e1ce65419ae74616248729786aaf314b0d9f55fcdb82d4cad354a2039
|