Draft
Conversation
First step of the flexible-tensors series (hp/tensor-stork-N): introduce a Backend IntEnum with FIELD=0 and NDARRAY=1 that subsequent PRs will use to drive a per-tensor backend choice on the upcoming qd.tensor() factory. This PR ships the enum only — no factory, no layout, no kernel integration. Adds: - python/quadrants/_flexible.py with the Backend IntEnum. - Re-export through quadrants/__init__.py so users access it as qd.Backend. - tests/python/test_flexible_backend.py covering symbol export, IntEnum semantics, lookup by name/value, distinct members, and rejection of invalid values. - docs/source/user_guide/flexible_tensors.md seeded with a one-section user-facing description of qd.Backend, registered in the Core Concepts toctree of user_guide/index.md. Tests pass locally; sphinx make html succeeds with no new warnings on the flexible_tensors.md page.
hughperkins
commented
Apr 20, 2026
Collaborator
Author
There was a problem hiding this comment.
Let's just call this tensor.md?
hughperkins
commented
Apr 20, 2026
hughperkins
commented
Apr 20, 2026
| @@ -0,0 +1,33 @@ | |||
| """Flexible tensors: per-tensor backend and (later) layout. | |||
Collaborator
Author
There was a problem hiding this comment.
"Flexible tensors" => "Tensor"
hughperkins
commented
Apr 20, 2026
| import quadrants as qd | ||
|
|
||
|
|
||
| def test_backend_is_exported(): |
Collaborator
Author
There was a problem hiding this comment.
seems like a lot of tests for a simple enum, but .... 🤷
ac53459 to
1b65811
Compare
Drops the 'flexible' prefix from filenames and identifiers introduced in this branch series so the user-visible names are simply 'tensor'. Also strips PR-N back-references that will be meaningless once these PRs land. Touches only files owned by this series (no changes to external/ or unrelated tests).
…sor.md anchors - Add 'Backend' to expected user_api list in tests/python/test_api.py - Reorder _tensor import in __init__.py to satisfy ruff isort - Replace broken #fields/#ndarrays anchors in tensor.md with plain code spans Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of the flexible-tensors series (hp/tensor-stork-N): introduce a Backend IntEnum with FIELD=0 and NDARRAY=1 that subsequent PRs will use to drive a per-tensor backend choice on the upcoming qd.tensor() factory.
This PR ships the enum only — no factory, no layout, no kernel integration.
Adds:
Tests pass locally; sphinx make html succeeds with no new warnings on the flexible_tensors.md page.
Issue: #
Brief Summary
copilot:summary
Walkthrough
copilot:walkthrough