I'd like to calculate Sx^2 in spin 1 system and the operator "Sx2" is defined in the spinone.h file. For the simplest example below, the compile was successful. But when I run the code, I got error message: "From line 161, file itdata/qdense.cc
Setting IQTensor element non-zero would violate its symmetry.
Setting IQTensor element non-zero would violate its symmetry."
include "itensor/all.h"
using namespace itensor;
int main()
{
auto sites = SpinOne(4);
ITensor op = sites.op("Sx2",2);
PrintData(op);
return 0;
}
I tried to modify the "opname" of "Sx2" and the content of "Sx2" in the spinone.h file, but still got the same error message. Unlike the case when I modify the the "opname" or content of "Sz", I got what I modified.
Other operators have the same problem: Sy2, XUp, XZ0, XDn.