I am struggling with the 'constructSites' function, where I now have to create two blocks (spin up and down), since there are two quantum numbers (Sz and n). Inside the iteration over sites, I therefore write:
auto v1 = stdx::reserve_vector<IndexQN>(M_);
auto v2 = stdx::reserve_vector<IndexQN>(M_);
for(int k = 0; k <= M_-1; ++k)
{
v1.push_back(
IndexQN(
Index("Up/" + std::to_string(k) + "/" + std::to_string(j)),
QN("n=",k)));
v2.push_back(
IndexQN(
Index("Up/" + std::to_string(k) + "/" + std::to_string(j)),
QN("n=",k)));
}
auto iq1 = IQIndex("Up", std::move(v1), Out, 0);
auto iq2 = IQIndex("Dn", std::move(v2), Out, 0);
site_.at(j) = IQIndex(
"S=1/2/M=" + std::to_string(M_) + "/j=" + std::to_string(j),
iq1,QN("Sz=",+1),
iq2,QN("Sz=",-1));
Is this the correct way to do it? And how can I access IQIndexVals labelled by both quantum numbers? So far I haven't been able to do it at all...