Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/braket/aws/aws_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@ def properties(self) -> DeviceCapabilities:

.. _amazon-braket-schemas-python: https://github.com/aws/amazon-braket-schemas-python
"""
if not self._properties:
warnings.warn(
f"No device capabilities found;"
Comment thread
speller26 marked this conversation as resolved.
Outdated
" please make sure you are using the latest version of amazon-braket-schemas.",
stacklevel=1,
)
return self._properties

@property
Expand Down
3 changes: 2 additions & 1 deletion test/unit_tests/braket/aws/test_aws_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ def test_get_device_invalid_capabilities(arn):
mock_session.region = RIGETTI_REGION
device = AwsDevice(arn, mock_session)
assert device is not None
assert device.properties is None
with pytest.warns(UserWarning):
assert device.properties is None


MOCK_PULSE_MODEL_QPU_PULSE_CAPABILITIES_JSON_1 = {
Expand Down
Loading