[ITensors] [ENHANCEMENT] In-place contraction with symmetric tensors #1159
Labels
enhancement
New feature or request
ITensors
Issues or pull requests related to the `ITensors` package.
Is your feature request related to a problem? Please describe.
While in-place contraction
A .= B .* C
is implemented for dense tensors, it seems to be missing for symmetric tensors. Using code from a manual as an example, we can constructHere is an error I get in my use case:
MethodError: no method matching contract!(::NDTensors.BlockSparseTensor{Float64, 2, Tuple{Index{Vector{Pair{QN, Int64}}}, Index{Vector{Pair{QN, Int64}}}}, NDTensors.BlockSparse{Float64, Vector{Float64}, 2}}, ::Tuple{Int64, Int64}, ::NDTensors.BlockSparseTensor{Float64, 2, Tuple{Index{Vector{Pair{QN, Int64}}}, Index{Vector{Pair{QN, Int64}}}}, NDTensors.BlockSparse{Float64, Vector{Float64}, 2}}, ::Tuple{Int64, Int64}, ::NDTensors.BlockSparseTensor{Float64, 2, Tuple{Index{Vector{Pair{QN, Int64}}}, Index{Vector{Pair{QN, Int64}}}}, NDTensors.BlockSparse{Float64, Vector{Float64}, 2}}, ::Tuple{Int64, Int64})
Describe the solution you'd like
Support of in-place contractions
A .= B .* C
andA .+= B .* C
for symmetric (block--sparse) tensors.The text was updated successfully, but these errors were encountered: