Skip to content

Add a twist! interface with a no-op default for non-graded arrays#213

Open
mtfishman wants to merge 1 commit into
mainfrom
mf/twist
Open

Add a twist! interface with a no-op default for non-graded arrays#213
mtfishman wants to merge 1 commit into
mainfrom
mf/twist

Conversation

@mtfishman

Copy link
Copy Markdown
Member

Summary

Adds twist!(a, dims) as a TensorAlgebra interface verb with a no-op AbstractArray default. A plain array has no sector data and no braiding, so twisting is the identity. Graded-array backends override the method to apply the sector twists of the given axes. This gives graded backends and named-tensor wrappers a shared twist! to extend, matching how the other array operations here are dispatched.

Adds twist!(a, dims) as a TensorAlgebra interface verb with a no-op AbstractArray default. A plain array has no sector data and no braiding, so twisting is the identity. Graded-array backends override the method to apply the sector twists of the given axes. This gives graded backends and named-tensor wrappers a shared twist! to extend, matching how the other array operations here are dispatched.
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.63%. Comparing base (be15b6c) to head (06ee313).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
+ Coverage   81.61%   81.63%   +0.01%     
==========================================
  Files          26       26              
  Lines         990      991       +1     
==========================================
+ Hits          808      809       +1     
  Misses        182      182              
Flag Coverage Δ
docs 22.15% <0.00%> (-0.03%) ⬇️

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

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

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