Skip to main content

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

NameDescription
+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

NameDescription
adjust_orthogonality_centerUpdate 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.
compressCompress 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.
dotCompute the inner product (overlap, dot product) between this MPS and another MPS.
get_orthogonality_centerGet the position of the orthogonality center in the MPS chain.
get_siteGet a copy of the site tensor at the specified index.
is_canonicalCheck if the MPS is in canonical form (has a valid orthogonality center).
matrix_elementCompute the matrix element braO^ket\langle \text{bra} \| \hat{O} \| \text{ket} \rangle of a quantum operator between two MPS states with Real values.
max_bondGet the maximum bond dimension across all bonds in the MPS chain.
normalizeSet the 2-norm of the MPS to one. Modifies the MPS in place.
normalizedReturn a normalized copy of the MPS with 2-norm equal to one.
open_boundarySet the MPS to open boundary conditions.
periodic_boundarySet the MPS to periodic (closed) boundary conditions.
set_boundary_likeCopy the boundary conditions from another MPS or MPO.
set_orthogonality_centerSet 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_siteSet the site tensor at the specified index.
sizeGet the number of sites in the MPS chain.
unset_orthogonality_centerRemove the orthogonality center, marking the MPS as non-canonical. :::tip The MPS content is not modified by this method.:::