Build a six-site MPS with bond dimension 4 and physical dimension 2, then rescale it to unit norm. The result is a new TensorNetwork object with the same tensor shapes:
In[1]:=
mps=BlockRandomSeedRandom[42];
RandomTensorNetwork
["MPS"[6,4,2]]
In[2]:=
MPSNormalize
[mps]
Out[2]=
TensorNetwork
Tensors:6
Binary:Yes
Freeindices:6
Sparse:No
Outputdimension:64
Rescale a smaller three-site MPS in the same way:
In[3]:=
mpsSmall=BlockRandomSeedRandom[7];
RandomTensorNetwork
["MPS"[3,2,2]]
In[4]:=
MPSNormalize
[mpsSmall]
Out[4]=
TensorNetwork
Tensors:3
Binary:Yes
Freeindices:3
Sparse:No
Outputdimension:8
The output is an MPS regardless of the bond and physical dimensions of the input. Take an MPS with bond dimension 6 and physical dimension 3: