Quadrants Programming Language
raw JSON → 0.7.3 verified Fri May 01 auth: no python
Python-embedded programming language and tensor library for Genesis-Embodied-AI. Provides qd.Tensor unified tensor container, autodiff, and MLIR-based compilation. Current version 0.7.3 (released 2025-05-23), requires Python >=3.10, <3.14. Active development with frequent releases.
pip install quadrants Common errors
error ModuleNotFoundError: No module named 'qd' ↓
cause Incorrect import: the package is 'quadrants', not 'qd'.
fix
Use
import quadrants as qd instead of import qd. error RuntimeError: Tried to run backward pass but control flow graph walker exceeded iteration limit ↓
cause Bug in adstack sizer for large kernels in versions <=0.7.1.
fix
Upgrade to quadrants >=0.7.2, which fixes this issue.
Warnings
breaking In v0.7.3, qd.Tensor introduced specifiying ndarray vs field and memory layout. Code relying on the previous implicit representations may break. ↓
fix Update tensor creation to explicitly specify dtype and layout if needed: qd.Tensor(data, dtype=float, layout='ndarray')
deprecated The old autodiff API (before v0.7.1) is deprecated. Use the new adstack sizer for backward passes. ↓
fix Replace old autodiff calls with qd.adstack or use the new gradient functions.
gotcha Python 3.14 is not supported; requires <3.14. Installation may fail on Python 3.14. ↓
fix Use Python <=3.13. Check requires_python in project metadata.
gotcha Backward pass compilation may hang for 'very large kernels' due to control flow graph walker (fixed in v0.7.2). ↓
fix Upgrade to v0.7.2 or later.
Imports
- qd wrong
import qdcorrectimport quadrants as qd
Quickstart
import quadrants as qd
import numpy as np
# Create a simple tensor
a = qd.Tensor(np.array([1, 2, 3]))
print(a)
# Perform basic operations
b = qd.Tensor(np.array([4, 5, 6]))
c = a + b
print(c)