Skip to content

Conversation

@Yue-Zhengyuan
Copy link
Member

This PR catches the edge case tensorexpr(:name, :i, :j) so it can be converted to tensorexpr(:name, (:i,), (:j,)) correctly.

julia> tuple(:a)
(:a,)

julia> Tuple(:a)
ERROR: MethodError: no method matching length(::Symbol)
The function `length` exists, but no method is defined for this combination of argument types.
...

See also QuantumKitHub/PEPSKit.jl#268.

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/utility/utility.jl 75.94% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yue-Zhengyuan
Copy link
Member Author

@lkdvos Shall we bump the version so PEPSKit can start using it?

@Yue-Zhengyuan Yue-Zhengyuan merged commit c897923 into main Oct 2, 2025
27 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the fix-totuple branch October 2, 2025 15:11
@Yue-Zhengyuan
Copy link
Member Author

@lkdvos Can you help with bumping the version and releasing it? I don't quite know how it's done, and might mess up the release notes or something else...

@lkdvos
Copy link
Member

lkdvos commented Oct 3, 2025

Sure! For future reference, it's just a matter of typing the magic words in the comments of a particular commit, so typically I like to bump the version either via PR or directly and then type the magic words, see: ef1beb4

There it does suggest to add release notes, which I typically like to do but there are no strong rules about this. I don't think it was necessary here as _totuple really is an internal function anyways.

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.

3 participants