Skip to content

Follow the TensorAlgebra MatricizeStyle removal - #284

Merged
mtfishman merged 6 commits into
mainfrom
mf/remove-matricizestyle
Sep 28, 2026
Merged

mtfishman merged 6 commits into
mainfrom
mf/remove-matricizestyle

Conversation

@mtfishman

@mtfishman mtfishman commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

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.

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

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.75%. Comparing base (b15d689) to head (820ae52).

Files with missing lines Patch % Lines
src/gradedarray.jl 80.00% 1 Missing ⚠️
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     
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 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.

mtfishman and others added 4 commits September 27, 2026 19:54
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 mtfishman changed the title [WIP] Follow the TensorAlgebra MatricizeStyle removal Follow the TensorAlgebra MatricizeStyle removal Sep 28, 2026
@mtfishman
mtfishman marked this pull request as ready for review September 28, 2026 21:27
@mtfishman
mtfishman enabled auto-merge (squash) September 28, 2026 21:27
@mtfishman
mtfishman merged commit 9db921e into main Sep 28, 2026
26 of 29 checks passed
@mtfishman
mtfishman deleted the mf/remove-matricizestyle branch September 28, 2026 21:49
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