Hi Miles,
I'm trying to use the diagHermitian function. As a test I ran the following code:
auto sx = sites.op("Sx",1);
auto sz = sites.op("Sz",1);
IQTensor U,D,U3,D3;
diagHermitian(sx,U,D);
PrintData(D);
diagHermitian(sz,U3,D3);
PrintData(D3);
While the result of sz is +/- 0.5, as expected, for sx I get +/+ 0.5. I also use PrintData to obtain the matrix element, see below. Apparently something is wrong here. I think this may have something to do with the QN system I define. What do you think about this? Thanks!
Best,
Chengshu
sx =
/--------------IQTensor--------------
r=2 div=QN({1,2}) log(scale)=0
IQIndex(S=1/2 1,2,Site|506)
(Up 1,1,Site|592) QN({1,2})
(Dn 1,1,Site|655) QN({0,2})
IQIndex(S=1/2 1,2,Site|506)'
(Up 1,1,Site|592)' QN({1,2})
(Dn 1,1,Site|655)' QN({0,2})
|-- Data -------
QDense Real {2 blocks; data size 2}
(Dn 1,1,Site|655) (Up 1,1,Site|592)'
(2,1) 0.5000000
(Up 1,1,Site|592) (Dn 1,1,Site|655)'
(1,2) 0.5000000
------------------------------------
D =
/--------------IQTensor--------------
r=2 div=QN({0,2}) log(scale)=0
IQIndex(d,2,Link|822)'
(d0,1,Link|852)' QN({0,2})
(d1,1,Link|832)' QN({1,2})
IQIndex(d,2,Link|822)
(d0,1,Link|852) QN({0,2})
(d1,1,Link|832) QN({1,2})
|-- Data -------
QDiagReal
(d0,1,Link|852)'QN({0,2}), (d0,1,Link|852)QN({0,2})
(1,1) 0.5000000
(d1,1,Link|832)'QN({1,2}), (d1,1,Link|832)QN({1,2})
(2,2) 0.5000000
------------------------------------