Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c31de41
Add optional CuPy backend with GPU auto-detection
Feb 16, 2026
b1298f9
Add self-hosted GPU workflow for CuPy backend tests
Feb 17, 2026
0a919d8
Switch GPU CI to on-demand EC2 runner lifecycle
Feb 17, 2026
9f4ced7
Switch GPU CI workflow from EC2 to on-demand RunPod
Feb 17, 2026
1b13421
Add backend parity tests and benchmark utility
Feb 17, 2026
d17701a
Harden GPU workflow and add benchmark reporting
Feb 17, 2026
6b20a31
Fix RunPod pod polling query and add HTTP retry handling
Feb 17, 2026
8676183
Pin RunPod image tag and validate image reference
Feb 17, 2026
d67fd22
Add SSH proxy fallback and avoid scp dependency in GPU CI
Feb 17, 2026
a064071
Reduce RunPod SSH endpoint polling retries
Feb 17, 2026
317b9fa
Run tests from git checkout on pod and support proxy SSH mode
Feb 17, 2026
a822a38
Add generic backend parity tests and richer benchmark matrix
Feb 17, 2026
ff75e8e
Harden SSH proxy checks and benchmark artifact retrieval
Feb 18, 2026
60d5a75
Add SSH timeouts to prevent RunPod proxy hangs
Feb 18, 2026
6e7dcc6
Skip SSH probe in RunPod proxy mode
Feb 18, 2026
30d72e6
Represent inactive k-axes as arrays for CuPy meshgrid compatibility
Feb 18, 2026
2c6af0b
Stabilize RunPod benchmark flow and fix CuPy eval imports
Feb 18, 2026
058f095
Fix RunPod env propagation for remote benchmark job
Feb 18, 2026
00d89b9
Handle CuPy einsum out kwarg compatibly
Feb 18, 2026
ff636c8
Implement private engine kernel redesign for propagation
Feb 18, 2026
ed28379
Address PR review feedback for backend selection and CI
Feb 18, 2026
030e46b
Harden RunPod benchmark artifact transport and SSH endpoint selection
Feb 18, 2026
f86454c
Fix proxy-mode SSH PTY handling for RunPod CI
Feb 18, 2026
1839828
Parameterize RunPod benchmark sizes and runtime settings
Feb 18, 2026
b3fb149
Add stage-level propagation timing to backend benchmarks
Feb 18, 2026
34b2611
Synchronize GPU stage timers for accurate profiling
Feb 18, 2026
52432cf
Add analytic 2x2 coupled potential propagator
Feb 18, 2026
9d3ac77
Add affine-in-time potential precompute mode
Feb 18, 2026
8721465
Revert "Add affine-in-time potential precompute mode"
Feb 18, 2026
057829a
Add complex64 propagation mode and benchmark controls
Feb 18, 2026
13d3cdc
feat: add WP4 fused analytic 2x2 kernel mode
Feb 19, 2026
5b86f55
docs: add GPU backend documentation
Feb 23, 2026
adac8b7
docs: update Sphinx config and add RTD config
Feb 23, 2026
82504e7
docs: refresh README with animation and cleaner structure
Feb 23, 2026
cc5712d
docs: extend diffraction GIF to show full diffraction pattern
Feb 23, 2026
a5f3249
docs: replace comparison table with use-case focus
Feb 23, 2026
5ba6772
docs: remove emoji from README
Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
526 changes: 526 additions & 0 deletions .github/workflows/gpu-ci.yml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
156 changes: 110 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,155 @@
[![Downloads](https://img.shields.io/conda/dn/conda-forge/pytalises)](https://pypi.org/project/pytalises/)
[![PyPI](https://img.shields.io/pypi/v/pytalises?color=blue)](https://pypi.org/project/pytalises/)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pytalises?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/pytalises)
[![Downloads](https://img.shields.io/conda/dn/conda-forge/pytalises)](https://pypi.org/project/pytalises/)
[![CI Status](https://github.com/savowe/pytalises/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/savowe/pytalises/actions/workflows/ci.yml)
[![Release Status](https://github.com/savowe/pytalises/actions/workflows/python-publish.yml/badge.svg?branch=master)](https://github.com/savowe/pytalises/actions/workflows/python-publish.yml)
[![Documentation Status](https://readthedocs.org/projects/pytalises/badge/?version=latest)](https://pytalises.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/pytalises/badge/?version=latest)](https://pytalises.readthedocs.io/en/latest/)
![GPU Support](https://img.shields.io/badge/GPU-CuPy-green)

![additional_examples_54_0](https://user-images.githubusercontent.com/38558793/119370320-713f2c00-bcb5-11eb-94e5-cc801abcd7d8.png)
<div align="center">

# pyTALISES

**pyTALISES** (This Ain't a LInear Schrödinger Equation Solver) is an easy-to-use Python implementation of the Split-Step Fourier Method, for numeric calculation of a wave function's time-propagation under the Schrödinger equation.
**This Ain't a LInear Schrödinger Equation Solver**

*Split-step Fourier method for quantum wavefunction propagation*

![Diffraction on periodic grating](docs/assets/diffraction_grating.gif)

</div>

## Quickstart

```python
import pytalises as pt

# Define a 1D grid
grid = pt.Grid(shape=(256,), extent=((-10, 10),))

# Create a Gaussian wavepacket
psi = pt.Wavefunction(initial="exp(-x**2)", grid=grid)

# Propagate freely for 1000 steps
psi.freely_propagate(steps=1000, dt=1e-4)
```

That's it. For coupled states, potentials, and GPU acceleration, see the [documentation](https://pytalises.readthedocs.io/).

## Installation

**pip**:
```bash
pip install pytalises
```

**With GPU support** (requires NVIDIA CUDA):
```bash
pip install pytalises[gpu]
```

## Why pyTALISES?

pyTALISES excels at **position-space wavefunction dynamics**:

- **Matter-wave propagation** — free expansion, wavepacket dynamics
- **Atom optics** — Bragg diffraction, beam splitters, interferometry
- **Cold atom physics** — BEC dynamics, nonlinear interactions
- **Light-matter coupling** — Rabi oscillations, Raman transitions
- **Multi-level systems** — arbitrary internal state structure

If you need to propagate wavefunctions on spatial grids with time-dependent potentials, pyTALISES makes it simple.

## Features

### Features
- Calculation of a wavefunction's time propagation under a (non)linear Schrödinger equation: ![](https://latex.codecogs.com/png.latex?%5Cdpi%7B120%7D%20i%5Chbar%20%5Cfrac%7B%5Cpartial%7D%7B%5Cpartial%20t%7D%20%5CPsi%20%28%5Cvec%7Br%7D%2C%20t%29%20%3D%20%5CBig%5BV%28%5CPsi%2C%5Cvec%7Br%7D%2C%20t%29%20&plus;%20%5Cfrac%7B%5Chbar%5E2%7D%7B2m%7D%5Cnabla%5E2%20%5CBig%5D%20%5CPsi%20%28%5Cvec%7Br%7D%2C%20t%29)
- the wave-function ![](https://latex.codecogs.com/gif.latex?%5Cdpi%7B100%7D%20%5CPsi) may include an arbitrary number of internal and external degrees of freedom
- simple implementation of Hamiltonians
- speed of the [FFTW](https://pypi.org/project/pyFFTW/), [BLAS](https://www.netlib.org/blas/) and [numexpr](https://numexpr.readthedocs.io/en/latest/) libraries with multithreading
- crucial functions are just-in-time compiled with [numba](https://numba.readthedocs.io/en/stable/)
- **Multi-dimensional grids** — 1D, 2D, 3D spatial simulations
- **Coupled internal states** — Two-level systems, Raman transitions, Bragg diffraction
- **String-based potentials** — Define V(x,t) as human-readable expressions
- **Performance** — FFTW, numba JIT, numexpr, multithreading
- **GPU acceleration** — Optional CuPy backend for large grids

### v2 API Quickstart
## Examples

<details>
<summary><strong>Two-level Rabi oscillations</strong></summary>

```python
import pytalises as pt

grid = pt.Grid(shape=(256,), extent=((-4, 4),))
psi = pt.Wavefunction(
initial=["exp(-x**2)", "0"],
initial=["exp(-x**2)", "0"], # Start in ground state
grid=grid,
)

# Coupling potential (off-diagonal drives transitions)
V = pt.HermitianPotential.from_lower_triangular([
"0",
"Omega*cos(t)",
"Delta",
"0", # V_11: ground state energy
"Omega*cos(t)", # V_21: coupling
"Delta", # V_22: excited state detuning
])

psi.propagate(
potential=V,
steps=1000,
dt=1e-6,
variables={"Omega": 2.0, "Delta": 1.0},
options=pt.PropagationOptions(threads=4),
variables={"Omega": 2.0, "Delta": 0.0},
)
```

For migration details from the pre-v2 API, see `docs/source/v2_migration.rst`.
</details>

### Documentation
Read the [documentation](https://pytalises.readthedocs.io/en/latest/) to learn more about pytalises' capabilities.
The documentation features many examples, among others
[2D harmonic potentials](https://pytalises.readthedocs.io/en/latest/examples.html#2D-harmonic-potential),
[BEC scattering](https://pytalises.readthedocs.io/en/latest/examples.html#Nonlinear-interactions-between-internal-states),
[three-level Raman transitions](https://pytalises.readthedocs.io/en/latest/additional_examples.html#Three-level-Raman-transitions),
[single-Bragg diffraction](https://pytalises.readthedocs.io/en/latest/additional_examples.html#Single-Bragg-diffraction)
and
[atom interferometry](https://pytalises.readthedocs.io/en/latest/additional_examples.html#Light-pulse-atom-interferometry-with-single-Bragg-diffraction).
<details>
<summary><strong>GPU-accelerated propagation</strong></summary>

```python
import pytalises as pt

# Auto-detects GPU if available
psi.propagate(
potential=V,
steps=10000,
dt=1e-6,
options=pt.PropagationOptions(backend="auto"),
)

Installing pytalises
====================
**We recommend installing pytalises via conda**
# Or explicitly:
options = pt.PropagationOptions(backend="cupy", dtype="complex128")
```

pytalises supports Python 3.9 through 3.13, and wheels are built and tested across those versions in CI.
See the [GPU documentation](https://pytalises.readthedocs.io/en/latest/gpu_backend.html) for performance characteristics.

</details>

#### Using conda
## Documentation

Installing `pytalises` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
**[Full documentation](https://pytalises.readthedocs.io/)**

```
conda config --add channels conda-forge
```
Includes:
- [Usage examples](https://pytalises.readthedocs.io/en/latest/examples.html) — Gaussian wavepackets, harmonic potentials, BEC
- [Advanced examples](https://pytalises.readthedocs.io/en/latest/additional_examples.html) — Raman transitions, Bragg diffraction, atom interferometry
- [GPU backend guide](https://pytalises.readthedocs.io/en/latest/gpu_backend.html) — Installation, performance, troubleshooting
- [Algorithm notes](https://pytalises.readthedocs.io/en/latest/notes.html) — Split-step Fourier method explained

Once the `conda-forge` channel has been enabled, `pytalises` can be installed with:
## Development

```bash
git clone https://github.com/savowe/pytalises.git
cd pytalises
pip install -e ".[dev]"
pytest tests/
```
conda install pytalises
```


#### Using pip
## Citation

pytalises is available on the Python Package Index and can be installed via
If you use pyTALISES in academic work, please cite:

```bibtex
@software{pytalises,
author = {Vowe, Sascha},
title = {pyTALISES: Split-Step Fourier Method for the Schrödinger Equation},
url = {https://github.com/savowe/pytalises},
}
```
pip install pytalises
```

it has dependencies via `scipy` and `numba` on BLAS and LAPACK libraries that are not always found on windows systems. For linux they can usually be located.
## License

GPLv3 — see [LICENSE](LICENSE).
Loading