Hello,

for many different reasons, i.e. 1-site TDVP algorithm, it is useful to QR decompose the MPS tensor A=QR of at position b. Since QR is not implemented in ITensor one may still use SVD, namely decompose psi.A(b) into USV and identify Q=U and SV= R. However most of the examples in ITensor are for two-site svd decomposition. I tried to implement it for one site as follow

```
auto ir1 = commonIndex(psi.A(b-1),psi.A(b),Link);
auto ir2 = findtype(psi.A(b) , Site);
ITensor U(ir1,ir2),V,S;
svd(phi,U,S,V);
```

However when giving

```
psi.setA(b,U);
```

a segmentation fault is produced. The reason is that the r=3 tensor U has not its indices ordered as in psi.A(b). U has index (Link,Site,Link) while psi.A(b) has (Site, Link,Link).

Do you know how to quickly solve the problem? Or maybe there is a better way to do the decomposition. Thanks a lot!

Best,

Jacopo.