Follow the TensorAlgebra MatricizeStyle removal - #284
Merged
Merged
Conversation
TensorAlgebra 0.22 removes `MatricizeStyle`, so the matricize hooks are overloaded by array type and the fermionic twist of the right contraction factor becomes a `matricize_inputs` method instead of a per-operand style. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
+ Coverage 83.72% 83.75% +0.03%
==========================================
Files 39 39
Lines 2758 2758
==========================================
+ Hits 2309 2310 +1
+ Misses 449 448 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Threads `α, β` through the buffer fast path via `add!` and the block-wise path via `bipermutedimsopadd!`, matching TensorAlgebra's accumulating scatter. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The fermionic twist lives in this kernel instead of a hook into TensorAlgebra's dense one. `default_algorithm` selects it whenever the right factor is a `GradedArray`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Names the operation, twist then matricize, rather than the call site. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mtfishman
added a commit
to ITensor/TensorAlgebra.jl
that referenced
this pull request
Sep 28, 2026
## Summary Removes `MatricizeStyle`: every style was a function of the array type, so the matricize hooks dispatch on the array, and a family needing more than the fold owns its own `ContractAlgorithm`. Kernels validate their own inputs. Lands together with ITensor/GradedArrays.jl#284. --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mtfishman
marked this pull request as ready for review
September 28, 2026 21:27
mtfishman
enabled auto-merge (squash)
September 28, 2026 21:27
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
Follows TensorAlgebra 0.22 (ITensor/TensorAlgebra.jl#238), which removes
MatricizeStyle: the matricize hooks dispatch on the array type, and graded contraction becomes its own algorithm,GradedContract, carrying the fermionic twist.