-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify OpenQASM 2 exceptions Since gh-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. * Add newly-imported gates to exclude The slight change in import order means that two new `Gate` class bodies got executed during the imports for this particular part of the test suite. These gates were internal to the `qasm2.load` functionality and should be exempt from the automated definition-equivalence testing.
- Loading branch information
1 parent
8e83521
commit 4409f68
Showing
5 changed files
with
13 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
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