Skip to main content

clifra

License Docs DOI

clifra is a differentiable Clifford algebra computation layer for PyTorch. Signatures and grade layouts describe ordinary coefficient tensors; operations can be planned once and reused.

uv add clifra
import torch
from clifra import make_algebra

algebra = make_algebra(3, 0)
vectors = algebra.layout((1,))
product = algebra.plan_product(
    left=vectors,
    right=vectors,
    output=algebra.layout((0, 2)),
)

left = torch.randn(8, vectors.dim, requires_grad=True)
right = torch.randn(vectors.dim)
out = product(left, right)  # [8, 4]: scalar, e12, e13, e23
out.square().mean().backward()

The inputs store three vector coefficients each. The product broadcasts over the leading dimension and returns four scalar-and-bivector coefficients.

A signature defines basis products. A layout selects coefficient lanes, and a tensor contract declares compact or canonical storage. Planned operations fix these declarations while coefficient values and leading tensor dimensions remain ordinary PyTorch inputs.

Tutorials · How-to guides · Explanations · Research · API reference

Development

uv sync --group dev
uv run --group dev ruff check .
uv run --group dev pytest tests/ -n12 -q --tb=short
uv run --group docs mkdocs build

Please open an issue before proposing a substantial change. Contact: nemonanconcode@gmail.com.

Citation

@software{kim2026clifra,
  author  = {Kim, Eunkyum},
  title   = {clifra: Layout-first Clifford algebra tools for PyTorch},
  url     = {https://github.com/Concode0/clifra},
  version = {2.0.2},
  year    = {2026},
  doi     = {10.5281/zenodo.18939518},
  license = {Apache-2.0}
}

License

Apache License 2.0. See LICENSE and NOTICE.

Metadata

Release files for clifra 2.0.2

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

Source distribution (sdist)

Source distribution for clifra 2.0.2
File Size Uploaded
clifra-2.0.2.tar.gz 85.5 kB Details

Built distribution (wheel)

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

Total release size: 193.4 kB

Release files / clifra-2.0.2.tar.gz

Download URL clifra-2.0.2.tar.gz
Size 85.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b8e7a250ecb460332a67d560db3eec48d78cc2922c82ba44855662dbcb5e2ae9
BLAKE2b-256 checksum
How to use checksums
ae661dc067cb7745675669187aeaac513b11fbf5552b1e901a2ad9da030d7625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / clifra-2.0.2-py3-none-any.whl

Download URL clifra-2.0.2-py3-none-any.whl
Size 108.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47a4cda21bbc709ff0f77fe79f4d664e80b0989ca2702121fa08839ef495f545
BLAKE2b-256 checksum
How to use checksums
d07f30b0cc30b1a08d5725855249c8fa27472afd84e2107166c217fd25ad96b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

2.0.3

2 release files

This release

2.0.2 This release

2 release files

2.0.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.0

2 release files

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