How to use MPS.from_Bflat
Posted: 12 May 2024, 08:20
This question concerns with the correct usage of the option [tenpy] MPS.from_Bflat[/tenpy]
I am trying to create the AKLT MPS form from given tensors for the AKLT state, check section "Matrix product state representation" of https://en.wikipedia.org/wiki/AKLT_model
The shape of tensor on each site is (3,2,2), where physical dimension is 3 and the bond dimension is 2. The following code shows the implementation:
Here the model is a CouplingMPOModel, and the is the (3,2,2) shape tensor.
However, I get the error:
What could be the issue? Also, note that the AKLT state I want to prepare in this way is translation-invariant, so in the MPS description it has periodic boundary conditions.
Thanks in advance!
I am trying to create the AKLT MPS form from given tensors for the AKLT state, check section "Matrix product state representation" of https://en.wikipedia.org/wiki/AKLT_model
The shape of tensor on each site is (3,2,2), where physical dimension is 3 and the bond dimension is 2. The following code shows the implementation:
Python: Select all
tensor = aklt_tensors()
nsites = len(model.lat.mps_sites())
Bs = [tensor.copy() for i in range(nsites)]
print(f"nsites = {nsites}")
final_mps = MPS.from_Bflat(model.lat.mps_sites(),Bs,bc=model.lat.bc_MPS)
Python: Select all
aklt_tensors()
However, I get the error:
Python: Select all
shape of B incompatible with len of singular values
Thanks in advance!