Hi,
while digging deeper into my previous question, I found the following behaviour which totally confuses me. It might be a bug I can't find a workaround for.
Try to run following code:
Hubbard sites(4);
IQMPO testA(sites);
testA.Anc(2) = sites.op("Cdagdn", 2) *
setElt(leftLinkInd(testA, 2)(1)) *
setElt(rightLinkInd(testA, 2)(1));
testA.Anc(3) = sites.op("Cdn", 3) *
setElt(leftLinkInd(testA, 3)(1)) *
setElt(rightLinkInd(testA, 3)(1));
testA.orthogonalize();
std::cout << "Checking testA";
checkQNs(testA);
std::cout << " successfull" << std::endl;
IQMPO testB(sites);
testB.Anc(2) = multSiteOps(sites.op("Cdagdn", 2), sites.op("Id", 2)) *
setElt(leftLinkInd(testB, 2)(1)) *
setElt(rightLinkInd(testB, 2)(1));
testB.Anc(3) = sites.op("Cdn", 3) *
setElt(leftLinkInd(testB, 3)(1)) *
setElt(rightLinkInd(testB, 3)(1));
std::cout << "Checking testB";
testB.orthogonalize();
checkQNs(testB);
std::cout << " successfull" << std::endl;
You will find something like
Checking testA succesful
Checking testBcheckQNs: At site 4 to the right of the OC, Left side Link not pointing In
From line 250, file mps/mpo.cc
Incorrect Arrow in IQMPO
Incorrect Arrow in IQMPO
Aborted (core dumped)
This means if an IQMPO is constructed from a siteset and you put an operator at some place it works (testA). But as soon as you multiply this operator by one (or any other site operator), the orthogonalization does not work anymore and the IQMPO breaks.
I already checked the multSiteOps
function and tried to use putMPOLinks
instead of the setElt(left....)
thing. Both approaches do not solve the problem. The single workaround I figured out so far is to multiply the site operators by hand and put them together in a new created operator, but I hope there is something better.
I hope you have an idea.
Best,
Lars