Skip to content

clifra v2.0.0 release

Choose a tag to compare

@Concode0 Concode0 released this 11 Sep 01:42
· 35 commits to main since this release

clifra 2.0.0

clifra 2.0.0 is a major architectural release centered on explicit tensor semantics,
deterministic planning, prepared execution, and a substantially smaller core.

This release is intentionally breaking. It replaces much of the v1 execution model
rather than preserving compatibility with internal or higher-level abstractions that
no longer fit clifra's direction.

Core architecture

  • Established a stable public API over a private _kernel implementation.

  • Reorganized core execution around:

    mathematical request → planning → route selection → prepared executor → tensor execution

  • Separated planning from execution. Prepared executors perform fixed tensor
    computations and do not re-plan during execution.

  • Introduced explicit layouts and tensor contracts to distinguish mathematical
    coefficient spaces from physical tensor storage.

  • Added planned operations, algebra contexts, executor providers and registries,
    and explicit resource limits.

  • Replaced implicit or duplicated layout assumptions with declared compact and
    canonical storage semantics.

  • Made built-in route selection deterministic while retaining a small provider
    boundary for custom execution implementations.

  • Simplified planning facts and route assessment.

  • Redesigned bivector exponential planning and execution around explicit prepared
    routes.

  • Generalized Clifford actions and removed channel-specific execution machinery.

  • Added specialized execution paths for scalar, diagonal, vector, pairwise,
    sandwich, and requested-grade workloads.

  • Expanded broadcasting, autograd, and compilation coverage across the core.

Breaking changes and core trimming

  • Removed the legacy public foundation, runtime, planning, and execution surfaces.
  • Removed redundant planning, metric, energy, and contract layers.
  • Removed the legacy layers, loss, and criterion packages.
  • Removed channel-specific action abstractions in favor of general Clifford actions.
  • Replaced the previous Riemannian optimizer abstraction with explicit optimizer
    update building blocks.
  • Reorganized analysis into declared-algebra diagnostics and experimental probes.
  • Migrated research code to the explicit v2 core contracts.

Code importing removed v1 internals or relying on the former model/layer-oriented
APIs will need to migrate to the v2 interfaces.

Geometry and resource controls

  • Added strict variants of blade inverse, projection, rejection, reflection, and
    versor-product operations.
  • Existing stabilized geometry operations remain available, while strict variants
    reject mathematically singular denominators instead of regularizing them.
  • Added public immutable resource limits for coefficient lanes and pair counts.
  • Planning now checks static executor requirements against those limits before
    materialization.

Smaller implementation surface

Using cloc on the installable clifra/ package:

Revision Python files Code lines
v1.4.0 80 13,400
v2.0.0 53 5,743

The installable clifra package is roughly 57% smaller than v1.4.0 by Python
code lines.

Within it, clifra/core/ decreased from 9,302 to 4,655 code lines,
approximately a 50% reduction, while establishing clearer public/private,
planning/execution, and semantic/storage boundaries.

Transformation Fields research

v2 adds three documented differentiable systems under research/transformation_fields:

  • Continuous-Time PGA LiDAR Deskewing
    Recovers continuous ego-motion with a PGA motor field from sparse geometric
    constraints, then validates on held-out returns and a dense time grid.

  • Relativistic Beamline Inverse Design
    Optimizes a Lorentz-bivector control field through proper-time integration,
    held-out particles, and timestep-refinement checks.

  • Sparse-Constraint Continuum Threading
    Learns a material-coordinate SE(3) field from sparse gate and tip constraints,
    validates collision and rigidity behavior, checks numerical inversion, and
    re-evaluates the restored field on a denser material discretization without
    retraining.

The experiments include reproducible reports, validation metrics, diagnostic
figures, and accompanying research documentation.

Numerical compatibility

  • Added a temporary workaround for an upstream PyTorch
    torch.linalg.matrix_exp issue affecting effective singleton matrix batches.
  • The workaround is narrowly applied to affected matrix-exponential execution
    paths and leaves ordinary matrix batches unchanged.
  • Added focused regression coverage for values, gradients, broadcasting, MPS,
    compilation, and route equivalence.

The workaround is intended to be removed once the corresponding upstream PyTorch
fix is available.

Benchmarking

The legacy v1 benchmark harness was removed rather than carried forward as an
incompatible v2 baseline.

A new benchmark methodology for the v2 execution architecture—including
release-regression tracking, executor comparisons, CPU/MPS/CUDA qualification,
DefaultPolicy validation, and separate cross-library comparisons—is deferred to
post-v2 work.

Historical v1 benchmark results should not be interpreted as v2 performance
baselines.

Accordingly, clifra 2.0.0 does not make new cross-library performance claims.

Documentation

  • Restructured tutorials, how-to guides, explanations, API reference material,
    and research navigation around the v2 architecture.
  • Updated examples and documentation to use explicit layouts, planning, and
    prepared operations.
  • Added dedicated documentation for the Transformation Fields research systems.

Validation

Final validation: 592 tests passed, 2 skipped. Ruff, formatting, git diff --check,
package build/install smoke tests, research examples, and the documentation build
completed successfully.