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

feat: Introduce Device AHS validator for additional device information. #271

Closed
wants to merge 10 commits into from

Conversation

Altanali
Copy link
Contributor

Issue #, if available:

Description of changes:
Extend the AHS Validator by introducing a DeviceCapabilitiesConstants data class and additional Device-AtomArrangement, LocalDetuning, Hamiltonian, and DrivingField validators for information that's available in AWS AHS devices (e.g. Quera Aquila).

Testing done:

Testing done to achieve full coverage.

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

  • 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.

@Altanali Altanali requested a review from a team as a code owner July 20, 2024 23:22
Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a9808f3) to head (8620b84).

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #271    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           48        55     +7     
  Lines         3802      4102   +300     
  Branches       930       988    +58     
==========================================
+ Hits          3802      4102   +300     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

a.txt Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed!

Comment on lines 1 to 5
from braket.analog_hamiltonian_simulator.rydberg.validators.device_validators.device_atom_arrangement import ( # noqa: E501 F401
DeviceAtomArrangementValidator,
)
from braket.analog_hamiltonian_simulator.rydberg.validators.device_validators.device_capabilities_constants import ( # noqa: E501 F401
DeviceCapabilitiesConstants,
Copy link
Contributor

Choose a reason for hiding this comment

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

These two imports are going to cause circular import issues. One fix would be to swap the ordering of L1 and L4 but I would encourage you to see what other options there would be to resolve the circular import issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In 746ab2c I opt to move device_capabilities_constants.py to the parent directory, so it lives alongside the capabilities_constants.py; this does break the separation of device_validation and validation constructs/methods but separates the DeviceCapabilitiesConstants from the constructs that use it without having to enforce an import order in __init__.py.

Please let me know if this approach is appropriate!

if start_value != 0 or end_value != 0:
raise ValueError(
f"The values of the Rabi frequency at the first and last time points are \
{start_value}, {end_value}; they both must be both 0."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{start_value}, {end_value}; they both must be both 0."
{start_value}, {end_value}; they both must be nonzero."

@Altanali Altanali marked this pull request as draft July 21, 2024 21:53
@Altanali Altanali changed the title feature: Introduce Device AHS validator for additional device information. feat: Introduce Device AHS validator for additional device information. Jul 22, 2024
@Altanali Altanali marked this pull request as ready for review July 22, 2024 22:59
@Altanali
Copy link
Contributor Author

Closing - Moving AHS Device Validation to the BDK instead of extending the default-simulator repo.

@Altanali Altanali closed this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants