Skip to content

Drop the BlockSparseArrays dependency and adopt TensorAlgebra v0.10 - #180

Merged
mtfishman merged 2 commits into
mainfrom
mf/drop-blocksparsearrays
Jun 23, 2026
Merged

mtfishman merged 2 commits into
mainfrom
mf/drop-blocksparsearrays

Conversation

@mtfishman

@mtfishman mtfishman commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

Summary

GradedArrays implements the block-sparse interface on its own graded array and axis types, so it no longer depends on BlockSparseArrays. The interface functions it was extending are now declared and owned by GradedArrays in src/blocksparseinterface.jl, reached downstream by qualified import, and blockstoredlength is computed directly on the SparseArraysBase block storage. Display no longer routes through a BlockSparseArray: print_array renders through a BlockArrays block array whose unstored blocks are FillArrays Zeros, reproducing the same block grid and dotted unstored entries.

This release also moves the package onto TensorAlgebra v0.10 and SparseArraysBase v0.10. scale! and zero! now come from TensorAlgebra, dropping the FunctionImplementations dependency, and the fermionic contraction twist is expressed with TensorAlgebra v0.10's per-position fusion styles in place of the old contractopadd! override. The deprecated NamedDimsArrays extension is removed, now that ITensorBase plumbs conj through named axes generically.

This is a breaking release (0.10.0): downstream code that reached the block-sparse interface functions through BlockSparseArrays now needs to reach them through GradedArrays instead.

GradedArrays implements the block-sparse interface on its own graded array and axis types, so it no longer needs to depend on BlockSparseArrays. The interface functions it was extending are now declared and owned by GradedArrays in `src/blocksparseinterface.jl`, reached downstream by qualified import, and `blockstoredlength` is computed directly on top of the SparseArraysBase block storage.

Display no longer routes through a `BlockSparseArray`. `print_array` renders through a BlockArrays block array whose unstored blocks are FillArrays `Zeros`, reproducing the same block grid and dotted unstored entries. Matricization is unchanged, served by TensorAlgebra's BlockArrays extension.
@codecov

codecov Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.33962% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.00%. Comparing base (0950ec7) to head (3eb7a18).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fusedgradedvector.jl 33.33% 2 Missing ⚠️
src/sectoroneto.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
- Coverage   83.02%   83.00%   -0.02%     
==========================================
  Files          23       23              
  Lines        1832     1830       -2     
==========================================
- Hits         1521     1519       -2     
  Misses        311      311              
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 mtfishman changed the title Drop the BlockSparseArrays dependency [WIP] Drop the BlockSparseArrays dependency Jun 23, 2026
@mtfishman
mtfishman marked this pull request as draft June 23, 2026 20:20
Bump compat to TensorAlgebra 0.10 and SparseArraysBase 0.10 and adapt to their interfaces:

- Use TensorAlgebra's `zero!` and `scale!` directly, dropping the FunctionImplementations dependency and the local generic `scale!` fallback.
- Express the fermionic contraction twist through TensorAlgebra v0.10's per-position fusion styles. `default_contract_algorithm` puts a `TwistedSectorFusion` on the right factor, whose `matricizeop` inserts the twist, replacing the `contractopadd!` override.
- Permute axis tuples with `blockpermute` instead of the removed tuple-by-bipermutation `getindex`.
- Drop the NamedDimsArrays extension. NamedDimsArrays is deprecated, and ITensorBase already forwards `conj` through its named ranges, which covers the only live use because `conj` on a graded axis is defined as `dual`.
@mtfishman mtfishman changed the title [WIP] Drop the BlockSparseArrays dependency Drop the BlockSparseArrays dependency and adopt TensorAlgebra v0.10 Jun 23, 2026
@mtfishman
mtfishman marked this pull request as ready for review June 23, 2026 21:44
@mtfishman
mtfishman enabled auto-merge (squash) June 23, 2026 21:44
@mtfishman
mtfishman merged commit 1e9dd26 into main Jun 23, 2026
28 checks passed
@mtfishman
mtfishman deleted the mf/drop-blocksparsearrays branch June 23, 2026 21:52
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