-
Notifications
You must be signed in to change notification settings - Fork 76
Fix a bug with Barrier not being supported in Azure-qiskit #677
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #677 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 862 861 -1
=========================================
- Hits 862 861 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Probably need to explicitly fmt the tests by |
| # barrier ensures we first do all operations, then do all measurements | ||
| qc.barrier(reg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the related changes in tests/test_converter.py is the actual change. Everything else is black formatting.
JerryChen97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, mind adding a changelog? @DSGuala @lillian542
JerryChen97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Context:
The current circuit conversion inserts a
barrierbetween thetape.operationsand the terminal measurements when converting a PL circuit to a Qiskit circuit. Some devices don't supportbarrier, and as far as we can see, it isn't technically necessary.Description of the Change:
This PR removes a line in
circuit_to_qiskitthat added a barrier between a circuit's gates and measurements.Also the new version of
blackhas added some extra whitespace etc. There are only 4 lines of actual changes.Benefits:
Allows devices like Azure that don't include
barriersupport to work with the Remote device.Possible Drawbacks:
We aren't aware of anything that was dependent on the
barrier, and removing it doesn't cause any tests to fail, but it's not impossible that some device somewhere was expecting it to be there. We can cross that bridge if we come to it.Related GitHub Issues:
PennyLaneAI/pennylane#8657
[sc-104090]