ComplexMPS
Matrix Product State (MPS) of Complex 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) -> ComplexMPS
Generate a random Matrix Product State (MPS) with Complex 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.
Returns
A random ComplexMPS with the specified dimensions. Each site tensor has shape [bond_size, physical_size, bond_size].
make_random_mps(integer length, integer physical_size, integer bond_size, as_complex as_complex) -> ComplexMPS
Generate a random Matrix Product State (MPS) with Complex 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_complex: The desired scalar type
Returns
A random ComplexMPS with the specified dimensions. Each site tensor has shape [bond_size, physical_size, bond_size].
Constructors
ComplexMPS(const ComplexMPS other) -> ComplexMPS
Copy constructor for Matrix Product State (MPS) of Complex values.
Parameters
- other: MPS to copy.
ComplexMPS(integer length) -> ComplexMPS
Construct a Matrix Product State (MPS) of Complex values with the specified number of sites.
Parameters
- length: Number of sites in the MPS.
Symbols
| Name | Description |
|---|---|
* | Scalar multiplication of an Matrix Product State (MPS) with Complex values. |
*= | In-place scalar multiplication of an Matrix Product State (MPS) with Complex values. |
+ | Compute the sum of two Matrix Product States (MPS) with Complex values. |
+= | In-place addition of two Matrix Product States (MPS) with Complex values. |
- | Compute the difference of two Matrix Product States (MPS) with Complex values. |
-= | In-place subtraction of two Matrix Product States (MPS) with Complex values. |
/ | Scalar division of an Matrix Product State (MPS) with Complex values. |
/= | In-place scalar division of an Matrix Product State (MPS) with Complex values. |
= | Assignment operator for Matrix Product State (MPS) of Complex values. |
[] | Access a specific site tensor in the Matrix Product State (MPS) 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 Matrix Product State (MPS) tensors in a way that changes the orthogonality center location. |
| compress | Compress the Matrix Product State (MPS) by truncating the bond dimensions based on truncation options. Reduces the bond dimension according to the specified error measure and tolerance with Complex values. |
| dot | Compute the inner product (overlap, dot product) between this Matrix Product State (MPS) and another MPS. |
| get_orthogonality_center | Get the position of the orthogonality center in the Matrix Product State (MPS). |
| get_site | Get a copy of the site tensor at the specified index in the Matrix Product State (MPS). |
| get_truncation_max_bond | Get the maximum bond dimension configured for truncation on the Matrix Product State (MPS). |
| get_truncation_tol | Get the truncation tolerance configured on the Matrix Product State (MPS). |
| is_canonical | Check if the Matrix Product State (MPS) is in canonical form (has a valid orthogonality center). |
| matrix_element | Compute the matrix element of a quantum operator between two Matrix Product State (MPS) states with Complex values. |
| max_bond | Get the maximum bond dimension across all bonds in the MPS. |
| normalize | Set the 2-norm of the Matrix Product State (MPS) to one. Modifies the MPS in place. |
| normalized | Return a normalized copy of the Matrix Product State (MPS) with 2-norm equal to one. |
| open_boundary | Set the Matrix Product State (MPS) to open boundary conditions. |
| periodic_boundary | Set the Matrix Product State (MPS) to periodic (closed) boundary conditions. |
| set_boundary_like | Copy the boundary conditions from another Matrix Product State (MPS) or Matrix Product Operator (MPO). |
| set_orthogonality_center | Set the orthogonality center to a specific site. This brings the Matrix Product State (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 in the Matrix Product State (MPS). |
| set_truncation_max_bond | Set the maximum bond dimension kept by lossy SVD-based operations on the Matrix Product State (MPS). |
| set_truncation_tol | Set the truncation tolerance used by lossy SVD-based operations on the Matrix Product State (MPS). |
| size | Get the number of sites in the Matrix Product State (MPS). |
| unset_orthogonality_center | Remove the orthogonality center, marking the Matrix Product State (MPS) as non-canonical. :::tip The MPS content is not modified by this method.::: |