# The tensors calculated by idmrg do not obey the right orthogonality condition.

Hi Miles,

I'm trying to calculate observables from idmrg. The scheme used in the sample "idmrg.cc" is base on the right-orthogonal gauge. But when I use the following code to check the orthogonality, it turns that this condition is not satisfied in the middle of the unicell

int Nuc = 4;
int N = 2*Nuc;
// Other codes
for(auto ni=1;ni<=N;++ni)
{
auto pa=psi.A(ni);
auto indc = commonIndex(pa,psi.A(ni-1));
PrintDat(pa*prime(dag(pa),indc));
}


where right-orthogonality is satisfied except for the center tensor, i.e., ni=5. The result for that site is not an identity matrix.

Best,
Su Wei

Hi, sorry for the very slow reply. I think the issue may be where you write

psi.A(ni-1)


The .A method of an MPS is 1-indexed. On the other hand, it does allow you to input A(0), but this retrieves the "center" tensor which has no site index, and is the singular values resulting from a Schmidt decomposition of the infinite system done between two unit cells. So it should not obey the right-orthogonal gauge. I understand this is not well documented. So for version 3 we are moving the iDMRG code to a separate "code" project and planning to replace it with a better implementation that is also better documented.

Best regards,
Miles