Skip to content
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

improve warning when 1q synthesis emits long strings #7048

Merged
merged 2 commits into from
Sep 20, 2021
Merged

improve warning when 1q synthesis emits long strings #7048

merged 2 commits into from
Sep 20, 2021

Conversation

ecpeterson
Copy link
Contributor

Summary

The warning strings reported by users in #7041, #7033, and #7042 were made illegible by implicit use of DAGNodeOp.__str__. This PR changes the generated warning string to something actually useful for debugging.

Notes

I tested this change by hand, by replacing the default values for simplify=True and allow_non_canonical=True with False in qiskit/quantum_info/synthesis/one_qubit_decompose.py. It's somewhat cumbersome to test this automatically.

@ecpeterson ecpeterson requested a review from a team as a code owner September 20, 2021 17:31
Copy link
Member

@levbishop levbishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtreinish mtreinish added Changelog: None Do not include in changelog automerge stable backport potential The bug might be minimal and/or import enough to be port to stable and removed automerge labels Sep 20, 2021
@levbishop
Copy link
Member

levbishop commented Sep 20, 2021

Maybe worth backporting for debug purposes if this keeps coming up?
EDIT: after I refreshed i see mtreinish already thought of it

@mergify mergify bot merged commit 6b08154 into Qiskit:main Sep 20, 2021
jakelishman pushed a commit that referenced this pull request Sep 21, 2021
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
(cherry picked from commit 6b08154)
mergify bot added a commit that referenced this pull request Sep 21, 2021
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
(cherry picked from commit 6b08154)

Co-authored-by: Eric Peterson <peterson.eric.c@gmail.com>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
@kdk kdk added this to the 0.19 milestone Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants