-
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 bad indentation on quantumcircuit.py #11744
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
ParameterVectorElement(x[2]), ParameterVectorElement(x[3]), | ||
..., ParameterVectorElement(x[11]) | ||
]) | ||
>>> from qiskit.circuit import QuantumCircuit, Parameter, ParameterVector |
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.
Do we need the >>>
here? It always seemed unnecessary to put that in there and it gets in the way of copy and paste.
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.
I think in this case is useful to differentiate the instructions from the final output (shows the value of circuit.parameters
as you would show it on jupyter-notebook rather than printing it like in the other code-block).
The good thing here is that you can't select the >>>
part, so it shouldn't get in the way of copy and paste :)
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.
I'm fine with leaving this like this as this is just fixing a clear spacing issue. I still think we might want to revisit >>>
usage in the future more broadly, but there isn't any reason to block this over that as it's a good fix.
Pull Request Test Coverage Report for Build 7830597825
💛 - Coveralls |
Eric: Matt did this first review on this and had a question, so it'd be a bit bad form for me or Elena to follow-up without giving Matt a chance to see the response. |
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.
LGTM, thanks for fixing this.
ParameterVectorElement(x[2]), ParameterVectorElement(x[3]), | ||
..., ParameterVectorElement(x[11]) | ||
]) | ||
>>> from qiskit.circuit import QuantumCircuit, Parameter, ParameterVector |
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.
I'm fine with leaving this like this as this is just fixing a clear spacing issue. I still think we might want to revisit >>>
usage in the future more broadly, but there isn't any reason to block this over that as it's a good fix.
Co-authored-by: Eric Arellano <[email protected]> (cherry picked from commit 1dd9a57)
Co-authored-by: Eric Arellano <[email protected]> (cherry picked from commit 1dd9a57) Co-authored-by: Arnau Casau <[email protected]>
Summary
This PR fixes a bad indentation of two code blocks that was causing the page to not render correctly those snippets.
Screenshots before this PR
First code block:
Second code block:
Screenshots applying the change
First code block:
Second code block: