-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with ScheduleBlock qpy serialization and use_symengine #11261
Fix issue with ScheduleBlock qpy serialization and use_symengine #11261
Conversation
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.
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 6909834098
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this oversight 😅 . It looks like the windows tests are complaining about symengine, would the change you made to pyproject.toml
(skip-test) on #10902 fix that?
Oh good call, yeah I need to add a skip decorator on the new test so it skips when The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me other than the mistaken cross-ref.
releasenotes/notes/fix-schedule-qpy-use-symengine-05ae1dfab73e3ff8.yaml
Outdated
Show resolved
Hide resolved
…3ff8.yaml Co-authored-by: Jake Lishman <[email protected]>
) * 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 #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]> (cherry picked from commit 1dd4f54)
) (#11275) * 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 #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]> (cherry picked from commit 1dd4f54) Co-authored-by: Matthew Treinish <[email protected]>
Summary
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.
Details and comments
This was originally caught during the development of #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.