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.1.

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

Alcubierre wall and speed sweep. Wireframe height shows Eulerian energy density; the lower plane shows the smallest normalized null contraction among 312 sampled directions. Both use signed logarithmic scales. Each frame is a separate constant-speed metric, and the height is a scalar plot, not a spatial embedding.

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 a general GR starting point, the curvature tutorial checks Minkowski space and Schwarzschild vacuum against analytical results. The same curvature pipeline accepts custom metrics. The conventions specify index order, curvature sign and physical units.

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, legacy prescribed-source shell diagnostics, 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, shell calculations and limits

Example 07 implements a Gaussian warp metric. Examples 08–10 cover shape design and shell diagnostics. Example 11 reproduces the revised elastic-shell equilibrium, frame dragging, cavity tides and central clock shifts. Its datasets and definitions live in this repository; see the shell guide for commands and approximation limits. Animation commands and system dependencies are in the animation instructions 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 observer-robust paper received provisional acceptance by Classical and Quantum Gravity on September 21, 2026, pending the publisher's final checks. Example 11 supplies the elastic-shell numerical calculations. The legacy S-/T-shell constructors implement separate prescribed metrics; see the shell guide for their limitations.

Questions and contributions

For a numerical discrepancy, open an issue with the metric and parameters, evaluation point or grid, expected identity, tolerances and a minimal runnable example. Contributions of metrics should include their coordinate domain, conventions, source reference and an independent curvature or stress-energy check.

Metadata

Release files for warpax 1.5.1

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.1
File Size Uploaded
warpax-1.5.1.tar.gz 696.8 kB Details

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / warpax-1.5.1.tar.gz

Download URL warpax-1.5.1.tar.gz
Size 696.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aa3daa5f861e2717ad38e3a38e764c0c477302c446062bd43c32daefccfa7c61
BLAKE2b-256 checksum
How to use checksums
63d39c432f58a9b9308161d43071ac6f4e37eaee0989ac674393032d33c307d1
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 24, 2026.

Transparency log

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

Download URL warpax-1.5.1-py3-none-any.whl
Size 416.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a32580e595e937a7f32d57048b126c570e85f5e07f008e1231b951542cafc26
BLAKE2b-256 checksum
How to use checksums
706f128706125c5c117786b9fa56b5445fb18eaeb5131f3fbc4da19c652426e3
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.1 This release

2 release files

1.5.0

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