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

Fixing bug in qcstyle that modified custom style dict #11874

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

Durd3nT
Copy link
Contributor

@Durd3nT Durd3nT commented Feb 23, 2024

Summary

visualization.circuit.qcstyle popped elements from the style dictionary instead of extracting them, resulting in modyfied style dicts.
As discussed with @Cryoris, this PR solves this issue, leaving style dicts untouchted.

Details and comments

Solved the issue described above, added test.

@Durd3nT Durd3nT requested review from nonhermitian and a team as code owners February 23, 2024 17:13
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Feb 23, 2024
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

@coveralls
Copy link

coveralls commented Feb 23, 2024

Pull Request Test Coverage Report for Build 8082344327

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • -3 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 15 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 89.321%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/visualization/circuit/qcstyle.py 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.81%
crates/qasm2/src/lex.rs 4 91.94%
qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py 10 92.9%
Totals Coverage Status
Change from base Build 8052013397: 0.02%
Covered Lines: 59145
Relevant Lines: 66216

💛 - Coveralls

@Durd3nT Durd3nT changed the title Fixing but in qcstyle that modified custom style dict Fixing bug in qcstyle that modified custom style dict Feb 23, 2024
@Cryoris Cryoris self-assigned this Feb 24, 2024
@Cryoris Cryoris added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Feb 24, 2024
@Cryoris Cryoris added this to the 1.0.2 milestone Feb 24, 2024
@Cryoris Cryoris added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Feb 24, 2024
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the fix!

@Cryoris Cryoris added this pull request to the merge queue Feb 28, 2024
Merged via the queue into Qiskit:main with commit d21127a Feb 28, 2024
12 checks passed
mergify bot pushed a commit that referenced this pull request Feb 28, 2024
* fixed qcstyle bug that modified style dict, added test

* black

* ensure that the keys in nested_attrs are not overwritten again

* release notes

* Update releasenotes/notes/qcstyle-bug-custom-style-dicts-22deab6c602ccd6a.yaml

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
(cherry picked from commit d21127a)
github-merge-queue bot pushed a commit that referenced this pull request Feb 28, 2024
)

* fixed qcstyle bug that modified style dict, added test

* black

* ensure that the keys in nested_attrs are not overwritten again

* release notes

* Update releasenotes/notes/qcstyle-bug-custom-style-dicts-22deab6c602ccd6a.yaml

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
(cherry picked from commit d21127a)

Co-authored-by: Alexander Miessen <52243504+Durd3nT@users.noreply.github.com>
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 Community PR PRs from contributors that are not 'members' of the Qiskit repo stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants