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:
- p
numpy.polynomial.polynomial.Polynomial
|numpy.ndarray
Coefficients of the polynomial, or Numpy object encoding it.
- domain
Interval
Interval of definition for the monomial variable.
- firstbool,
default
=False
Where to contract the coefficients (beginning or end).
- strategy
Strategy
,default
=DEFAULT_STRATEGY
Simplification strategy of the MPS, if desired.
- p
- Returns:
- p
MPS
MPS encoding of the polynomial function
- p