-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of np.polyfit
#2322
Comments
Looked into what this entails. With the newer API, the covariance matrix option was removed in Tests will fail due to Line 179 in b58f029
So, we will have to work around numpy/numpy#20871 or keep using the older API. There are two open PRs to allow the covariance matrix option in |
It looks like the covariance matrix is used to calculate the error of the fit in Line 864 in 4c66456
If one passes full=True to np.polynomial.polynomial.polyfit , they can then get the residuals of the fit and perhaps calculate the error from there?
|
By defining a function for this in mitiq, right? |
We use
numpy.polyfit
to define the extrapolation methods for ZNE. The related API innumpy
has since changed to usingnumpy.polynomial
instead ofnumpy.polyfit
.mitiq/mitiq/zne/inference.py
Lines 155 to 158 in 9e1cbb5
The transition guide has a helpful table for adjusting to the newer changes.
https://numpy.org/doc/stable/reference/generated/numpy.polynomial.polynomial.polyfit.html
The text was updated successfully, but these errors were encountered: