-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix more spurious complex parts in circuit functions #14431
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
Conversation
One or more of the following people are relevant to this code:
|
Should this be backported to 2.0.2? |
Whoops, wrong target branch -- this was supposed to go on |
Pull Request Test Coverage Report for Build 15188244278Details
💛 - 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.
LGTM. I have confirmed that this fixes the primitives bug that triggered the issue.
@Mergifyio backport stable/1.4 |
✅ Backports have been created
|
* Fix spurious complex part in circuit funcs * reno links (cherry picked from commit e7fa11d)
@Mergifyio backport main |
✅ Backports have been created
|
* Fix spurious complex part in circuit funcs * reno links (cherry picked from commit e7fa11d)
#14455) * Fix more spurious complex parts in circuit functions (#14431) * Fix spurious complex part in circuit funcs * reno links (cherry picked from commit e7fa11d) * Add qpy compat test * Fix black * Fix lint, don't import circuit library element on older qiskit version * Remove venv * Fix indentation * Fix tests * Fix import * Fix access * debug * Change test * Restore backwards compat test * Remove reno --------- Co-authored-by: Julien Gacon <jules.gacon@googlemail.com> Co-authored-by: ElePT <epenatap@gmail.com> Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
…#14431) (Qiskit#14455) * Fix more spurious complex parts in circuit functions (Qiskit#14431) * Fix spurious complex part in circuit funcs * reno links (cherry picked from commit e7fa11d) * Add qpy compat test * Fix black * Fix lint, don't import circuit library element on older qiskit version * Remove venv * Fix indentation * Fix tests * Fix import * Fix access * debug * Change test * Restore backwards compat test * Remove reno --------- Co-authored-by: Julien Gacon <jules.gacon@googlemail.com> Co-authored-by: ElePT <epenatap@gmail.com> Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
Summary
@ElePT reported that #13643 came back for other circuits, too. This essentially affects circuits that use operators as inputs, which have coefficients of complex types. This problem does not appear on
main
, I assume #13278 removes the 0 complex component. We could still consider to add this safetyguard tomain
, but there's no way to break it right now that I'm aware of.