A PyTorch framework for Clifford geometric algebra deep learning
Project description
clifra
Layout-first Clifford algebra tools for PyTorch.
Clifra exposes one planner-owned algebra host. Full-lane tensors and compact grade layouts share the same algebra, while planning builds static executors for products, metrics, exponentials, actions, layers, and analysis utilities.
Install
uv sync
uv sync --extra dev
Docs:
uv sync --group docs
uv run --group docs mkdocs serve
Minimal Use
import torch
from clifra import make_algebra
algebra = make_algebra(3, 0, device="cpu")
vectors = algebra.layout((1,))
products = algebra.plan_product(
op="gp",
left_layout=vectors,
right_layout=vectors,
output_layout=algebra.layout((0, 2)),
)
left = torch.randn(8, vectors.dim)
right = torch.randn(8, vectors.dim)
out = products(left, right)
Checks
uv run pytest tests/ -m unit -q --tb=short
uv run pytest tests/ -m "not slow" -q --tb=short
uv run ruff check .
uv run --group docs mkdocs build
Docs
The docs are intentionally small: API pages come from live docstrings, and
docs/core-design.md keeps the process snippets.
License
Apache License 2.0. See LICENSE and NOTICE.
Citation
@software{kim2026clifra,
author = {Kim, Eunkyum},
title = {clifra: Clifford Algebra Layers for PyTorch},
url = {https://github.com/Concode0/clifra},
version = {1.0.0},
year = {2026},
doi = {10.5281/zenodo.18939519},
license = {Apache-2.0}
}
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 Distribution
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 clifra-1.0.0.tar.gz.
File metadata
- Download URL: clifra-1.0.0.tar.gz
- Upload date:
- Size: 150.0 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a9d2fc402b9f9fea97be61aaa01434a4daa575faafb7330a1ba9e13dcd398ce
|
|
| MD5 |
9da0040844f6803b0f4c4c1206f8cdd8
|
|
| BLAKE2b-256 |
087c47b03c7962114d6ca1e2b73ca54fe6bfd44e2f29b7d114b7cae5d02e8e06
|
File details
Details for the file clifra-1.0.0-py3-none-any.whl.
File metadata
- Download URL: clifra-1.0.0-py3-none-any.whl
- Upload date:
- Size: 190.0 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8431133bdbc31ae5e78ab65cb7f421e455636f9296a61904a266f0d946e3ad5
|
|
| MD5 |
048fe907db49e724009ed9e31d360411
|
|
| BLAKE2b-256 |
c6ce5a3984b1729e5ef6a490466a6265152515616514ec8288501453b5fe82d5
|