Skip to content

Add dimnametype method for AbstractITensor#162

Merged
mtfishman merged 3 commits into
mainfrom
mf/dimnametype
Jun 2, 2026
Merged

Add dimnametype method for AbstractITensor#162
mtfishman merged 3 commits into
mainfrom
mf/dimnametype

Conversation

@mtfishman
Copy link
Copy Markdown
Member

@mtfishman mtfishman commented Jun 1, 2026

Summary

This PR adds the NamedDimsArrays.dimnametype method (introduced in
ITensor/NamedDimsArrays.jl#224) for
AbstractITensor, returning IndexName.

mtfishman and others added 2 commits June 1, 2026 15:40
`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
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.20%. Comparing base (6d67c82) to head (68ecb35).

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              
Flag Coverage Δ
docs 33.91% <0.00%> (-0.30%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

NamedDimsArrays 0.15.6 is registered; resolve against the released
version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mtfishman mtfishman changed the title [WIP] Add dimnametype method for AbstractITensor Add dimnametype method for AbstractITensor Jun 1, 2026
@mtfishman mtfishman marked this pull request as ready for review June 1, 2026 22:09
@mtfishman mtfishman merged commit c03f44c into main Jun 2, 2026
26 of 28 checks passed
@mtfishman mtfishman deleted the mf/dimnametype branch June 2, 2026 00:39
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.

1 participant