Hi Miles,
I want to calculate the Sx^2 for a spin 2 system and the operator is defined in the header file spintwo.h. For the simple code shown below, the compile was successful but when I ran the code, I got the 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.
Aborted (core dumped)"
include "itensor/all.h"
include ".../itensor/itensor/mps/sites/spintwo.h"
using namespace itensor;
int main()
{
auto sites = SpinTwo(4);
ITensor op = sites.op("Sx2",2);
PrintData(op);
return 0;
}
I got the same error message for operators Sy^2 and S^2 but the code worked perfectly for Sz^2. Could you please help me resolve this issue?
P.S. A year ago, an ITensor user named alesa ran into a similar problem for spin 1 system and you mentioned that there was a bug associated with spin 1 siteset which you later fixed: http://itensor.org/support/678/get-error-message-for-using-sx2