You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
the code location:
tensornetwork/matrixproductstates/infinite_mps.py
line 287 to 298
U, singvals, V, _ = self.backend.svd(
tmp,
pivot_axis=1,
max_singular_values=D,
max_truncation_error=truncation_threshold,
relative=True)
lam = self.backend.diagflat(singvals)
self.tensors[0] = ncon([lam, V, inv_sqrtr, self.tensors[0]],
[[-1, 1], [1, 2], [2, 3], [3, -2, -3]],
backend=self.backend.name)
# absorb connector * inv_sqrtl * U * lam into the right-most tensor
# Note that lam is absorbed here, which means that the state
# is in the parallel decomposition
# Note that we absorb connector_matrix here
self.tensors[-1] = ncon([self.get_tensor(len(self) - 1), inv_sqrtl, U, lam],
[[-1, -2, 1], [1, 2], [2, 3], [3, -3]],
backend=self.backend.name)
The lam is the singular value after SVD.
When it contracte into the first tensor (i.e. self.tensor[0]) and the last tensor (i.e. self.tensor[1]), it should be sqrt(lam) not lam to keep the whole MPS invariant. or as the commend said, only absorb connector to left or right tensor.
so the contraction between self.tensors[-1] and self.tensors[0] keep same
new self.tensors[-1] <-> new self.tensors[0] = self.get_tensor(len(self) - 1)<->inv_sqrtl <->U<->self.backend(lam)<->self.backend(lam)<->V<-> inv_sqrtr<->self.tensors[0]
I am now learning the canonical form of iMPS, in case I make mistake, I also check the invariant:
the code location:
tensornetwork/matrixproductstates/infinite_mps.py
line 287 to 298
The
lam
is the singular value after SVD.When it contracte into the first tensor (i.e.
self.tensor[0]
) and the last tensor (i.e.self.tensor[1]
), it should besqrt(lam)
notlam
to keep the whole MPS invariant. or as the commend said, only absorb connector to left or right tensor.so the right code is
so the contraction between
self.tensors[-1]
andself.tensors[0]
keep samenew
self.tensors[-1]
<-> newself.tensors[0]
=self.get_tensor(len(self) - 1)
<->inv_sqrtl
<->U
<->self.backend(lam)
<->self.backend(lam)
<->V
<->inv_sqrtr
<->self.tensors[0]
I am now learning the canonical form of iMPS, in case I make mistake, I also check the invariant:
However, if I double multiply S
The text was updated successfully, but these errors were encountered: