diff --git a/Project.toml b/Project.toml index 6deb6f6..224b4b5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FusionTensors" uuid = "e16ca583-1f51-4df0-8e12-57d32947d33e" authors = ["ITensor developers and contributors"] -version = "0.5.8" +version = "0.5.9" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" @@ -21,14 +21,14 @@ WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" [compat] Accessors = "0.1.42" BlockArrays = "1.7" -BlockSparseArrays = "0.8, 0.9" +BlockSparseArrays = "0.10" GradedArrays = "0.4.14" HalfIntegers = "1.6" LRUCache = "1.6" LinearAlgebra = "1.10" Random = "1.10" Strided = "2.3" -TensorAlgebra = "0.3.12" +TensorAlgebra = "0.4" TensorProducts = "0.1.7" TypeParameterAccessors = "0.4" WignerSymbols = "2.0.0" diff --git a/src/fusiontensor/array_cast.jl b/src/fusiontensor/array_cast.jl index 56bbe1b..e505f19 100644 --- a/src/fusiontensor/array_cast.jl +++ b/src/fusiontensor/array_cast.jl @@ -151,14 +151,16 @@ function contract_fusion_trees( # \___________| \___________| # \ | # \----------------dim_sec---------------- / - return contract( + res = contract( ntuple(i -> 2 * i - 1, N), split_array_block, ntuple(identity, 2 * N), p, ntuple(i -> 2 * i, N), - 1 / dim_sec, # normalization factor ) + # normalization factor + res ./= dim_sec + return res end function contract_singlet_projector(f1::SectorFusionTree, f2::SectorFusionTree) diff --git a/src/fusiontensor/tensor_algebra_interface.jl b/src/fusiontensor/tensor_algebra_interface.jl index b75ba09..1cf948e 100644 --- a/src/fusiontensor/tensor_algebra_interface.jl +++ b/src/fusiontensor/tensor_algebra_interface.jl @@ -23,7 +23,6 @@ function TensorAlgebra.output_axes( biperm1::AbstractBlockPermutation{2}, a2::FusionTensor, biperm2::AbstractBlockPermutation{2}, - α::Number=one(Bool), ) axes_codomain, axes_contracted = blocks(axes(a1)[biperm1]) axes_contracted2, axes_domain = blocks(axes(a2)[biperm2]) @@ -66,7 +65,7 @@ function TensorAlgebra.permuteblockeddims!( end # TODO define custom broadcast rules -function TensorAlgebra.unmatricize_add!(a_dest::FusionTensor, a_dest_mat, invbiperm, α, β) +function TensorAlgebra.unmatricizeadd!(a_dest::FusionTensor, a_dest_mat, invbiperm, α, β) a12 = unmatricize(a_dest_mat, axes(a_dest), invbiperm) data_matrix(a_dest) .= α .* data_matrix(a12) .+ β .* data_matrix(a_dest) return a_dest diff --git a/test/Project.toml b/test/Project.toml index e2eb1d4..268e23a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -15,13 +15,13 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.8.11" BlockArrays = "1.6" -BlockSparseArrays = "0.8, 0.9" +BlockSparseArrays = "0.10" FusionTensors = "0.5" GradedArrays = "0.4" LinearAlgebra = "1.10.0" Random = "1.10" SafeTestsets = "0.1.0" Suppressor = "0.2.8" -TensorAlgebra = "0.3" +TensorAlgebra = "0.4" TensorProducts = "0.1" Test = "1.10.0"