Skip to content

Commit

Permalink
Add dual metadata in copy tensor from DiagonalReduction
Browse files Browse the repository at this point in the history
  • Loading branch information
jofrevalles committed Sep 13, 2023
1 parent 2437f18 commit 177d850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Transformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function transform!(tn::TensorNetwork, config::DiagonalReduction)
# insert COPY tensor
new_index = Symbol(uuid4())
data = DeltaArray{N + 1}(ones(size(target, first(inds))))
push!(copies, Tensor(data, (new_index, inds...)))
push!(copies, Tensor(data, (new_index, inds...), dual = new_index))

# extract diagonal of target tensor
# TODO rewrite using `einsum!` when implemented in Tensors
Expand Down

0 comments on commit 177d850

Please sign in to comment.