Skip to content

Fix braket ahs devices incompatibility#187

Open
MoHermes wants to merge 4 commits intodevfrom
fix-braket-ahs-devices
Open

Fix braket ahs devices incompatibility#187
MoHermes wants to merge 4 commits intodevfrom
fix-braket-ahs-devices

Conversation

@MoHermes
Copy link
Collaborator

No description provided.

@@ -397,7 +406,8 @@ def get_braket_device(device: AWSDevice, is_noisy: bool = False) -> "BraketDevic
Copy link
Collaborator

Choose a reason for hiding this comment

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

pkg_resources is deprecated on python 3.12 and onwards, might have to change this line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines +407 to +410
try:
mpqp_version = version("mpqp")
except PackageNotFoundError:
mpqp_version = "0.0.0+unknown"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe now even use your fresh new feature mpqp.__version__ ?

return Result(
job,
data=None,
errors="Unsupported Braket backend for QCircuit (see warning).",
Copy link
Contributor

Choose a reason for hiding this comment

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

error isn't meant for a user error, but rather for the statistical error of the device I believe, I wouldn't mix the two

data: float | dict["str", float] | StateVector | list[Sample],
errors: Optional[float | dict[Any, Any]] = None,
data: float | dict["str", float] | StateVector | list[Sample] | None,
errors: Optional[float | dict[Any, Any] | str] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

see comment above

is_noisy: bool = False,
is_gate_model: bool = True,
) -> "BraketDevice":
"""Returns the AwsDevice device associate with the AWSDevice in parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

doc for arguments

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