|
| | FiniteMps (std::vector< site_type > sites) |
| | Construct a nonempty chain and validate every shared bond.
|
| |
| void | replace_pair (std::size_t first_index, site_type first, site_type second) |
| | Replace adjacent sites while permitting their shared bond to change.
|
| |
| void | replace_site (std::size_t index, site_type replacement) |
| | Replace one site without changing any of its spaces.
|
| |
| auto | revision (std::size_t index) const -> std::size_t |
| | Return the revision of one site.
|
| |
| auto | site (std::size_t index) const -> site_type const & |
| | Return one read-only site.
|
| |
| auto | sites () const noexcept -> std::span< site_type const > |
| | Return all sites in left-to-right order.
|
| |
| auto | size () const noexcept -> std::size_t |
| | Return the number of sites.
|
| |
| auto | symmetry () const -> Symmetry |
| | Return the common symmetry context.
|
| |
template<typename Scalar, Space Bond, Space Physical, BlockTensorStorage Storage = SeparateSparseBlockStorage<>>
class uni20::tensor_network::FiniteMps< Scalar, Bond, Physical, Storage >
Homogeneous finite MPS owner with exact bond connectivity.
Sites are exposed read-only. Numerical or structural changes must use the replacement members so dependent environment caches can detect the changed sites through their revisions.
- Template Parameters
-
| Scalar | Numerical site element type. |
| Bond | Concrete left and right bond-space type. |
| Physical | Concrete physical-space type. |
| Storage | Block storage policy used by every site. |
template<typename Scalar , Space Bond, Space Physical, BlockTensorStorage Storage = SeparateSparseBlockStorage<>>
Replace adjacent sites while permitting their shared bond to change.
The pair's external bonds and physical spaces remain exactly equal to the current pair. The two replacement sites must share one exactly equal internal bond.
- Parameters
-
| first_index | Index of the left site in the pair. |
| first | New left site. |
| second | New right site. |
- Exceptions
-
| std::invalid_argument | If symmetry, external spaces, physical spaces, or the new internal connection are incompatible. |
| std::out_of_range | If there is no adjacent pair at first_index. |