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.1},
  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.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 clifra 2.0.1
File Size Uploaded
clifra-2.0.1.tar.gz 85.1 kB Details

Built distribution (wheel)

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

Total release size: 192.6 kB

Release files / clifra-2.0.1.tar.gz

Download URL clifra-2.0.1.tar.gz
Size 85.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f1cb37f3626d6e4c93c7d7c0e3705a82d53fee342110e30fef099ca951a5f6ce
BLAKE2b-256 checksum
How to use checksums
b7358dac91949e282f3adacb0dcc0b05b27126080726a309ecd42d18d2530709
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.1-py3-none-any.whl

Download URL clifra-2.0.1-py3-none-any.whl
Size 107.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18bfe634c1a87da396bcd66d5b4e022d1348f0f8cf2a73b383e6436bbef0e93a
BLAKE2b-256 checksum
How to use checksums
33ba88c31803fd2ab9fb762f284f231cf6ee48d975a32c56a4e7d9d544895a69
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

2.0.2

2 release files

This release

2.0.1 This release

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