forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pickling of conditioned custom gates from OpenQASM 2 import (Qisk…
…it#11175) (Qiskit#11258) The condition of a gate defined by a `gate` statement in an OpenQASM 2 program was not previously exported as part of its state during pickling, causing pickle roundtrips or deepcopies to lose the condition on the new copy. (cherry picked from commit 196221f) Co-authored-by: Jake Lishman <[email protected]>
- Loading branch information
1 parent
ff85be7
commit a40811e
Showing
3 changed files
with
36 additions
and
2 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
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/fix-qasm2-deepcopy-conditioned-gate-2fa75fee622c1fc0.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,6 @@ | ||
--- | ||
fixes: | ||
- | | ||
Conditioned custom gates imported from OpenQASM 2 will now correctly retain their conditions | ||
when pickled and deep-copied. Previously, any conditional custom gate (defined by a ``gate`` | ||
statement in an OpenQASM 2 file) would lose its condition when copied or pickled. |
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