Hi, what is the best way to create a random initial product state of the form:

|psi*i> = cos(th*i)|Up> + sin(th_i) |Dn>

|PSI> = |psi*1> x ...x |psi*N>

I tried something like this:

```
auto psi = MPS(sites);
for(int i=1; i<=Nspins; i++){
double rndNum = (double) 2*M_PI*random()/RAND_MAX;
auto si = sites(i);
auto wf = ITensor(si);
wf.set(si(1), cos(rndNum));
wf.set(si(2), sin(rndNum));
psi.setA(i,wf);
}
```

But I feel like I need to account for the link indices some how? Am I doing this properly and/or is there a better way? Thanks.