diff --git a/Project.toml b/Project.toml index 23e53ac..ae4403d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "DiagonalArrays" uuid = "74fd4be6-21e2-4f6f-823a-4360d37c7a77" authors = ["ITensor developers and contributors"] -version = "0.3.11" +version = "0.3.12" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" @@ -10,17 +10,10 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" SparseArraysBase = "0d5efcca-f356-4864-8770-e1ed8d78f208" -[weakdeps] -TensorAlgebra = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a" - -[extensions] -DiagonalArraysTensorAlgebraExt = "TensorAlgebra" - [compat] ArrayLayouts = "1.10.4" DerivableInterfaces = "0.5" FillArrays = "1.13.0" LinearAlgebra = "1.10.0" SparseArraysBase = "0.7.2" -TensorAlgebra = "0.3.10" julia = "1.10" diff --git a/ext/DiagonalArraysTensorAlgebraExt/DiagonalArraysTensorAlgebraExt.jl b/ext/DiagonalArraysTensorAlgebraExt/DiagonalArraysTensorAlgebraExt.jl deleted file mode 100644 index fc19745..0000000 --- a/ext/DiagonalArraysTensorAlgebraExt/DiagonalArraysTensorAlgebraExt.jl +++ /dev/null @@ -1,36 +0,0 @@ -module DiagonalArraysTensorAlgebraExt - -using DiagonalArrays: Delta -using FillArrays: Eye -using TensorAlgebra: - TensorAlgebra, - AbstractBlockPermutation, - BlockedTrivialPermutation, - BlockedTuple, - FusionStyle, - fuseaxes, - matricize - -struct DeltaFusion <: FusionStyle end -TensorAlgebra.FusionStyle(::Delta) = DeltaFusion() -function matricize_delta(a::AbstractArray, biperm::AbstractBlockPermutation{2}) - ax = fuseaxes(axes(a), biperm) - return Eye{eltype(a)}(ax) -end -function TensorAlgebra.matricize( - ::DeltaFusion, a::AbstractArray, biperm::AbstractBlockPermutation{2} -) - return matricize_delta(a, biperm) -end -function TensorAlgebra.matricize( - ::DeltaFusion, a::AbstractArray, biperm::BlockedTrivialPermutation{2} -) - return matricize_delta(a, biperm) -end - -function TensorAlgebra.unmatricize(::DeltaFusion, a::Eye, ax::BlockedTuple{2}) - length(a) == prod(length, ax) || throw(DimensionMismatch("reshape sizes don't match")) - return Delta{eltype(a)}(Tuple(ax)) -end - -end diff --git a/test/test_tensoralgebraext.jl b/test/test_tensoralgebraext.jl deleted file mode 100644 index 02c0804..0000000 --- a/test/test_tensoralgebraext.jl +++ /dev/null @@ -1,13 +0,0 @@ -using DiagonalArrays: Delta -using FillArrays: Eye -using TensorAlgebra: FusionStyle, matricize, tuplemortar, unmatricize -using Test: @test, @testset - -@testset "matricize, unmatricize" begin - a = Delta{Float32}(2, 2, 2) - m = matricize(a, (1,), (2, 3)) - @test m ≡ Eye{Float32}(2, 4) - @test unmatricize( - FusionStyle(a), m, tuplemortar(((axes(a, 1),), (axes(a, 2), axes(a, 3)))) - ) ≡ a -end