-
Notifications
You must be signed in to change notification settings - Fork 139
feature: add barrier instruction #1118
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 @@
## main #1118 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 162 162
Lines 10387 10474 +87
Branches 1262 1276 +14
=========================================
+ Hits 10387 10474 +87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/braket/circuits/text_diagram_builders/ascii_circuit_diagram.py
Outdated
Show resolved
Hide resolved
src/braket/circuits/text_diagram_builders/ascii_circuit_diagram.py
Outdated
Show resolved
Hide resolved
| """ | ||
| target_qubits = self.qubits if target is None else QubitSet(target) | ||
|
|
||
| if target_qubits: |
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.
because self.qubits can be None?
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.
The motivation was to not have any effect when adding a barrier to an empty circuit.
…iht the different types of barriers
|
Since the linter was not happy anymore with the added complexity introduced here, I had to refactor the |
Issue #, if available:
#974
Description of changes:
Starting with the changes from #993 and #1002, the
barrierinstruction is implemented as aCompilerDirective. To this end, changes were necessary in a few files.Testing done:
toxMerge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.