Python wrapper for xAct.jl — tensor algebra for general relativity
Project description
xact-py
Python wrapper for xAct.jl — a high-performance tensor algebra suite for general relativity.
Note: All code in this repository is generated by AI. It was built under strict engineering practices but is not warranted to be absolutely correct. See the full disclaimer.
Installation
pip install xact-py
Julia is installed automatically via juliacall.
Quick Start
import xact
xact.reset()
M = xact.Manifold("M", 4, ["a", "b", "c", "d"])
T = xact.Tensor("T", ["-a", "-b"], M, symmetry="Symmetric[{-a,-b}]")
xact.canonicalize("T[-b,-a] - T[-a,-b]") # returns "0"
Features
- Canonicalization — Butler-Portugal algorithm for tensor index canonicalization
- Contraction & Simplification — metric contraction, iterative simplification
- Covariant Derivatives — commutation, sorting, Riemann identities
- Perturbation Theory — multinomial Leibniz expansion, curvature perturbations
- Coordinate Components (xCoba) — basis changes, Christoffel symbols, CTensor
- Riemann Invariants (xInvar) — classification and database of Riemann polynomial invariants
- Variational Calculus — Euler-Lagrange operator, integration by parts
Example: Metric and Curvature
import xact
xact.reset()
M = xact.Manifold("M", 4, ["a", "b", "c", "d", "e", "f"])
g = xact.Metric("g", ["-a", "-b"], M)
# Riemann symmetry: R_abcd + R_abdc = 0
xact.canonicalize("RiemannCD[-a,-b,-c,-d] + RiemannCD[-a,-b,-d,-c]")
# returns "0"
# Simplify a contracted Riemann expression
xact.simplify("RicciCD[-a,-b] - RiemannCD[-a,-c,-b,-d] * g[c,d]")
# returns "0"
Documentation
Full documentation at saxa.xyz/sxAct.
License
GPL-3.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xact_py-0.4.2-py3-none-any.whl.
File metadata
- Download URL: xact_py-0.4.2-py3-none-any.whl
- Upload date:
- Size: 221.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01f7140bf0def48d39d4aa689b44d42d3d5f98e5fb1f6051a1176d4bb26f3d39
|
|
| MD5 |
e9b5c13b9bd5c5884142c9949472512e
|
|
| BLAKE2b-256 |
b32ba19f357aa4eaded77798823bd6f632287e346296b71bdf28523ea0a303bd
|
Provenance
The following attestation bundles were made for xact_py-0.4.2-py3-none-any.whl:
Publisher:
release.yml on sashakile/sxAct
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xact_py-0.4.2-py3-none-any.whl -
Subject digest:
01f7140bf0def48d39d4aa689b44d42d3d5f98e5fb1f6051a1176d4bb26f3d39 - Sigstore transparency entry: 1287677637
- Sigstore integration time:
-
Permalink:
sashakile/sxAct@cd9329d2010698ce48e0ff3e90b891431c33b736 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/sashakile
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cd9329d2010698ce48e0ff3e90b891431c33b736 -
Trigger Event:
release
-
Statement type: