-
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
Use built-in IPython code highlighting in formatted OQ2 output #9945
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:
|
Pull Request Test Coverage Report for Build 5574953194
💛 - Coveralls |
db3cd33
to
a45e736
Compare
Can we remove the on hold with this since #9944 has merged? (I assume it needs the rebase because it did merge) |
We currently have an option to `QuantumCircuit.qasm` that produces rich formatted output. This involves a lot of manual handling, while modern IPython has the `IPython.display.Code` object for representing things. This commit switches over to preferentially using this, if the user has a Pygments lexer capable of handling the `qasm2` alias available. This is part of an effort to fully deprecate the `qiskit.qasm` package (in favour of `qiskit.qasm2`, where appropriate), and to trim down extra components where there are supported alternatives.
a45e736
to
4d4877d
Compare
Now rebased over |
I think I'm going to close this - we can probably just keep the current form kicking until we fully remove the |
Summary
We currently have an option to
QuantumCircuit.qasm
that produces rich formatted output for IPython/Jupyter contexts. This involves a lot of manual handling, while modern IPython has theIPython.display.Code
object for representing things. This commit switches over to preferentially using this, if the user has a Pygments lexer capable of handling theqasm2
alias available.This is part of an effort to fully deprecate the
qiskit.qasm
package (in favour ofqiskit.qasm2
, where appropriate), and to trim down extra components where there are supported alternatives.Details and comments
Depends on #9944.