Observer-robust energy condition verification for warp drive spacetimes.
warpax uses JAX automatic differentiation to compute exact curvature tensors from analytic warp drive metrics and performs continuous BFGS optimization over the full timelike observer manifold to find worst-case energy condition violations. This goes beyond the standard Eulerian-observer approach (as in WarpFactory) by searching over all physically admissible observers, parameterized by bounded rapidity in stereographic coordinates, to detect violations that axis-aligned sampling can miss.
Geodesic paths through a collapsing Alcubierre warp bubble, computed via WarpAX's autodiff curvature pipeline.
Users can define their own warp manifold by subclassing ADMMetric and run the
full verification pipeline. Below, a Gaussian warp bubble (shift = Gaussian envelope
instead of the Alcubierre top-hat) is validated on a 24x24x4 grid. The three panels
compare SEC margins seen by the Eulerian observer (left) vs the worst-case boosted
observer found by BFGS optimization (center). The right panel highlights 356 grid
points where the Eulerian frame incorrectly reports SEC as satisfied -- violations
only visible to non-Eulerian observers.
SEC comparison for a custom Gaussian warp bubble (vs = 0.5). Red regions in the right panel are violations missed by Eulerian-only analysis.
See examples/07_custom_warp_metric.py for the full worked example.
conda create -n warpax python=3.12 -y
conda activate warpax
pip install -e ".[dev]"| Script | Description |
|---|---|
examples/01_minkowski_sanity.py |
Flat-space sanity check (all ECs satisfied) |
examples/02_schwarzschild_verification.py |
Schwarzschild ground-truth validation |
examples/03_alcubierre_analysis.py |
Alcubierre warp drive EC analysis |
examples/04_warp_drive_comparison.py |
Multi-metric comparison (6 warp drives) |
examples/05_grid_analysis.py |
Grid-based EC verification |
examples/06_geodesic_through_warp_bubble.py |
Geodesic integration with tidal forces and blueshift |
examples/07_custom_warp_metric.py |
Custom warp manifold design with robust EC validation |
Run any example:
python examples/01_minkowski_sanity.pyThe full reproduction pipeline regenerates all cached results and figures:
bash reproduce_all.shPhases can be run individually:
bash reproduce_all.sh --phase 1 # Core computation
bash reproduce_all.sh --phase 2 # Ablation studies
bash reproduce_all.sh --phase 3 # Figure generationUse --keep-cache to skip cache deletion and only recompute missing results.
pytest # ~450 tests
pytest -m "not slow" # Skip expensive grid testsAnimated 3D visualizations of warp bubble dynamics require the optional manim
dependencies and system packages:
# System dependencies (Ubuntu/Debian)
sudo apt install texlive-latex-extra texlive-fonts-recommended dvipng cm-super ffmpeg
# Python dependencies
pip install -e ".[manim]"
# Render all scenes
python scripts/render_all_scenes.py
# Or render individual scenes
bash scripts/render_manim_scenes.shRendered videos and images are written to media/ (not tracked by git).
warpax is organized into six sub-packages:
| Package | Description |
|---|---|
geometry |
JAX autodiff pipeline: metric -> Christoffel -> Riemann -> Ricci -> Einstein -> |
energy_conditions |
NEC/WEC/SEC/DEC verification via Hawking–Ellis classification, eigenvalue algebra, and BFGS observer optimization |
metrics |
Six warp drive metric implementations: Alcubierre, Natário, Lentz, Rodal, Van den Broeck, WarpShell |
geodesics |
Timelike/null geodesic integration via Diffrax, tidal deviation, blueshift extraction |
analysis |
Eulerian vs robust comparison, Richardson convergence, kinematic scalars |
visualization |
Matplotlib publication figures and Manim animated scenes |
All metrics implement a common MetricFunction interface: a callable (4,) -> (4,4) mapping
coordinates

