Skip to main content

RealMPO

Matrix Product Operator (MPO) of Real values. Compressed representation of large-dimensional tensors, well suited to the representation of quantum operators for 1D many-body physics problems.

Factories

make_random_mpo(integer length, integer physical_size, integer bond_size, as_real as_real) -> RealMPO

Generate a random Matrix Product Operator (MPO) with Real values.

Parameters

  • length: Number of sites in the MPO chain.
  • physical_size: Dimension of the physical (input/output) indices at each site.
  • bond_size: Maximum bond dimension between adjacent sites.
  • as_real:

Returns

A random RealMPO with the specified dimensions. Each site tensor has shape [bond_size, physical_size, physical_size, bond_size].

Constructors

RealMPO(const RealMPO other) -> RealMPO

Copy constructor for Matrix Product Operator (MPO) of Real values.

Parameters

  • other: The MPO to copy.

RealMPO(integer length) -> RealMPO

Matrix Product Operator (MPO) of Real values with the specified number of sites.

Parameters

  • length: Number of sites in the MPO chain.

Symbols

NameDescription
*Scalar multiplication of an Matrix Product Operator (MPO) with Real values.
*=In-place product of two Matrix Product Operators (quantum operators) with Real values. Composes two quantum operators represented as Matrix Product Operators.
+Compute the sum of two Matrix Product Operators (quantum operators) with Real values.
+=In-place addition of two Matrix Product Operators (MPO) with Real values.
-Compute the difference of two Matrix Product Operators (MPO) with Real values.
-=In-place subtraction of two Matrix Product Operators (MPO) with Real values.
/Scalar division of an Matrix Product Operator (MPO) with Real values.
/=In-place scalar division of an Matrix Product Operator (MPO) with Real values.
=Assignment operator for Matrix Product Operator (MPO) of Real values.
[]Access a specific site tensor in the Matrix Product Operator (MPO) chain by index. Supports negative indexing (e.g., -1 for the last site).

Members

NameDescription
expvalCompute the expectation value ψO^ψ\langle \psi \| \hat{O} \| \psi \rangle of a quantum operator in state ψ\|\psi\rangle in a Matrix Product State (MPS) encoded state.
get_siteGet a copy of the site tensor in the Matrix Product Operator (MPO) at the specified index.
matrixConvert an Matrix Product Operator (MPO) to a full matrix representation.
max_bondGet the maximum bond dimension across all bonds in the MPO chain.
open_boundarySet the Matrix Product Operator (MPO) to open boundary conditions.
periodic_boundarySet the Matrix Product Operator (MPO) to periodic (closed) boundary conditions.
set_boundary_likeCopy the boundary conditions from another Matrix Product Operator (MPO) or Matrix Product State (MPS).
set_siteSet the site tensor at the specified index in the Matrix Product Operator (MPO).
sizeGet the number of sites in the MPO.