# How to calculate string operator in ITensor2?

+1 vote

Hi ITensor team,
Thanks for your wonderful software ! I want to calculate Haldane string operator correlation function, so I want to define string operator, for example <\prod{n<I}exp(I\pi S{n}^{z})S^{z}_{I}>.if I have string operator, then I can calculate correlation function as spin correlation function. But I don't know how to exponential operator Sz(maybe MPO). my naive partial code as follow:

auto phi1=expHermitian(sites.op("Sz",1),PICplx_i);
auto phi2=expHermitian(sites.op("Sz",1),PI
Cplx_i);

for(int n = 2; n < N/4; ++n)
{
phi1 =expHermitian(sites.op("Sz",n),PICplx_i);
print(phi1);
}
auto Ss1 = phi1*sites.op("Sz",N/4);

for(int n = 2; n < 3N/4; ++n)
{
phi2 *=expHermitian(sites.op("Sz",n),PI
Cplx_i);
}
auto Ss2 = phi2*sites.op("Sz",3*N/4);

Ss1 and Ss2 is string operator at N/4 and 3*N/4. BUT this code does't work. Please help me to check. Thank you !

commented by (650 points)
I got the same question here.
For spin-1/2 sites, the
exp(i sigma_z pi/2) = cos(pi/2) + i sigma_x sin(pi/2) = i sigma_x which is just a single operator.
However, for the string operator in spin-1 haldane chain,  anyone can help?