From 8f754b56e51e661f370a9b1c2b24e1272b5d267e Mon Sep 17 00:00:00 2001 From: lkdvos Date: Fri, 24 Apr 2026 08:41:12 -0400 Subject: [PATCH 1/3] add TensorKit sources --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 7d8d17d..30a4380 100644 --- a/Project.toml +++ b/Project.toml @@ -36,7 +36,7 @@ MatrixAlgebraKit = "0.6" Random = "1" SafeTestsets = "0.1" Strided = "2.3.3" -TensorKit = "0.16.1" +TensorKit = "0.16.4" TensorOperations = "5" Test = "1" TestExtras = "0.2, 0.3" From fc7714a25cda1737bd21722f1515103711295fcb Mon Sep 17 00:00:00 2001 From: lkdvos Date: Fri, 24 Apr 2026 08:41:18 -0400 Subject: [PATCH 2/3] fix sumspace errors --- test/vectorspaces/sumspace.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/vectorspaces/sumspace.jl b/test/vectorspaces/sumspace.jl index 7770ce1..e4faa52 100644 --- a/test/vectorspaces/sumspace.jl +++ b/test/vectorspaces/sumspace.jl @@ -249,10 +249,10 @@ end @test issetequal(@constinferred(blocksectors(V ← V)), sectors(V)) @test @constinferred(blocksectors(one(V))) == [C0, D0] for v in [VC, VCM, VMD] - @test @constinferred(blocksectors(v^2)) == blocksectors(v ← v) + @test issetequal(@constinferred(blocksectors(v^2)), blocksectors(v ← v)) end for v in [WM, WMop] @test isempty(@constinferred(blocksectors(v^2))) - @test @constinferred(blocksectors(v ← v)) == blocksectors(v) + @test issetequal(@constinferred(blocksectors(v ← v)), blocksectors(v)) end end From 227511237d099e8fa041d9270a6b4fba83349e05 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Fri, 24 Apr 2026 13:08:14 -0400 Subject: [PATCH 3/3] fix scalar indexing --- src/tensors/blocktensor.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tensors/blocktensor.jl b/src/tensors/blocktensor.jl index ce351ba..1ee6fa5 100644 --- a/src/tensors/blocktensor.jl +++ b/src/tensors/blocktensor.jl @@ -113,8 +113,13 @@ end function BlockTensorMap(t::AbstractTensorMap, space::TensorMapSumSpace) TT = tensormaptype(spacetype(t), numout(t), numin(t), storagetype(t)) tdst = BlockTensorMap{TT}(undef, space) - for (f₁, f₂) in fusiontrees(tdst) - copy!(tdst[f₁, f₂], t[f₁, f₂]) + @inbounds for (f₁, f₂) in fusiontrees(t) + dst = tdst[f₁, f₂] + src = t[f₁, f₂] + for block_index in Iterators.product(blockaxes(dst)...) + indices = getindex.(axes(dst), block_index) + dst[block_index...] .= @view src[indices...] + end end return tdst end