-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate legacy qasm2 parser for 0.46 (#11347)
* Deprecate legacy qasm2 parser for 0.46 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. * Update qiskit/converters/ast_to_dag.py --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
- Loading branch information
1 parent
6ff0b93
commit 273945c
Showing
13 changed files
with
198 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
releasenotes/notes/deprecate-qasm-legacy-d0b6025493da453a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
deprecations: | ||
- | | ||
The legacy OpenQASM 2 parser module previously present in :mod:`qiskit.qasm` has been | ||
deprecated. It will be removed in the Qiskit 1.0.0 release. The legacy | ||
OpenQASM 2 parser has been superseded by the :mod:`qiskit.qasm2` module | ||
which provides a faster more correct parser for OpenQASM 2. | ||
- | | ||
The ``qiskit.converters.ast_to_dag`` function has been deprecated and | ||
will be removed in the Qiskit 1.0.0 release. It previously was used to | ||
convert the abstract syntax tree generated by the legacy OpenQASM 2 parser | ||
(in the :mod:`qiskit.qasm` module which has been deprecated) and convert | ||
that directly to a :class:`.DAGCircuit`. As the legacy OpenQASM 2 parser | ||
has been deprecated this function will no longer serves a purpose after the | ||
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 | ||
converting that :class:`.QuantumCircuit` into a :class:`.DAGCircuit` | ||
with :func:`.circuit_to_dag`. | ||
- | | ||
The :meth:`.QuantumCircuit.qasm` method used to generate a OpenQASM 2 | ||
representation of the :class:`.QuantumCircuit` object has been deprecated | ||
and will be removed in the Qiskit 1.0.0 release. Instead the | ||
:func:`.qasm2.dump` or :func:`.qasm2.dumps` functions which provide similar | ||
functionality should be used. If you were using the :meth:`.QuantumCircuit.qasm` | ||
method to generate pygments formatted output you should instead look at the standalone | ||
``openqasm-pygments`` package to provide this functionality (as :func:`.qasm2.dump` | ||
and :func:`.qasm2.dumps` do not provide pygments colored output). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.