# Ferromagnetic state of spin-1 chain

**URL:** <https://itensor.discourse.group/t/ferromagnetic-state-of-spin-1-chain/660>\
**Category:** ITensor Julia Questions\
**Created:** [February 23, 2023, 10:13am UTC](https://itensor.discourse.group/t/ferromagnetic-state-of-spin-1-chain/660 "2023-02-23T10:13:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamid](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/hamid/32/236_2.png) [@hamid](https://itensor.discourse.group/u/hamid)\
**Post date:** [February 23, 2023, 10:13am UTC](https://itensor.discourse.group/t/ferromagnetic-state-of-spin-1-chain/660/1 "2023-02-23T10:13:15Z")

</div>

Hi,

I would like to investigate the time evolution of the ferromagnetic state of a spin-1 chain as an initial state ‘|Psi0\>’ in which all spins are down(up). In the Hamiltonian, I would consider external magnetic fields in the x and z directions applying just on the first spin. How can I reproduce the ferromagnetic state ‘|Psi0\>’ as initial state?

---

<div class="post-metadata">

**Author:** ![miles](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/miles/32/6_2.png) [@miles](https://itensor.discourse.group/u/miles)\
**Post date:** [February 23, 2023, 3:25pm UTC](https://itensor.discourse.group/t/ferromagnetic-state-of-spin-1-chain/660/2 "2023-02-23T15:25:45Z")

</div>

To prepare a product state, you can use the `MPS` function like this:

```julia
s = siteinds("S=1",N)
psi0 = MPS(s,"Dn")

```

If you want all the spins to be up instead, you can use `psi0 = MPS(s,"Up")`. To make a non-uniform pattern, you can pass an array of the strings “Up”, “Dn”, or “Z0” (for “S=1” type sites).

Here are some relevant parts of the documentation:

1. information on available state names (like “Up”, “Z0”, “Dn”) for different site types:  
[https://itensor.github.io/ITensors.jl/dev/IncludedSiteTypes.html](https://itensor.github.io/ITensors.jl/dev/IncludedSiteTypes.html)
2. documentation on MPS constructors:  
[https://itensor.github.io/ITensors.jl/dev/MPSandMPO.html#ITensors.MPS-Tuple{Vector{\<:Index},%20Any}](https://itensor.github.io/ITensors.jl/dev/MPSandMPO.html#ITensors.MPS-Tuple%7BVector%7B%3C:Index%7D,%20Any%7D)
