[x] I checked to make sure that this bug has not already been reported
Issue Description
The pull request on the first part of the Clifford Data Regression methods, #601 has had a test of the docs failing apparently due to a docstring in which the actual code run of the example does not match the expected outcome. However, the docstring does not seem present in the Mitiq codebase, but would seem to be picked up by some backtracking of imported python / numpy functions.
Moreover, the API-doc showed in the docstring a part that would seem to belong to the imported function.
The docstring being picked up by Sphinx in the API-doc was due to the code in #601 by @L-P-B before the changes in the code base at this commit by @maikthomas.
The inclusion of the docstring could be reproduced by running make docs locally before the commit above, which builds the documentation with sphinx. Here is a screenshot of the API-doc:
Pre-Report Checklist
Issue Description
The pull request on the first part of the Clifford Data Regression methods, #601 has had a test of the docs failing apparently due to a docstring in which the actual code run of the example does not match the expected outcome. However, the docstring does not seem present in the Mitiq codebase, but would seem to be picked up by some backtracking of imported python / numpy functions.
Moreover, the API-doc showed in the docstring a part that would seem to belong to the imported function.
How to Reproduce
The CI error is shown in https://github.com/unitaryfund/mitiq/pull/601/checks?check_run_id=2254832392.
The docstring being picked up by Sphinx in the API-doc was due to the code in #601 by @L-P-B before the changes in the code base at this commit by @maikthomas.
The inclusion of the docstring could be reproduced by running
make docs
locally before the commit above, which builds the documentation with sphinx. Here is a screenshot of the API-doc: