Skip to content

Commit

Permalink
Make DenseMPO to TensorMap converter work for symmetry
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Oct 26, 2024
1 parent a3c5a17 commit c2abf5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operators/densempo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ function Base.convert(::Type{<:AbstractTensorMap}, mpo::FiniteMPO)
U_right = Tensor(ones, scalartype(mpo), V_right')

tensors = vcat(U_left, mpo.opp, U_right)
indices = [[i, -i, -(i + N), i + 1] for i in 1:length(mpo)]
indices = [[i, -i, -(2N - i + 1), i + 1] for i in 1:length(mpo)]
pushfirst!(indices, [1])
push!(indices, [N + 1])
O = ncon(tensors, indices)

return transpose(O, (ntuple(identity, N), ntuple(i -> i + N, N)))
return transpose(O, (ntuple(identity, N), ntuple(i -> 2N - i + 1, N)))
end

# Linear Algebra
Expand Down

0 comments on commit c2abf5a

Please sign in to comment.