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 issue with ScheduleBlock qpy serialization and use_symengine (Qis…
…kit#11261) * Fix issue with ScheduleBlock qpy serialization and use_symengine This commit fixes an issue with the use_symengine flag on the qpy.dump() function. Previously in certain conditions a symengine expression that was listed in the qpy header as being encoded via symengine was incorrectly being serialized using sympy. This would cause a failure on deserialialization as the qpy payload was invalid and symengine could not parse a symengine representation. This was originally caught during the development of Qiskit#10902 as that switches the default of use_symengine to ``True`` as it makes symengine a hard requirement. This commit splits it out so the isolated fix can be backported to 0.45.1. * Skip symengine test if symengine isn't installed * Fix skip syntax * Update releasenotes/notes/fix-schedule-qpy-use-symengine-05ae1dfab73e3ff8.yaml Co-authored-by: Jake Lishman <[email protected]> --------- Co-authored-by: Jake Lishman <[email protected]>
- Loading branch information
1 parent
9111d0f
commit 1dd4f54
Showing
3 changed files
with
34 additions
and
3 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-schedule-qpy-use-symengine-05ae1dfab73e3ff8.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: | ||
- | | ||
Fixed an issue with :func:`.qpy.dump` which would cause the function to | ||
potentially ignore the value of ``use_symengine`` when serializing a | ||
:class:`.ScheduleBlock` object. |
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