One way is to set all qubits in this form (left half of the chain spin up, right half with spin down):
SpinHalf sites = SpinHalf(N);
auto init = InitState(sites);
for(auto n : range1(N)) {
if (n <= N/2) {
init.set(n, "Up");
} else {
init.set(n, "Dn");
}
}
auto psi = MPS(init);
and then applying the Hadamard gate in all the qubits:
for(int n = 1; n <= N; ++n)
{
auto ind = sites(n);
auto indP = prime(sites(n));
auto Had = ITensor(ind,indP);
Had.set(ind(1),indP(1), ISqrt2);
Had.set(ind(1),indP(2), ISqrt2);
Had.set(ind(2),indP(1), ISqrt2);
Had.set(ind(2),indP(2), -ISqrt2);
psi.setA(n,psi.A(n)*Had);
}
psi.mapprime(1,0,Site);
You should get the desired product state.