Contracting ITensors with non-fitting index objects

Dear ITensor Team,

I wanted to ask whether there is a possibility to contract two ITensors which do not have the same index-object but e.g. have the same index-tag?
Minimal example:

using ITensors

i1 = Index(2, “i”)
i2 = Index(2, “i”)

A = ITensor(i1)
B = ITensor(i2)


Any chance that I can contract A and B using the tag “i” and get a dim 1 Tensor instead of (2,2)?
If not, is there a way to contract ITensors with respect to the position of the index?
Or is there a way to replace efficiently specific indices of Itensors (ideally identifified over their tag)?
Thank you already in advance

You can use A * replaceinds(B, i2 => i1) or A * (B * delta(i2, i1)).

Thanks a lot