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

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

Alcubierre wall and speed sweep. Left: expansion behind the bubble and contraction ahead. Right: non-positive Eulerian energy density. The inset shows the smallest normalized null contraction among 312 sampled directions. Heights and colors use fixed signed logarithmic scales. Each frame is a separate constant-speed metric centered at the origin; the final zero-speed frame is flat spacetime. These are scalar plots, not a spatial embedding or a simulation of acceleration.

The animation guide explains the complementary shear, directional-sampling and curvature views.

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 solver
uv run python examples/01_minkowski_sanity.py
Extra Use
dev Tests and Ruff
solver SciPy generalized eigensolver
viz, manim Plotting helpers and animations
interop, einfields External metric files and model checkpoints
docs, bench Documentation and performance benchmarks
design Empty; the spline shape-function basis ships with the core package

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, 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 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
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. SShellMetric and TShellMetric implement separate prescribed metrics; see the shell guide for their limitations.

License

MIT; see LICENSE.

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.6.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.6.0
File Size Uploaded Provenance
warpax-1.6.0.tar.gz 702.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / warpax-1.6.0.tar.gz

Download URL warpax-1.6.0.tar.gz
Size 702.2 kB
Tags Source
SHA-256 checksum
How to use checksums
71382f435903d4488a4e66b26dd647fa80801cb0fbf9084c9999acd1ce057897
BLAKE2b-256 checksum
How to use checksums
954e37cec12458b9211e91bebf2663015a81b1bf0b5be2ab0759e28b779d6820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

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

Download URL warpax-1.6.0-py3-none-any.whl
Size 398.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c8c713f16b9c265e5b6c53168a5af560ff67cd7fa9ab1f71a8b6e9dd7766863
BLAKE2b-256 checksum
How to use checksums
d85917e93ff89a08f3c019ead5dd1d8f7bbdd9026ce65366e25d8c07805afea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Security for warpax 1.6.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for warpax-1.6.0.tar.gz

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 Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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