Thank for your answer.For example,if I want create a matrix A,I do this:
auto a=Index(2);
auto b=Index(2);
auto A=ITensor(a,b);
A.set(a=1,b=1,1);
A.set(a=1,b=2,1);
A.set(a=2,b=1,1);
A.set(a=2,b=2,1);
Then,I want to convert this matrix to A'( A' is 3*2 matrix and the corresponding position retains the value of the original matrix.For example,elt(A',a=1,b=1)==elt(A,a=1,b=1)).So,I think the easiest way is that change the size of a index and reserve the old id.But what should I do?