qrisp.gqsp.cheb2poly#

cheb2poly(cheb: ArrayLike) Array[source]#

Convert a polynomial from Chebyshev to monomial basis. JAX version of numpy.polynomial.chebyshev.cheb2poly.

Convert an array representing the coefficients of a Chebyshev series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the monomial basis) ordered from lowest to highest degree.

Parameters:
chebArrayLike

1-D array containing the Chebyshev series coefficients, ordered from lowest order term to highest.

Returns:
polyArray

1-D array containing the coefficients of the equivalent polynomial (relative to the monomial basis), ordered from lowest order term to highest.

Examples

>>> import jax.numpy as jnp
>>> from qrisp.gqsp import cheb2poly
>>> poly = jnp.array([0., 1., 2., 3.])
>>> poly = cheb2poly(cheb)
>>> poly
[-2., -8.,  4., 12.]