Hi, it's a good question as we have not documented this, and need to!
For now, a good way to learn how to define these kind of state definitions, such as "Up" and "Dn" for spin systems, is to look at how it is done in our source code, because the code you would need to write is the same. (Of course reading about it in the documentation will be even better once we document it!)
Here is a link to the spinone.jl file where we create the states using the function ITensors.state:
https://github.com/ITensor/ITensors.jl/blob/main/src/physics/site_types/spinone.jl
For the 3/2 example, you would do something like this:
ITensors.state(::StateName"Up", ::SiteType"S=1") = [1.0, 0.0, 0.0, 0.0]
So the key points are:
- you define a function named ITensors.state taking a StateName and SiteTyp
- it returns a vector which can be anything you want, and does not have to have only 1 and 0 entries
- once you define this function, you can immediately use your new states in the productMPS function and elsewhere
Hope that helps and please let us know if you run into any issues.
Miles