Function Loading#

The SeeMPS library provides several methods to load univariate and multivariate functions in MPS and MPO structures. In the following, the most important are listed.

Tensorized operations#

These methods are useful to construct MPS corresponding to domain discretizations, and compose them using tensor products and sums to construct multivariate domains.

RegularInterval(start, stop, size[, ...])

Equispaced discretization between start and stop with size points.

ChebyshevInterval(start, stop, size[, endpoints])

Irregular discretization between start and stop given by the zeros or extrema of a Chebyshev polynomial of order size or size-1 respectively.

mps_interval(interval[, strategy])

Returns an MPS corresponding to a specific type of interval.

mps_tensor_product(mps_list[, mps_order, ...])

Returns the tensor product of a list of MPS, with the sites arranged according to the specified MPS order.

mps_tensor_sum(mps_list[, mps_order, ...])

Returns the tensor sum of a list of MPS, with the sites arranged according to the specified MPS order.

Tensor cross-interpolation (TT-Cross)#

These methods are useful to compose MPS or MPO representations of black-box functions using tensor-train cross-interpolation (TT-Cross). See Tensor-train cross-interpolation (TT-Cross)

BlackBoxLoadMPS(func, domain[, base, mps_order])

Black-box representing a multivariate scalar function discretized on an Interval or Mesh object.

BlackBoxLoadTT(func, mesh)

Black-box representing a multivariate scalar function discretized on a Mesh object following the tensor-train structure.

BlackBoxLoadMPO(func, mesh[, base_mpo, ...])

Black-box representing a 2-dimensional function discretized on a 2D Mesh and quantized in a MPO with physical dimensions given by base_mpo.

BlackBoxComposeMPS(func, mps_list)

Black-box representing the composition of a multivariate scalar function with a collection of MPS objects.

cross_maxvol(black_box[, cross_strategy, ...])

Computes the MPS representation of a black-box function using the tensor cross-approximation (TCI) algorithm based on one-site optimizations using the rectangular maxvol decomposition.

cross_dmrg(black_box[, cross_strategy, ...])

Computes the MPS representation of a black-box function using the tensor cross-approximation (TCI) algorithm based on two-site optimizations in a DMRG-like manner.

cross_greedy(black_box[, cross_strategy, ...])

Computes the MPS representation of a black-box function using the tensor cross-approximation (TCI) algorithm based on two-site optimizations following greedy updates of the pivot matrices.

Chebyshev expansions#

These methods are useful to compose univariate function on generic initial MPS or MPO and compute MPS approximations of functions. See Chebyshev Approximation.

cheb2mps(coefficients[, initial_mps, ...])

Composes a function on an initial MPS by expanding it on the basis of Chebyshev polynomials.

cheb2mpo(coefficients, initial_mpo[, ...])

Composes a function on an initial MPO by expanding it on the basis of Chebyshev polynomials.

interpolation_coefficients(func[, order, ...])

Returns the coefficients for the Chebyshev interpolation of a function on a given set of nodes and on a specified interval.

projection_coefficients(func[, order, ...])

Returns the coefficients for the Chebyshev projection of a function using Chebyshev-Gauss integration.

estimate_order(func[, start, stop, domain, ...])

Returns an estimation of the number of Chebyshev coefficients required to achieve a given accuracy such that the last pair of coefficients fall below a given tolerance, as they theoretically bound the maximum error of the expansion.

Multiscale interpolative constructions#

These methods are useful to construct polynomial interpolants of univariate functions in MPS using the Lagrange interpolation framework. See Multiscale interpolative constructions.

lagrange_basic(func, order, sites[, start, ...])

Performs a basic Lagrange MPS Chebyshev interpolation of a function.

lagrange_rank_revealing(func, order, sites)

Performs a Lagrange rank-revealing MPS Chebyshev interpolation of a function.

lagrange_local_rank_revealing(func, order, ...)

Performs a local rank-revealing Lagrange MPS Chebyshev interpolation of a function.

Generic polynomial constructions#

These methods are useful to construct generic polynomials in the monomial basis from a collection of coefficients.

mps_from_polynomial(p, domain[, first, strategy])

Construct a tensor representation of a polynomial.