Delegate named flux constructors to the GradedArrays backend - #232
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
- Coverage 78.15% 77.66% -0.49%
==========================================
Files 30 30
Lines 1744 1782 +38
==========================================
+ Hits 1363 1384 +21
- Misses 381 398 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mtfishman
force-pushed
the
mf/flux-delegate-gradedarrays
branch
2 times, most recently
from
July 27, 2026 21:00
7b6b3fb to
497efc2
Compare
Rework the named flux-canceling constructors in the GradedArrays extension to delegate to the GradedArrays flux constructors on the unnamed axes and reattach names, rather than minting the auxiliary Index and routing through the split constructor. The flux convention now lives only in the backend. Adds the empty-codomain form f(flux, (), domain), and derives the auxiliary leg's name type from the physical legs instead of hardcoding IndexName. Builds on ITensor/GradedArrays.jl#224.
mtfishman
force-pushed
the
mf/flux-delegate-gradedarrays
branch
from
July 27, 2026 21:07
497efc2 to
ca43914
Compare
mtfishman
marked this pull request as ready for review
July 27, 2026 21:08
mtfishman
enabled auto-merge (squash)
July 27, 2026 21:08
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.
Summary
Reworks the named flux-canceling constructors (
rand/randn/zeros/ones/fillwith a leading sector) in the GradedArrays extension to delegate to the GradedArrays flux constructors on the unnamed axes and then reattach names, rather than minting the auxiliaryIndexand routing through the split constructor. The flux convention (append a multiplicity-1 leg carrying the charge to the dualized domain) now lives in one place, the GradedArrays backend, and the extension only strips names, calls the backend, and names the result, matching how the other named constructors are layered.Two fixes fall out of the rework. The empty-codomain form
f(flux, (), domain)is now supported alongside the existing nonempty-codomain forms, since it delegates to the corresponding GradedArrays flux method (added in ITensor/GradedArrays.jl#224). And the auxiliary leg's name type is now derived from the physical legs rather than hardcoded toIndexName, so the constructors work for anyNamedUnitRangename type. The flux-only form (no codomain and no domain) is deliberately left to the backend, since a named method with no axis argument would be type piracy.Builds on ITensor/GradedArrays.jl#224 for the bare-
TensorKitSectors.Sectorflux and the empty-codomain flux methods.