Skip to content

Support GradedArrays 0.17 and show an index's space - #268

Merged
mtfishman merged 16 commits into
mainfrom
mf/gradedarrays-0.17
Oct 2, 2026
Merged

mtfishman merged 16 commits into
mainfrom
mf/gradedarrays-0.17

Conversation

@mtfishman

@mtfishman mtfishman commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps compat to GradedArrays 0.17 (ITensor/GradedArrays.jl#285). An Index now prints the space it was written with, so a graded one shows its sector => multiplicity pairs and its arrow, and there is a new docs page on building symmetric tensors.

@ITensorBot

ITensorBot commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Your PR no longer requires formatting changes. Thank you for your contribution!

@mtfishman mtfishman changed the title [WIP] Bump compat to GradedArrays 0.17 [WIP] Support GradedArrays 0.17 and show an index's space Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.13%. Comparing base (e4a3bd4) to head (30d4ddf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   78.00%   78.13%   +0.13%     
==========================================
  Files          30       30              
  Lines        1823     1834      +11     
==========================================
+ Hits         1422     1433      +11     
  Misses        401      401              
Flag Coverage Δ
docs 26.07% <92.85%> (+0.51%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mtfishman
mtfishman force-pushed the mf/gradedarrays-0.17 branch from 6fda647 to 322f36f Compare October 2, 2026 01:32
@mtfishman mtfishman changed the title [WIP] Support GradedArrays 0.17 and show an index's space Support GradedArrays 0.17 and show an index's space Oct 2, 2026
@mtfishman
mtfishman marked this pull request as ready for review October 2, 2026 17:00
@mtfishman
mtfishman enabled auto-merge (squash) October 2, 2026 17:08
@mtfishman
mtfishman disabled auto-merge October 2, 2026 17:22
mtfishman and others added 15 commits October 2, 2026 14:13
GradedArrays replaced `SectorRange` with its own `Sector`, so the flux constructors here dispatch on that instead. Both sector types are spelled qualified, since GradedArrays and TensorKitSectors each define a `Sector`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`GradedArrays` is a weak dependency at the root, and Pkg rejects a `[sources]` entry for a package that is not in `deps` or `extras`, so the pin made the whole project fail to resolve. It is a real dependency of the test project, which is where it belongs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An `Index` printed only `length=N`, which gave a graded index no way to show its sectors or which way its arrow points. It now prints the space, and a tensor's summary line asks for the compact form and keeps the length so that one entry per leg stays readable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Covers building an `Index` from sector pairs, turning it around with `dual` or `conj`, and reading a tensor's arrows off its legs. The symmetries themselves are GradedArrays', so the page links into its docs for the list rather than restating it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An index built as `Index(2)` stores a `Base.OneTo` and printed as `Index(1:2|id=...)`, which is neither how it was written nor how anyone would write it. It now shows the length, and an index over an explicit range still shows that range.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The page opened on duality, which a reader reaches for only once they have a tensor to apply it to. It now starts from graded indices and the array constructors, then contraction, scaling and addition, and keeps duality and the available symmetries for after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Introduces duality through what contracts with what, and points at the graded arrays page rather than one section of it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Dropping GradedArrays 0.16 from compat is breaking, and main has since released 0.15.2.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds `from_range`, the inverse of `to_range`, so a graded index shows its `sector => multiplicity` pairs instead of the `gradedrange` call that built the range. The test files that pulled `names` into scope now qualify it, since shadowing `Base.names` broke any file included after them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`dual(Index(...))` is the call that makes it, where a `dual` around the space is not a call at all once the space is a vector of pairs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Also points the TensorKit link at the repository's current location.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GradedArrays 0.17.0 is registered, so test/ and docs/ resolve it from the
registry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mtfishman
mtfishman force-pushed the mf/gradedarrays-0.17 branch from 803c087 to 8cae596 Compare October 2, 2026 21:50
Raising the GradedArrays compat floor does not change ITensorBase's own
surface, so this follows the breaking upstream as an ordinary patch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mtfishman
mtfishman enabled auto-merge (squash) October 2, 2026 22:41
@mtfishman
mtfishman merged commit 9204686 into main Oct 2, 2026
18 checks passed
@mtfishman
mtfishman deleted the mf/gradedarrays-0.17 branch October 2, 2026 23:03
mtfishman added a commit to ITensor/ITensorNetworksNext.jl that referenced this pull request Oct 3, 2026
## Summary

Bumps compat to ITensorBase 0.15.4, the first release that admits
GradedArrays 0.17 (ITensor/ITensorBase.jl#268).
ITensorNetworksNext only uses `U1`, `gradedrange` and `isdual` from
GradedArrays, so this is compat only.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
jack-dunham pushed a commit to jack-dunham/ITensorNetworksNext.jl that referenced this pull request Oct 6, 2026
Bumps compat to ITensorBase 0.15.4, the first release that admits
GradedArrays 0.17 (ITensor/ITensorBase.jl#268).
ITensorNetworksNext only uses `U1`, `gradedrange` and `isdual` from
GradedArrays, so this is compat only.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
jack-dunham pushed a commit to jack-dunham/ITensorNetworksNext.jl that referenced this pull request Oct 7, 2026
Bumps compat to ITensorBase 0.15.4, the first release that admits
GradedArrays 0.17 (ITensor/ITensorBase.jl#268).
ITensorNetworksNext only uses `U1`, `gradedrange` and `isdual` from
GradedArrays, so this is compat only.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants