Add dimnametype method for AbstractITensor#162
Merged
Conversation
`ITensorBase` commits every `AbstractITensor` dim name to `IndexName` at the
type level (the inner `ITensor` constructor enforces it). Define
`NamedDimsArrays.dimnametype(::Type{<:AbstractITensor}) = IndexName` so generic
code can ask for the dim-name type without inspecting an `ITensor`'s names
collection at runtime, and so the result is well-defined even for an order-0
`ITensor` where the names collection is empty.
Depends on NamedDimsArrays 0.15.6, which adds the `dimnametype` interface
function.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The released NamedDimsArrays does not yet have `dimnametype`. Point Pkg at the in-flight branch (`ITensor/NamedDimsArrays.jl#224`) so CI can resolve and tests can run. Remove this `[sources]` block once NamedDimsArrays 0.15.6 registers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
+ Coverage 82.05% 82.20% +0.15%
==========================================
Files 4 4
Lines 117 118 +1
==========================================
+ Hits 96 97 +1
Misses 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NamedDimsArrays 0.15.6 is registered; resolve against the released version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dimnametype method for AbstractITensor
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
This PR adds the
NamedDimsArrays.dimnametypemethod (introduced inITensor/NamedDimsArrays.jl#224) for
AbstractITensor, returningIndexName.