-
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.
Fail safe in the QASM 3 exporter (#7336)
There were previously parts of the QASM 3 exporter where it attempted to do its best guess at what should happen, even when this always produced entirely incorrect results. These were subroutine definitions with parameters, opaque gates (`defcal`) and non-included gates with parameters. We now choose to fail loudly with a message that we do not currently support certain features, rather than outputting a meaningless programme. For the parameterised gates, we now force the exporter to output a separate definition for every instance of a gate if it cannot be sure that it has the most general form to start with. The code it outputs looks silly (the gates take parameters, but do not use them in their definitions, and each gate may be defined many times), but the semantics of the programme will actually be correct. See gh-7335 for the parameterisation problem. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b68b712
commit c95ec37
Showing
3 changed files
with
377 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
issues: | ||
- | | ||
The OpenQASM 3 export capabilities are in a beta state, and some features of | ||
Terra's :obj:`.QuantumCircuit` are not yet supported. In particular, you | ||
may see errors if you try to export custom subroutines with classical | ||
parameters, and there is no provision yet for exporting pulse-calibrated | ||
operations into OpenPulse. |
Oops, something went wrong.