Hi Stefan,
One way to do what you are asking is to use a "delta" tensor, which is a diagonal-sparse tensor. Using delta tensor with two indices invokes a special routine that just replaces one index with another.
So if an ITensor A has indices i1,i2,i3, you could do this to replace i2 with a new Index j:
auto j = Index("j",i2.m());
auto B = A;
B *= delta(i2,j);
Now B will have the same data as A but will have indices i1, j, i3 instead.
You can do a similar thing for IQTensors and IQIndices, but make sure in that case to use delta(dag(i2),j), that is you need to flip the arrow of i2 so that the arrow directions are compatible.
Finally, I recently added some functions called "sim" which given an index makes a new index that is distinct, but has the same "physical" properties. This is especially useful for IQIndices. So you can do:
auto j = sim(i);
To make a new IQIndex j that has the same size and QN sectors as an IQIndex j.
Miles