Skip to main content

warpax

arXiv DOI CI Python 3.12+ License: MIT

JAX tools for curvature, energy conditions, and geodesics in prescribed spacetimes. warpax uses automatic differentiation to evaluate the Einstein tensor, then tests energy conditions across observer directions. See the changelog for version 1.5.0.

Alcubierre bubble: Eulerian energy density and normalized null-energy margin

Alcubierre wall and speed sweep. Height and color use a signed logarithmic scale; each frame is a separate metric evaluation.

Install and run

Python 3.12 or newer:

pip install warpax
from warpax import certify
from warpax.metrics import RodalMetric

metric = RodalMetric(v_s=0.5, R=1.0, sigma=8.0)
result = certify(metric, shape=(16, 16, 16))
print(result.type_fractions)
print(result.invariant_nec_min)  # Minimum over sampled wall Type-I points.

The grid is a quick demonstration. Resolve the wall and vary the grid before interpreting extrema or type fractions. Geometric units are G = c = 1, with metric signature (-,+,+,+) and float64 enabled at import.

For development and the examples:

git clone https://github.com/anindex/warpax.git
cd warpax
uv sync --locked --extra dev --extra viz --extra design --extra solver
uv run python examples/01_minkowski_sanity.py
Extra Use
dev Tests and Ruff
design, solver Interpolated metrics, shape design, and SciPy solvers
viz, manim Plotting helpers and animations
interop, einfields External metric files and model checkpoints
docs, bench Documentation and performance benchmarks

What it computes

  • Curvature and stress-energy from callable metrics, including ADM fields.
  • Hawking–Ellis classification, Type-I eigenvalue margins, and linear matrix inequality (LMI) tests that do not require an algebraic type assignment.
  • Continuous observer searches, exact checks for supplied rational certificates, and interval bounds on supported metric domains.
  • Timelike and null geodesics, finite-segment energy integrals, tidal effects, and quantum-inequality reference diagnostics.
  • Constraint residuals, TOV equilibrium, ADM mass, junction conditions, source-first shell construction, and metric optimization.
  • WarpFactory, EinFields, and Cactus imports; Matplotlib and Manim visualization; Bondi flux and Newman–Penrose diagnostics.

Numerical classification and LMI searches use finite precision and tolerances. An unsuccessful certificate search is inconclusive. The exact energy-condition verdict is independent of the observer, but numerical margin magnitudes depend on the tetrad and normalization. Observer optimization also depends on its rapidity cap. The Eulerian normal remains timelike wherever the ADM lapse and spatial metric are valid, including regions where the coordinate vector ∂t is spacelike.

The null integrals cover finite segments. They establish no complete-geodesic ANEC sign or ranking. Grid spreads and polished extrema are numerical diagnostics; only reported interval bounds support continuum claims. Vorticity alone does not determine algebraic type, and the exact pointwise quadratic speed law requires zero momentum and fixed profiles and domains.

Documentation

Start with the quickstart or numbered examples. Each metric implements a callable (4,) -> (4, 4) from spacetime coordinates to the covariant metric tensor.

Task Guide
Understand the calculations Theory, architecture
Choose or implement a metric Catalog, custom metric
Read results or load data Energy-condition results, external metrics
Inspect the API or benchmark it API, benchmarks
Reproduce the papers Observer-robust energy conditions, source-consistent shells

Example 07 implements a Gaussian warp metric. Examples 08–10 cover shape design and shell diagnostics. Animation commands and system dependencies are in the examples guide and render script.

Checks and reproduction

uv run python -m pytest
uv run ruff check src/ tests/ scripts/ benchmarks/ examples/
uv run ruff format --check src/ tests/ scripts/ benchmarks/ examples/
uv sync --locked --extra docs --extra design
uv run mkdocs build --strict

Tests run in parallel by default. Use -n 2 to limit workers, or select a module such as tests/test_slemma.py.

The script guide lists reproduction commands and required extras. reproduce_all.sh clears generated caches by default; --keep-cache retains them, and --stage selects a stage. Interval enclosures are a separate, expensive stage. The optional paper-number check requires the corresponding manuscript sources and matching numerical inputs.

Citation

Use CITATION.cff for software metadata and cite the relevant paper:

The shell construction and admissibility work belongs to the second paper. See boundary cost for its assumptions.

Metadata

Release files for warpax 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for warpax 1.5.0
File Size Uploaded
warpax-1.5.0.tar.gz 716.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for warpax 1.5.0
File Interpreter ABI Platform
warpax-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / warpax-1.5.0.tar.gz

Download URL warpax-1.5.0.tar.gz
Size 716.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a4ef0cdf3f5f32e4c751907a119273f487bc648e2f4e8091c6e7cf179e0ec050
BLAKE2b-256 checksum
How to use checksums
eff64299cfa32e3d8e302283c9428e950f3201156099a7dcef662f7cb8a6afce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / warpax-1.5.0-py3-none-any.whl

Download URL warpax-1.5.0-py3-none-any.whl
Size 417.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc039f650277d4eaa717da713ed43126a02eec4b754bf3a786fb50396f650ae3
BLAKE2b-256 checksum
How to use checksums
a3f876e60030e910f3d6a84b4420195def94f11171d7d18a61ded388bbfd9509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

1.5.1

2 release files

This release

1.5.0 This release

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page