seemps.analysis.polynomials.mps_from_polynomial#
- seemps.analysis.polynomials.mps_from_polynomial(p: Polynomial | ndarray, domain: RegularInterval, first: bool = False, strategy: Strategy = DEFAULT_STRATEGY) MPS[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