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

Fix partition_problem's handling of unlabeled TwoQubitQPDGates #350

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

garrison
Copy link
Member

@garrison garrison commented Aug 10, 2023

I noticed when experimenting with partition_problem that it blows up if you give it a circuit that contains an unlabeled TwoQubitQPDGate. In our workflows so far, all TwoQubitQPDGates are created within partition_problem itself, as the first thing it does is call partition_circuit_qubits, which creates the gates with the labels. However, it's not strictly necessary for the gates to have labels, and people might want to place some TwoQubitQPDGates manually in addition to the ones across the partition labels. (Also, in the future, we might want to make partition_labels optional, at which point it will just partition as well as it can using the TwoQubitQPDGates that have been placed.)

I double checked, and the added test indeed fails without the accompanying change.

@garrison garrison added bug Something isn't working cutting QPD-based circuit cutting code labels Aug 10, 2023
@garrison garrison added this to the 0.3.0 milestone Aug 10, 2023
@garrison garrison requested a review from caleb-johnson August 10, 2023 17:57
Copy link
Collaborator

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

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

awesome, nice catch 👍

@garrison garrison merged commit a934578 into main Aug 14, 2023
@garrison garrison deleted the fix-unlabeled-qpdgates branch August 14, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cutting QPD-based circuit cutting code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants