feature: Add delay instruction for circuits
Issue #, if available: #974
Description of changes:
Starting with the changes from #993 and performing the additional work required to merge to main.
The biggest outstanding items are:
- [ ]
Delay(like the existingBarrier) should inherit fromCompilerDirectiverather thanGate, since it is an instruction that affects the compilation of a program rather than the quantum state. See this comment thread. - [ ] Significant duplication between the new
DurationGateclass and the existingAngledGateclass that should be reduced. See this comment thread.
Testing done:
tox
Merge Checklist
Put an x in 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
- [x] I have read the CONTRIBUTING doc
- [x] I used the commit message format described in CONTRIBUTING
- [x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)
Tests
- [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [ ] I have checked that my tests are not configured for a specific region or account (if appropriate)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 100.00%. Comparing base (a76c4e2) to head (af91e62).
:warning: Report is 46 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1002 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 162 163 +1
Lines 10450 10526 +76
Branches 1296 1302 +6
=========================================
+ Hits 10450 10526 +76
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Is there any action in this direction anymore? Not having a barrier makes benchmarking via AWS difficult because any mirror circuits collapse unless verbatim mode is used, e.g. https://github.com/unitaryfoundation/metriq-gym/issues/329
@nonhermitian we need to get barrier added as a supported instruction in the Braket service first, and then we'll merge support for the barrier instruction here. Thank you for the nudge - I'll bring this up with the product team and will follow up when we have a timeline.
Is there any action in this direction anymore? Not having a barrier makes benchmarking via AWS difficult because any mirror circuits collapse unless verbatim mode is used, e.g. unitaryfoundation/metriq-gym#329
@nonhermitian We are picking up this work and hope to have support ready within a few weeks. Will post status updates here as we progress.