Skip to content

Fix IQX color schemes #10941

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

Merged
merged 5 commits into from
Oct 6, 2023
Merged

Fix IQX color schemes #10941

merged 5 commits into from
Oct 6, 2023

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Oct 2, 2023

Summary

Fix iqx and iqx-dark color schemes for the matplotlib drawer.

Details and comments

Some diagonal gates (CPhase, RZ, RZZ) and the iSwap gate were not correctly categorized. E.g. iSwap was shown as blue (diagonal gate) but it's not diagonal.

Todo: Update drawer reference files, but I'm failing to produce the correct ones locally, so I'm using the created images of the CI

@Cryoris Cryoris added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Oct 2, 2023
@Cryoris Cryoris added this to the 0.25.3 milestone Oct 2, 2023
@Cryoris Cryoris requested review from nonhermitian and a team as code owners October 2, 2023 11:17
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

@coveralls
Copy link

coveralls commented Oct 2, 2023

Pull Request Test Coverage Report for Build 6380973092

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 87.029%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 91.67%
Totals Coverage Status
Change from base Build 6378674246: 0.02%
Covered Lines: 74122
Relevant Lines: 85169

💛 - Coveralls

Comment on lines +106 to 115
"#BAE6FF",
"#000000"
],
"cp": [
"#BAE6FF",
"#000000"
],
"mcphase": [
"#BAE6FF",
"#000000"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remind us what the rules are for assigning colors to gates? This way it would be easier to understand the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized I can't add a comment to a JSON file, but it's sort of documented here:

"### IQX Colors": "IQX Colors",
, but that's not very solid since it's just an (unused) dictionary in some class. Let's do a follow-up PR to properly put the color schemes in the API docs for all the schemes, maybe as follow up to #10950.

The IQX color scheme is coloring gates by how much of a superposition they can create on a state:

  • classical gates (i.e. exist on a CPU): dark blue
  • diagonal (or phase) gates: light blue
  • hadamard: orange -- this is special as it creates equal superposition (IMO also SX should be orange then)
  • rest: dark red

@Cryoris Cryoris requested a review from ElePT October 5, 2023 14:04
Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

Thanks a lot! I think that the change makes sense.

@ElePT ElePT added this pull request to the merge queue Oct 6, 2023
Merged via the queue into Qiskit:main with commit 5f53e33 Oct 6, 2023
rupeshknn pushed a commit to rupeshknn/qiskit that referenced this pull request Oct 9, 2023
* fix diagonal gate colors

* fix iqx-dark and iswap

* add reno

* update reference images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants