iMPS¶
Infinite matrix product state: a unit cell of N site tensors that tiles the chain.
iMPS
¶
Bases: iNetwork
Infinite matrix product state.
Each site tensor has axes (left_bond, right_bond, physical) where the
physical axis at site i carries itag s{i:02d}. The right bond of the
last site is the left bond of the first, so the state describes an
infinite chain built by repeating the unit cell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tensors
|
List[Tensor]
|
Unit cell site tensors, each with exactly 3 axes
|
required |
center
|
Optional[int]
|
Orthogonality center site index, or |
None
|
itag_prefix
|
Optional[str]
|
Bond itag prefix string. Defaults to |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If any tensor has the wrong number of axes, an incorrect physical itag, or the unit cell does not tile consistently. |
Methods:¶
canonical
¶
Fix the gauge of the unit cell, in place.
Leaves every stored tensor right-orthonormal (AR) and attaches one
diagonal bond matrix C to each of the N bonds, with
AL[i] C[i+1] = C[i] AR[i]. The state is normalized on the way: the
transfer operator of the stored tensors has dominant eigenvalue 1
and each bond matrix has unit norm, so the Schmidt weights on every
bond sum to one.
The cell has no open end to start from, so one sweep is not enough: the gauge is found by iterating sweeps until the triangular factor carried into the next copy reproduces itself, after which both forms are rotated into the Schmidt basis. No truncation happens here, as the sweeps use QR, which keeps every bond exactly as wide as it was.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
int
|
Site to record as the orthogonality center. Bond matrices are
computed on every bond regardless, so this only chooses which
site |
0
|
tol
|
float
|
Convergence threshold on the change in the gauge matrix between successive sweeps. |
1e-12
|
maxiter
|
int
|
Sweep budget for each of the two directions. |
200
|
Raises:
| Type | Description |
|---|---|
IndexError
|
If |
ValueError
|
If either gauge iteration fails to converge, or if the two converged gauges disagree across the cell. |
set_canonical
¶
set_canonical(
left_isos: List[Tensor],
right_isos: List[Tensor],
bond_matrices: List[Tensor],
target: int = 0,
) -> Tuple[List[Tensor], List[Tensor]]
Install a canonical form computed elsewhere, in place.
The counterpart of canonical for callers that already know the
answer. A variational update on the uniform manifold produces AL,
AR and C directly, and re-deriving them with the gauge iteration
would be both wasteful and fragile: the iteration assumes a single
dominant transfer-operator eigenvalue, which a state in mid-update
need not have.
The three sets are not required to satisfy AL[i] C[i+1] = C[i]
AR[i]. Away from a variational fixed point they do not, and the
size of the mismatch is exactly the convergence measure such an
update reports. They are rotated into the Schmidt basis on the way
in, so the stored bond matrices are diagonal as they are after
canonical, and the rotations that did it are returned. A caller
holding anything written in the bases it passed in — the two
boundary blocks a VUMPS pass ends with, say — needs them to say
the same thing about the tensors now stored here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
left_isos
|
List[Tensor]
|
Left-orthonormal tensors, one per site. |
required |
right_isos
|
List[Tensor]
|
Right-orthonormal tensors, one per site. These become the stored site tensors. |
required |
bond_matrices
|
List[Tensor]
|
Bond matrices, one per bond, in the |
required |
target
|
int
|
Site to record as the orthogonality center. Negative values count from the end. |
0
|
Returns:
| Type | Description |
|---|---|
tuple
|
|
Raises:
| Type | Description |
|---|---|
IndexError
|
If |
ValueError
|
If any of the three lists has the wrong length, or if the resulting unit cell does not tile consistently. |
bond_matrix
¶
Return the bond matrix C on bond, taken modulo N.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bond
|
int
|
Bond position. Bond |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Diagonal 2-index tensor holding the Schmidt values, with its
left axis in the |
right_isometries
¶
Return the right-orthonormal tensors AR, one per site.
These are the stored tensors, so this is a convenience alias that says which canonical form they are in.
left_isometries
¶
Return the left-orthonormal tensors AL, one per site.
These come from the left gauge iteration and pair with the stored
bond matrices as AL[i] C[i+1] = C[i] AR[i]. Their bonds carry the
same itags as AR, but the two sets of bases are different.
center_tensor
¶
Return the center tensor AC[site] = C[site] AR[site].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site
|
Optional[int]
|
Site index, taken modulo |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
3-index tensor with the usual |
schmidt_values
¶
Return the Schmidt values on bond, largest first.
These are the diagonal of the bond matrix, so they are normalized
to sum(s**2) == 1. For a generic symmetry group they
are multiplet-resolved: a value in a spin-j sector stands for
2j+1 degenerate Schmidt states.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bond
|
int
|
Bond position, taken modulo |
required |
Returns:
| Type | Description |
|---|---|
List[float]
|
Singular values in descending order. |
to
¶
Move the unit cell and its gauge, in place.
Extends iNetwork.to so that a gauge-fixed state keeps AL and the
bond matrices on the same device as the tensors they multiply.
Notes¶
The cell is cyclic, so bond N is bond 0. That single fact separates an iMPS from an MPS of the same length: there is no first bond and no last bond, nothing is open, and the bond charges have to return to themselves after one cell. A cell therefore carries no net physical charge, which is half filling for fermions and zero magnetization for spins. init_imps enforces that when it builds one.
Gauge fixing replaces canonicalization. canonical(0) solves for the gauge that makes the cell left- and right-orthogonal simultaneously, by finding the fixed point of the transfer operator instead of sweeping orthogonality in from an end. It raises when no such gauge exists, which a random cell can land on: the transfer operator then has two dominant eigenvalues of opposite sign and the cell maps two classes of bond charge into each other, not onto themselves.