MPS initialization

How can I initialize an MPS without having to execute SVD?

Let’s say I want to initialize the GHZ state
\ket{GHZ} = \ket{00 ... 0} + \ket{11... 1}

of which I already know the MPS representation, as showed on Matrix product state - Wikipedia, how do I initialize it directly with the MPS without executing SVD?

1 Like

To do that you would need to set the tensors individually, using a formula for the GHZ state as an MPS such as the one you linked to.

For example if you’ve initialized an MPS of length N like

s = siteinds("Qubit",N)
psi = MPS(s)

then you can set each tensor like:

psi[1] = ...
psi[2] = ...

Of course in the best code you would use a loop:

for j=1:N
  psi[j] = ...
end

Does that answer your question?

yes thank you

1 Like