Skip to content

Commit

Permalink
Accept AbstractMPS for rearrange_siteinds
Browse files Browse the repository at this point in the history
  • Loading branch information
shinaoka committed Jun 22, 2024
1 parent 7725122 commit 64ab8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ function _directprod(M1::MPS, Mx::MPS...)::MPS
end
end

function rearrange_siteinds(M::MPS, sites::Vector{Vector{Index{T}}})::MPS where {T}
function rearrange_siteinds(M::AbstractMPS, sites::Vector{Vector{Index{T}}})::MPS where {T}
sitesold = siteinds(MPO(collect(M)))

Set(Iterators.flatten(sites)) == Set(Iterators.flatten(sitesold)) || error("siteinds do not match $(sites) != $(sitesold)")
Expand Down

0 comments on commit 64ab8cf

Please sign in to comment.