-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix code examples #13178
Fix code examples #13178
Conversation
One or more of the following people are relevant to this code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this Frank. Longer term, I think we'll want to consider when it's appropriate to show imports to users - repeating the same imports several times in quick succession over the course of a run of examples probably feels like it could get noisy quickly.
Similarly, things like import numpy as np
and from qiskit.circuit import QuantumCircuit
probably happen enough that if they're the only imports, or if the only import is the class/function in question (whose documentation should already clearly imply how to import it), maybe it's best not to include the noise?
Anyway, that's for the future - doesn't need thinking about right now, particularly.
Pull Request Test Coverage Report for Build 10922719194Details
💛 - Coveralls |
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @frankharkins , all of the primitive blocks look correct to me
The pulse changes look okay to me, but keep in mind that pulse is being moved out of this repo (#13164). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Frank
* Fix code examples * Incorporate feedback Co-authored-by: Jake Lishman <jake.lishman@ibm.com> --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com> (cherry picked from commit cc1f30f)
Summary
Minor fixes to code examples in docstrings to make sure they run without error. Mostly adding imports and defining variables. Some syntax errors too.
These were identified as part of Qiskit/documentation#1893.