RealMPS
Matrix Product State (MPS) of Real values. Compressed representation of a large-dimensional tensor, well suited for state vectors of some 1D many-body quantum mechanics problems.
Factories
make_random_mps(integer length, integer physical_size, integer bond_size, as_real as_real) -> RealMPS
Generate a random Matrix Product State (MPS) with Real values.
Parameters
- length: Number of sites in the MPS chain.
- physical_size: Dimension of the physical index at each site.
- bond_size: Maximum bond dimension between adjacent sites.
- as_real: The desired scalar type
Returns
A random RealMPS with the specified dimensions. Each site tensor has shape [bond_size, physical_size, bond_size].
Constructors
RealMPS(const RealMPS other) -> RealMPS
Copy constructor for Matrix Product State (MPS) of Real values.
Parameters
- other: MPS to copy.
RealMPS(integer length) -> RealMPS
Construct a Matrix Product State (MPS) of Real values with the specified number of sites.
Parameters
- length: Number of sites in the MPS chain.
Symbols
| Name | Description |
|---|---|
+ | Compute the sum of two Matrix Product States (quantum states) with Real values. |
= | Assignment operator for Matrix Product State (MPS) of Real values. |
[] | Access a specific site tensor in the MPS chain by index. Supports negative indexing. :::tip Use the setter set_site if you want to modify the MPS. ::: |
Members
| Name | Description |
|---|---|
| adjust_orthogonality_center | Update the orthogonality center position without modifying any tensors. Use this after manually transforming the MPS tensors in a way that changes the orthogonality center location. |
| compress | Compress the MPS by truncating the bond dimensions based on truncation options. Reduces the bond dimension according to the specified error measure and tolerance with Real values. |
| dot | Compute the inner product (overlap, dot product) between this MPS and another MPS. |
| get_orthogonality_center | Get the position of the orthogonality center in the MPS chain. |
| get_site | Get a copy of the site tensor at the specified index. |
| is_canonical | Check if the MPS is in canonical form (has a valid orthogonality center). |
| matrix_element | Compute the matrix element of a quantum operator between two MPS states with Real values. |
| max_bond | Get the maximum bond dimension across all bonds in the MPS chain. |
| normalize | Set the 2-norm of the MPS to one. Modifies the MPS in place. |
| normalized | Return a normalized copy of the MPS with 2-norm equal to one. |
| open_boundary | Set the MPS to open boundary conditions. |
| periodic_boundary | Set the MPS to periodic (closed) boundary conditions. |
| set_boundary_like | Copy the boundary conditions from another MPS or MPO. |
| set_orthogonality_center | Set the orthogonality center to a specific site. This brings the MPS into canonical form with all tensors to the left in left-canonical form and all tensors to the right in right-canonical form. |
| set_site | Set the site tensor at the specified index. |
| size | Get the number of sites in the MPS chain. |
| unset_orthogonality_center | Remove the orthogonality center, marking the MPS as non-canonical. :::tip The MPS content is not modified by this method.::: |