MPS¶
Matrix product state.
MPS
¶
MPS(
tensors: List[Tensor],
bc: str = "OBC",
center: Optional[int] = None,
itag_prefix: Optional[str] = None,
)
Bases: Network
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}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tensors
|
List[Tensor]
|
List of site tensors, each with exactly 3 axes
|
required |
bc
|
str
|
Boundary condition: |
'OBC'
|
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 adjacent bond indices are inconsistent. |
String Representation¶
repr(mps) (and therefore the interactive display in notebooks and REPLs) renders
a text diagram of the chain:
Matrix Product State (MPS)
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
○───○───○───○─···─⊙─···─○───○───○───○
╵ ╵ ╵ ╵ ╵ ╵ ╵ ╵ ╵
length: 100 max bond: 64
center: 49 norm: 1.00e+00
Chain row — each node is one site; consecutive sites are joined by ───.
When the chain is too long to show in full, a gap ─···─ is inserted and only
a subset of sites near the edges and center is displayed.
Physical-index row — the downward stub ╵ beneath each node represents the
physical index of that site.
Node symbols:
| Symbol | Meaning |
|---|---|
○ |
Regular site |
⊙ |
Orthogonality center (center attribute) |
Info block — length is the number of sites L; max bond is the largest
bond dimension across all virtual indices; center is the orthogonality center
index (None if not set); norm is ‖ψ‖.