-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
MPL drawer CU1 gate is inconsistent with other drawers #3684
Comments
Thanks for bringing up the inconsistency. This was supposed to have been fixed via #1957 (and PR #2254). Seems like a regression. However note that the text drawer is correct here. CU1 is a symmetric gate and thus a typical notation to signify this is to draw control/target the same. So mpl drawer should be fixed. |
Got it, I will fix the MPL Drawer. |
@ajavadia Does this look right? Also, I am already working on a different bug and have a PR open. Whenever I push my changes for this bug, the changes get tied to that already opened PR. How can I push so that it creates a new PR related to this bug? |
The results looks correct! About the git issue, I think the problem is that you have to put different fixes in different branches (all from master). You can create different PRs from them. |
* Fixed issue 3640 by adding logic for complex imaginary numbers Co-Author: Sumit Puri <er.sumitpuri@gmail.com> * Added test for display of 'pi'. * Added test for displaying 'pi' for both real and imaginary parts of complex number. * Release notes added for Fixes #3640 * release notes * Fixes #3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Revert "Fixes #3400" This reverts commit 36b7881. * Fixes #3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Added release notes for Fixes #3400 * Fixes #3684 Text drawer displays cU1 correctly. * Revert "Fixes #3684 Text drawer displays cU1 correctly." This reverts commit b8b010e. * Fixes #3400 by adding jupyter-execute statement in the examples. * Fixes #3400 by adding jupyter-execute statement in the examples and correcting by performing 'make style'. * Update qiskit/extensions/standard/crz.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Revert "Update qiskit/extensions/standard/crz.py" This reverts commit 2abc824. * Fixes #3400 Added import numpy * #3400 added import numpy statements * Fixes #3684 * Release notes for #3684 fixes * Fixes #3400 incorporated comments from @nonhermitian * Fixes #3400 added more text. * Update qiskit/extensions/standard/rx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Added params for matrix generation. * Removed Matrix representation from rz.py * Update qiskit/extensions/standard/z.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u2.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/cx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u3.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fixes #3400 incorporated suggestions * Fixes #3400 H gate description. * Added matrix for cswap * Consistency with removing hyphen. * Fixes #3400 consistency * Fixing style * Rearranged the import order * Fixes matrix representation * Incorporating suggestions * Incorporated comments (#3400) * Update qiskit/extensions/standard/swap.py Fixed (#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/h.py Fixed (#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/swap.py Fixed (#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/x.py Fixed (#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fix lint failures following merge resolution. * Delete fix3400_quantum_methods-e822a1247329f927.yaml This reno belongs to a different PR Co-authored-by: Luciano Bello <luciano.bello@ibm.com> Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Qiskit#3400 (Qiskit#3683) * Fixed issue 3640 by adding logic for complex imaginary numbers Co-Author: Sumit Puri <er.sumitpuri@gmail.com> * Added test for display of 'pi'. * Added test for displaying 'pi' for both real and imaginary parts of complex number. * Release notes added for Fixes Qiskit#3640 * release notes * Fixes Qiskit#3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Revert "Fixes Qiskit#3400" This reverts commit 36b7881. * Fixes Qiskit#3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Added release notes for Fixes Qiskit#3400 * Fixes Qiskit#3684 Text drawer displays cU1 correctly. * Revert "Fixes Qiskit#3684 Text drawer displays cU1 correctly." This reverts commit b8b010e. * Fixes Qiskit#3400 by adding jupyter-execute statement in the examples. * Fixes Qiskit#3400 by adding jupyter-execute statement in the examples and correcting by performing 'make style'. * Update qiskit/extensions/standard/crz.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Revert "Update qiskit/extensions/standard/crz.py" This reverts commit 2abc824. * Fixes Qiskit#3400 Added import numpy * Qiskit#3400 added import numpy statements * Fixes Qiskit#3400 incorporated comments from @nonhermitian * Fixes Qiskit#3400 added more text. * Update qiskit/extensions/standard/rx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Added params for matrix generation. * Removed Matrix representation from rz.py * Update qiskit/extensions/standard/z.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u2.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/cx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u3.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fixes Qiskit#3400 incorporated suggestions * Fixes Qiskit#3400 H gate description. * Added matrix for cswap * Consistency with removing hyphen. * Fixes Qiskit#3400 consistency * Fixing style * Rearranged the import order * Fixes matrix representation * Incorporating suggestions * Incorporated comments (Qiskit#3400) * Update qiskit/extensions/standard/swap.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/h.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/swap.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/x.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fix lint failures following merge resolution. Co-authored-by: Luciano Bello <luciano.bello@ibm.com> Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
* Fixed issue 3640 by adding logic for complex imaginary numbers Co-Author: Sumit Puri <er.sumitpuri@gmail.com> * Added test for display of 'pi'. * Added test for displaying 'pi' for both real and imaginary parts of complex number. * Release notes added for Fixes Qiskit#3640 * release notes * Fixes Qiskit#3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Revert "Fixes Qiskit#3400" This reverts commit 36b7881. * Fixes Qiskit#3400 Examples have been provided for the following methods- ccx, ch, crz, cswap, cu1, cu3, cx, cy, cz, h, iden, rx, ry, rz, s, sdg, swap, t, tdg, u1, u2, u3, x, y, z * Added release notes for Fixes Qiskit#3400 * Fixes Qiskit#3684 Text drawer displays cU1 correctly. * Revert "Fixes Qiskit#3684 Text drawer displays cU1 correctly." This reverts commit b8b010e. * Fixes Qiskit#3400 by adding jupyter-execute statement in the examples. * Fixes Qiskit#3400 by adding jupyter-execute statement in the examples and correcting by performing 'make style'. * Update qiskit/extensions/standard/crz.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Revert "Update qiskit/extensions/standard/crz.py" This reverts commit 2abc824. * Fixes Qiskit#3400 Added import numpy * Qiskit#3400 added import numpy statements * Fixes Qiskit#3684 * Release notes for Qiskit#3684 fixes * Fixes Qiskit#3400 incorporated comments from @nonhermitian * Fixes Qiskit#3400 added more text. * Update qiskit/extensions/standard/rx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Added params for matrix generation. * Removed Matrix representation from rz.py * Update qiskit/extensions/standard/z.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/y.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u2.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/cx.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/u3.py Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fixes Qiskit#3400 incorporated suggestions * Fixes Qiskit#3400 H gate description. * Added matrix for cswap * Consistency with removing hyphen. * Fixes Qiskit#3400 consistency * Fixing style * Rearranged the import order * Fixes matrix representation * Incorporating suggestions * Incorporated comments (Qiskit#3400) * Update qiskit/extensions/standard/swap.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/h.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/swap.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Update qiskit/extensions/standard/x.py Fixed (Qiskit#3400) Co-Authored-By: Kevin Krsulich <kevin@krsulich.net> * Fix lint failures following merge resolution. * Delete fix3400_quantum_methods-e822a1247329f927.yaml This reno belongs to a different PR Co-authored-by: Luciano Bello <luciano.bello@ibm.com> Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Information
What is the current behavior?
Output-
However, mpl shows fine-
Steps to reproduce the problem
Paste the above code in Jupyter notebook and run.
What is the expected behavior?
The text drawer should show up like this-
Suggested solutions
Fix is provided below in the PR by making changes in qiskit/visualization/text.py
The text was updated successfully, but these errors were encountered: