From 8264d88d9d9ce203be3e4bb7a633bcb53112f513 Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Tue, 4 Aug 2026 16:50:10 -0400 Subject: [PATCH 1/2] Rename FusionStyle to MatricizeStyle Follows the TensorAlgebra rename of the matricize-strategy trait `FusionStyle` to `MatricizeStyle` (https://github.com/ITensor/TensorAlgebra.jl/pull/219), renaming `SparseArrayFusion` to `SparseArrayMatricize` and requiring TensorAlgebra 0.19. Co-Authored-By: Claude Opus 4.8 --- Project.toml | 8 ++++++-- docs/Project.toml | 2 +- examples/Project.toml | 2 +- src/tensoralgebra.jl | 14 +++++++------- test/Project.toml | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Project.toml b/Project.toml index 0a87b20a..0a7c569f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SparseArraysBase" uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208" -version = "0.10.9" +version = "0.11.0" authors = ["ITensor developers and contributors"] [workspace] @@ -19,6 +19,10 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" +[sources.TensorAlgebra] +rev = "mf/matricize-style" +url = "https://github.com/ITensor/TensorAlgebra.jl" + [compat] Accessors = "0.1.41" Adapt = "4.3" @@ -30,5 +34,5 @@ LinearAlgebra = "1.10" MapBroadcast = "0.1.5" Random = "1.10" SparseArrays = "1.10" -TensorAlgebra = "0.17.5, 0.18" +TensorAlgebra = "0.19" julia = "1.10" diff --git a/docs/Project.toml b/docs/Project.toml index 95fe37ed..b43a8924 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -13,4 +13,4 @@ Dictionaries = "0.4.4" Documenter = "1.8.1" ITensorFormatter = "0.2.27" Literate = "2.20.1" -SparseArraysBase = "0.10" +SparseArraysBase = "0.11" diff --git a/examples/Project.toml b/examples/Project.toml index 0c07597a..3e13b167 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -8,5 +8,5 @@ path = ".." [compat] Dictionaries = "0.4.4" -SparseArraysBase = "0.10" +SparseArraysBase = "0.11" Test = "<0.0.1, 1" diff --git a/src/tensoralgebra.jl b/src/tensoralgebra.jl index 6859aa5f..0f0a15d4 100644 --- a/src/tensoralgebra.jl +++ b/src/tensoralgebra.jl @@ -1,22 +1,22 @@ using SparseArrays: SparseMatrixCSC -using TensorAlgebra: TensorAlgebra, FusionStyle, ReshapeFusion, matricize, unmatricize +using TensorAlgebra: TensorAlgebra, MatricizeStyle, ReshapeMatricize, matricize, unmatricize -struct SparseArrayFusion <: FusionStyle end -TensorAlgebra.FusionStyle(::Type{<:AnyAbstractSparseArray}) = SparseArrayFusion() +struct SparseArrayMatricize <: MatricizeStyle end +TensorAlgebra.MatricizeStyle(::Type{<:AnyAbstractSparseArray}) = SparseArrayMatricize() function TensorAlgebra.matricize( - style::SparseArrayFusion, a::AbstractArray, length_codomain::Val + style::SparseArrayMatricize, a::AbstractArray, length_codomain::Val ) - m = matricize(ReshapeFusion(), a, length_codomain) + m = matricize(ReshapeMatricize(), a, length_codomain) return convert(SparseMatrixCSC, m) end function TensorAlgebra.unmatricize( - style::SparseArrayFusion, + style::SparseArrayMatricize, m::AbstractMatrix, axes_codomain::Tuple{Vararg{AbstractUnitRange}}, axes_domain::Tuple{Vararg{AbstractUnitRange}} ) - a = unmatricize(ReshapeFusion(), m, axes_codomain, axes_domain) + a = unmatricize(ReshapeMatricize(), m, axes_codomain, axes_domain) # TODO: Use `similar_type(m)` instead of hardcoding to `SparseArrayDOK`? return convert(SparseArrayDOK, a) end diff --git a/test/Project.toml b/test/Project.toml index 52f11aaa..2b67354e 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -31,8 +31,8 @@ LinearAlgebra = "<0.0.1, 1" Random = "<0.0.1, 1" SafeTestsets = "0.1" SparseArrays = "1.10" -SparseArraysBase = "0.10" +SparseArraysBase = "0.11" StableRNGs = "1.0.2" Suppressor = "0.2.8" -TensorAlgebra = "0.17.4, 0.18" +TensorAlgebra = "0.19" Test = "<0.0.1, 1" From 6378172062eeb9d13b06f5c4d83f8a50fdcd9c88 Mon Sep 17 00:00:00 2001 From: Matthew Fishman Date: Tue, 4 Aug 2026 17:19:58 -0400 Subject: [PATCH 2/2] Drop the TensorAlgebra [sources] pin now that 0.19 is registered Co-Authored-By: Claude Opus 4.8 --- Project.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Project.toml b/Project.toml index 0a7c569f..935f9368 100644 --- a/Project.toml +++ b/Project.toml @@ -19,10 +19,6 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" -[sources.TensorAlgebra] -rev = "mf/matricize-style" -url = "https://github.com/ITensor/TensorAlgebra.jl" - [compat] Accessors = "0.1.41" Adapt = "4.3"