Skip to main content

ComplexMPO

Matrix Product Operator (MPO) of Complex 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) -> ComplexMPO

Generate a random Matrix Product Operator (MPO) with Complex 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.

Returns

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

make_random_mpo(integer length, integer physical_size, integer bond_size, as_complex as_complex) -> ComplexMPO

Generate a random Matrix Product Operator (MPO) with Complex 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_complex:

Returns

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

Constructors

ComplexMPO(const ComplexMPO other) -> ComplexMPO

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

Parameters

  • other: The MPO to copy.

ComplexMPO(integer length) -> ComplexMPO

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

Parameters

  • length: Number of sites in the MPO chain.

Symbols

NameDescription
*Compute the exact product of two MPOs (operators). Composes two quantum operators represented as Matrix Product Operators, Both MPOs must have the same number of sites and physical dimension. The resulting MPO represents A^B^\hat{A} \hat{B}, the composition of the two operators, with Complex values.
+Compute the sum of two Matrix Product Operators (quantum operators) with Complex values.
=Assignment operator for Matrix Product Operator (MPO) of Complex values.
[]Access a specific site tensor in the 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 with Complex values.
get_siteGet a copy of the site tensor at the specified index.
matrixConvert an MPO to a full matrix representation.
max_bondGet the maximum bond dimension across all bonds in the MPO chain.
open_boundarySet the MPO to open boundary conditions.
periodic_boundarySet the MPO to periodic (closed) boundary conditions.
set_boundary_likeCopy the boundary conditions from another MPO or MPS.
set_siteSet the site tensor at the specified index.
sizeGet the number of sites in the MPO.