Skip to content

Conversation

JoeyT1994
Copy link
Collaborator

@JoeyT1994 JoeyT1994 commented Oct 2, 2025

This PR introduces the ability to contract vectors of AbstractArrays and thus AbstractTensorNetworks via the contractnetwork(tn; sequence) function.

The sequence is used to tell the contraction_sequence backend how to find the desired sequence, with the strings sequence= "leftassociative" and "optimal" supported (the latter via TensorOperations) alongside support for sending a specific pre-defined sequence.

Rudimentary tests are included, although we might want to consider making these more robust and also testing the sequence finding functionality ourselves.

Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (3549a9c) to head (7a2a24c).

Files with missing lines Patch % Lines
src/contractnetwork.jl 0.00% 21 Missing ⚠️
...tionsExt/ITensorNetworksNextTensorOperationsExt.jl 0.00% 5 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3549a9c) and HEAD (7a2a24c). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (3549a9c) HEAD (7a2a24c)
6 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #7       +/-   ##
==========================================
- Coverage   34.85%   0.00%   -34.86%     
==========================================
  Files           3       4        +1     
  Lines         175     195       +20     
==========================================
- Hits           61       0       -61     
- Misses        114     195       +81     
Flag Coverage Δ
docs 0.00% <0.00%> (ø)

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.

Copy link
Contributor

github-actions bot commented Oct 5, 2025

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

@JoeyT1994
Copy link
Collaborator Author

@mtfishman I'm not really sure what the failing test is to do with... something coming from Aqua.jl and stale dependencies...

@mtfishman
Copy link
Member

@mtfishman I'm not really sure what the failing test is to do with... something coming from Aqua.jl and stale dependencies...

It looks like moving the TensorOperations code to a package extension made it so that ITensorBase is no longer a direct dependency of ITensorNetworksNext, since now it is only used in that package extension (Aqua is rightly detecting that situation and seeing that there is a dependency listed in the Project.toml that isn't being used in the main package).

However, in this case I think we should try to use NamedDimsArrays directly rather than ITensorBase, I can give you pointers on how to do that.

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