-
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
Deprecate legacy qasm2 parser for 0.46 #11347
Deprecate legacy qasm2 parser for 0.46 #11347
Conversation
The legacy qasm2 parser was remvoed on the main branch already in Qiskit#11308 for the 1.0.0 release. To ensure that users of the 0.x release series are warned of this API change this commit marks the functionality removed in Qiskit#11308 as deprecated for the 0.46.0 release.
legacy parser is removed. If you were previously using this, you can | ||
instead parse your OpenQASM 2 files into a :class:`.QuantumCircuit` using | ||
the :meth:`.QuantumCircuit.from_qasm_file` or | ||
:meth:`.QuantumCircuit.from_qasm_str` constructor methods and then |
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 may have forgotten about this in the other PR, but weren't we planning to get rid of these and require use of qasm2.loads
as well?
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.
We kept them in the other PR. At least for me the circuit constructor class methods still have value just in that I don't need to remember all the extra arguments to the parser to get it to behave like the legacy parser did (which is the only mode I ever really use for parsing qasm2).
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.
That's fair. I think we ought to remove those methods once we've implemented #10737 and made qasm2.dumps
match it, at which point qasm2.loads
will load the output of qasm2.dumps
without any additional modifications. The arguments in favour of removing QuantumCircuit.qasm
also imo hold for from_qasm_str
, it's just the usability concern that you're correctly pointing out in the way, I think.
Summary
The legacy qasm2 parser was remvoed on the main branch already in #11308 for the 1.0.0 release. To ensure that users of the 0.x release series are warned of this API change this commit marks the functionality removed in #11308 as deprecated for the 0.46.0 release.
Details and comments