{"id":27322,"library":"quadrants","title":"Quadrants Programming Language","description":"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.","status":"active","version":"0.7.3","language":"python","source_language":"en","source_url":"https://github.com/Genesis-Embodied-AI/quadrants","tags":["tensor","autodiff","embedded language","MLIR","quantum"],"install":[{"cmd":"pip install quadrants","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for array operations","package":"numpy","optional":false},{"reason":"MLIR backend for compilation","package":"mlir_quantum","optional":false},{"reason":"Optional integration with PyTorch tensors","package":"torch","optional":true}],"imports":[{"note":"The package is named 'quadrants', not 'qd'. Common mistake: users try `import qd` directly.","wrong":"import qd","symbol":"qd","correct":"import quadrants as qd"}],"quickstart":{"code":"import quadrants as qd\nimport numpy as np\n\n# Create a simple tensor\na = qd.Tensor(np.array([1, 2, 3]))\nprint(a)\n# Perform basic operations\nb = qd.Tensor(np.array([4, 5, 6]))\nc = a + b\nprint(c)","lang":"python","description":"Basic tensor creation and addition using Quadrants."},"warnings":[{"fix":"Update tensor creation to explicitly specify dtype and layout if needed: qd.Tensor(data, dtype=float, layout='ndarray')","message":"In v0.7.3, qd.Tensor introduced specifiying ndarray vs field and memory layout. Code relying on the previous implicit representations may break.","severity":"breaking","affected_versions":"<0.7.3"},{"fix":"Replace old autodiff calls with qd.adstack or use the new gradient functions.","message":"The old autodiff API (before v0.7.1) is deprecated. Use the new adstack sizer for backward passes.","severity":"deprecated","affected_versions":"<0.7.1"},{"fix":"Use Python <=3.13. Check requires_python in project metadata.","message":"Python 3.14 is not supported; requires <3.14. Installation may fail on Python 3.14.","severity":"gotcha","affected_versions":">=3.14"},{"fix":"Upgrade to v0.7.2 or later.","message":"Backward pass compilation may hang for 'very large kernels' due to control flow graph walker (fixed in v0.7.2).","severity":"gotcha","affected_versions":"<=0.7.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import quadrants as qd` instead of `import qd`.","cause":"Incorrect import: the package is 'quadrants', not 'qd'.","error":"ModuleNotFoundError: No module named 'qd'"},{"fix":"Upgrade to quadrants >=0.7.2, which fixes this issue.","cause":"Bug in adstack sizer for large kernels in versions <=0.7.1.","error":"RuntimeError: Tried to run backward pass but control flow graph walker exceeded iteration limit"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}