General usage: `replacesites!`substitute?

In the function

setindex!(ψ::Union{MPS, MPO}, A::ITensor, r::UnitRange{Int};
orthocenter::Int = last(r), perm = nothing, kwargs…)
replacesites!([…])
replacesites([…])

defined here, replacesites! is mentioned as an alias for it but this has been deprecated, and ITensors.replace_siteinds! has been marked as substitute. Apart from the fact that this function is defined in ITensorMPS and not ITensors, this function only changes the indexes, so it is completely different from replacesites!. It seems there is something missing but I’m not sure what exactly.

  • Should people use setindex! directly and no substitute is present for replacesites!? Then this should be changed?
  • Was a substitute set to be created but somehow that changed mid work?
  • Should that method siteindex! for some reason be avoided and something else should be used instead?

I honestly don’t remember what replacesites! was designed to do, but the fundamental issue you are pointing out appears to be that ITensorMPS.jl/src/abstractmps.jl at 996375baf4cd14437185cb3077d93e6e88d376fd · ITensor/ITensorMPS.jl · GitHub implies it was replaced by setindex! while ITensorMPS.jl/src/deprecated.jl at 996375baf4cd14437185cb3077d93e6e88d376fd · ITensor/ITensorMPS.jl · GitHub implies it was replaced by replace_siteinds!. Probably we should just remove references to replacesites! to avoid confusion and you can either use setindex! or replace_siteinds! depending on what you want to do.