forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since Qiskitgh-9784 added a new `qiskit.qasm2` package and suitable exceptions for both import and export of OpenQASM 2 programs, this commit now unifies the exception handling through the rest of the library to use these exceptions. To avoid breaks in compatibility, the old `qiskit.qasm.QasmError` is now a re-export of `qiskit.qasm2.QASM2Error`. This is the base error of both the exporter and importers, despite the old documentation of `QasmError` claiming to be specifically for parser errors. In practice, the exporter also emitted `QasmError`, so having that be `QASM2Error` allows people catching that error to get the same behaviour in these new forms. The actual exporter and importer are updated to emit the precise subclasses.
- Loading branch information
1 parent
b06072d
commit b8d7469
Showing
4 changed files
with
21 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
:toctree: ../stubs/ | ||
Qasm | ||
QasmError | ||
Pygments | ||
|
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