Skip to content

Use add! in unmatricizeadd!#152

Merged
mtfishman merged 2 commits intomainfrom
mf/unmatricize-add
Mar 12, 2026
Merged

Use add! in unmatricizeadd!#152
mtfishman merged 2 commits intomainfrom
mf/unmatricize-add

Conversation

@mtfishman
Copy link
Member

@mtfishman mtfishman commented Mar 11, 2026

This helps with contract in GradedArrays, since full broadcasting isn't working there right now so when iszero(β), add! has a simpler codepath. Also more generally it makes unmatricizeadd! (and therefore contract[add][!]) benefit from optimizations to add!.

Note that this PR exposed a bug in broadcasting empty StridedViews which I made a PR to fix here: QuantumKitHub/Strided.jl#50. For now I'm working around that issue in this PR but we can remove that workaround once it is fixed in Strided.jl.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.74%. Comparing base (a4d5381) to head (3074fa8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
- Coverage   71.91%   71.74%   -0.17%     
==========================================
  Files          24       24              
  Lines        1214     1214              
==========================================
- Hits          873      871       -2     
- Misses        341      343       +2     
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.

@mtfishman
Copy link
Member Author

mtfishman commented Mar 12, 2026

Test failures should be fixed by QuantumKitHub/Strided.jl#50 (see updated comment above).

@mtfishman mtfishman enabled auto-merge (squash) March 12, 2026 17:29
@mtfishman mtfishman merged commit 8db3991 into main Mar 12, 2026
23 of 24 checks passed
@mtfishman mtfishman deleted the mf/unmatricize-add branch March 12, 2026 17:51
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