# qml.transforms.richardson_extrapolate¶

richardson_extrapolate(x, y)[source]

Polynomial fit where the degree of the polynomial is fixed to being equal to the length of x.

In a nutshell, this function is calling poly_extrapolate() with order = len(x)-1. This function is compatible with all interfaces supported by pennylane.

Parameters
• x (Array) – Data in x

• y (Array) – Data in y = f(x)

Returns

Extrapolated value at f(0).

Return type

float

Example:

>>> x = np.linspace(1, 10, 5)
>>> y = x**2 + x + 1 + 0.3 * np.random.rand(len(x))
>>> qml.transforms.richardson_extrapolate(x, y)