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

Collect classical registers using a set (#10496) #10505

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

cjh1
Copy link
Contributor

@cjh1 cjh1 commented Jul 26, 2023

Summary

Fixes issues with collapsing circuits with multiple conditions on the same registers.

Details and comments

This adds a test case that adds multiple conditions on the same register. The test case is fixed by using a set to collect the classical registers in collapse_to_operation.

fixes: #10496

This adds a test case that adds multiple conditions on the same
register. The test case is fixed by using a set to collect the
classical registers in collapse_to_operation.
@cjh1 cjh1 requested a review from a team as a code owner July 26, 2023 17:28
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jul 26, 2023
@CLAassistant
Copy link

CLAassistant commented Jul 26, 2023

CLA assistant check
All committers have signed the CLA.

@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:

  • @Qiskit/terra-core

@mtreinish mtreinish added Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable labels Jul 26, 2023
@mtreinish mtreinish added this to the 0.25.0 milestone Jul 26, 2023
mtreinish
mtreinish previously approved these changes Jul 26, 2023
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

This LGTM, thanks for the fast fix.

@mtreinish mtreinish added Changelog: None Do not include in changelog and removed Changelog: Bugfix Include in the "Fixed" section of the changelog labels Jul 26, 2023
@mtreinish
Copy link
Member

Oh actually before I can merge this can you sign the CLA. The CLA bot comment has a link to the details on this: #10505 (comment)

@cjh1
Copy link
Contributor Author

cjh1 commented Jul 26, 2023

@mtreinish Thanks for the approval. I am working on getting the CLA signed, it needs to be review by our IP group as I think we need to sign the corporate one, fingers crossed it doesn't take too long.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5671878806

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 85.945%

Files with Coverage Reduction New Missed Lines %
qiskit/extensions/unitary.py 1 93.75%
crates/qasm2/src/lex.rs 3 91.65%
Totals Coverage Status
Change from base Build 5667924881: 0.04%
Covered Lines: 73058
Relevant Lines: 85006

💛 - Coveralls

@mtreinish mtreinish added the on hold Can not fix yet label Jul 26, 2023
@mtreinish mtreinish modified the milestones: 0.25.0, 0.25.1 Jul 27, 2023
@mtreinish
Copy link
Member

Is there any update on this? We're preparing a 0.25.1 release soon and it would be great to include this fix as part of that.

@mtreinish mtreinish modified the milestones: 0.25.1, 0.25.2 Aug 17, 2023
@1ucian0 1ucian0 modified the milestones: 0.25.2, 0.25.3 Sep 28, 2023
@cjh1
Copy link
Contributor Author

cjh1 commented Oct 2, 2023

@mtreinish We are still waiting on IBM to respond to our email about signing the corporate CLA 😦

@mtreinish mtreinish modified the milestones: 0.25.3, 0.45.1 Oct 24, 2023
@1ucian0
Copy link
Member

1ucian0 commented Oct 24, 2023

hi @cjh1, Sep 29 we sent you the CCLA to sign. Let me know if you did not get it.

@cjh1
Copy link
Contributor Author

cjh1 commented Oct 24, 2023

Thanks @1ucian0, will follow up on my end.

@1ucian0
Copy link
Member

1ucian0 commented Oct 31, 2023

The Corporate CLA was signed. Our process also requieres that you sign the CLA in addition. After that, we are ready to merge.

@cjh1
Copy link
Contributor Author

cjh1 commented Oct 31, 2023

The Corporate CLA was signed. Our process also requieres that you sign the CLA in addition. After that, we are ready to merge.

Done

@jakelishman jakelishman removed the on hold Can not fix yet label Oct 31, 2023
@jakelishman
Copy link
Member

No longer on hold because the CCLA is now signed 🎉

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks so much for working through the CCLA process. We're streamlining our side of this as well, to help reduce friction in the future.

I've just pushed up a release note for the bugfix, but the code already looked great thanks.

@jakelishman jakelishman enabled auto-merge October 31, 2023 14:28
@jakelishman jakelishman modified the milestones: 0.45.1, 0.45.0 Oct 31, 2023
@jakelishman jakelishman added Changelog: Bugfix Include in the "Fixed" section of the changelog and removed Changelog: None Do not include in changelog labels Oct 31, 2023
@jakelishman jakelishman added this pull request to the merge queue Oct 31, 2023
Merged via the queue into Qiskit:main with commit b47c28b Oct 31, 2023
13 checks passed
mergify bot pushed a commit that referenced this pull request Oct 31, 2023
* Collect classical registers using a set (#10496)

This adds a test case that adds multiple conditions on the same
register. The test case is fixed by using a set to collect the
classical registers in collapse_to_operation.

* Add release note

---------

Co-authored-by: Jake Lishman <[email protected]>
(cherry picked from commit b47c28b)
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2023
* Collect classical registers using a set (#10496)

This adds a test case that adds multiple conditions on the same
register. The test case is fixed by using a set to collect the
classical registers in collapse_to_operation.

* Add release note

---------

Co-authored-by: Jake Lishman <[email protected]>
(cherry picked from commit b47c28b)

Co-authored-by: Chris Harris <[email protected]>
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.

BlockCollapser fails for ClassicalRegister conditions
7 participants