seemps.analysis.polynomials.mps_from_polynomial#

seemps.analysis.polynomials.mps_from_polynomial(p, domain, first=False, strategy=<seemps.state.core.Strategy object>)[source]#

Construct a tensor representation of a polynomial.

This function creates the MPS representation of a polynomial p, whose variable runs over the given domain.

Parameters:
pnumpy.polynomial.polynomial.Polynomial | numpy.ndarray

Coefficients of the polynomial, or Numpy object encoding it.

domainInterval

Interval of definition for the monomial variable.

firstbool, default = False

Where to contract the coefficients (beginning or end).

strategyStrategy, default = DEFAULT_STRATEGY

Simplification strategy of the MPS, if desired.

Returns:
pMPS

MPS encoding of the polynomial function