-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Make MAX_NET_DETUNING in AHS device capabilities optional and extend field validator utility functions. #272
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 48 48
Lines 3802 3821 +19
Branches 930 938 +8
=========================================
+ Hits 3802 3821 +19 ☔ View full report in Codecov by Sentry. |
@@ -104,3 +104,50 @@ def validate_net_detuning_with_warning( | |||
# Return immediately if there is an atom has net detuning | |||
# exceeding MAX_NET_DETUNING at a time point | |||
return program | |||
|
|||
|
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.
Just want to remind myself, are these four functions the only things that needs to be moved from the service side to the client side? Also it maybe good to comment on the top of each of these functions that they are only for device emulator and not for AHS local simulator [so that people won't be confused that why they are not used in this repo].
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, don't we also need "validate_pattern_precision"?
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.
validate_pattern_precision is never used by the Device validators so I chose not to bring it over to the Default Simulator repo.
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.
Adding the additional comments makes sense for explaining the use of these helpers!
Issue #, if available:
Description of changes:
Make the MAX_NET_DETUNING device capability data point optional for AHS program validation - this is done so the Program validator used for AHS programs with the local simulator can also be used with capabilities derived from QPU capabilities, which don't provide a MAX_NET_DETUNING data point.
Additionally, utility methods
validate_max_absolute_slope
,validate_time_precision
,validate_time_separation
,validate_value_precision
are added to field validator utilities for use AHS Program validation with Device Capabilities Constants (introduced in BDK).Testing done:
Tested the newly introduced field validation utility functions.
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
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.