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.3},
  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.3

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.3
File Size Uploaded
clifra-2.0.3.tar.gz 87.0 kB Details

Built distribution (wheel)

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

Total release size: 196.3 kB

Release files / clifra-2.0.3.tar.gz

Download URL clifra-2.0.3.tar.gz
Size 87.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9665c18389dd487ed92ae75c218c04c037655ea9b041b81275436d073b790d87
BLAKE2b-256 checksum
How to use checksums
fad6fdef78ee3de734af3e90d6dc415afb675d906c91695d73cd8a6924923167
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.3-py3-none-any.whl

Download URL clifra-2.0.3-py3-none-any.whl
Size 109.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c23d609970b06a571fc0fb015940d4c7f865a1f14bc59ee49de7560f2a78ad51
BLAKE2b-256 checksum
How to use checksums
09c34aa3cc64167bce2673aac4c9774d9b5e5b730bc397d4469a7b9f16f740fa
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

This release

2.0.3 This release

2 release files

2.0.2

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