Compare ITensors by dimension name with eager alignment#181
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=======================================
Coverage 74.75% 74.75%
=======================================
Files 20 20
Lines 1105 1105
=======================================
Hits 826 826
Misses 279 279
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:
|
24284a5 to
1ef3493
Compare
mtfishman
added a commit
to ITensor/ITensorNetworksNext.jl
that referenced
this pull request
Jun 22, 2026
## Summary
Migrates ITensorNetworksNext to ITensorBase v0.6, which replaces the
named-array core with the new `AbstractITensor{DimName}` model. Tensor
network vertices hold `ITensor`s built on that model across the
contraction, belief-propagation, and operator-application layers. This
requires ITensorBase 0.6.2
(ITensor/ITensorBase.jl#181) for name-based
comparison of graded tensors and TensorAlgebra 0.9.7
(ITensor/TensorAlgebra.jl#179) for contraction
labels that keep their element type.
The lazy expression layer is renamed from `LazyNamedDimsArrays` to
`LazyITensors`, and its symbolic leaf is reworked into a
`SymbolicITensor` that builds lazy products directly and carries named
structure with no array payload. The delta-tensor generators no longer
depend on DiagonalArrays: a dense `diagonaltensor`/`delta` helper places
values on the hyperdiagonal over either plain or named axes.
Relocating the lazy and symbolic core into ITensorBase will follow in a
later PR.
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
Compares
AbstractITensors by aligning the second argument eagerly withdenamerather than through a lazy permuted view. Reducing over a lazy permuted view scalar-indexes the underlying array, which graded arrays forbid, so==,isequal, andisapproxerrored on gradedITensors whose dimensions were stored in a different order. Aligning eagerly materializes the permutation first.These methods and
eachindexnow compare dimension names (dimnames) rather than the full named axes (inds), so they agree on identity by name without requiring the axis objects themselves to match.