-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Runtime] check amazon-braket-pennylane-plugin
's version
#724
base: v0.6.1-rc
Are you sure you want to change the base?
[Runtime] check amazon-braket-pennylane-plugin
's version
#724
Conversation
from braket.aws import AwsDevice | ||
from braket.devices import LocalSimulator | ||
from braket.ir.openqasm import Program as OpenQasmProgram |
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.
Looking at this, do we even have a dependency on the amazon-braket-pennylane-plugin ?
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.
We never import amazon-braket-pennylane-plugin
. But we obtain a class BraketQubitDevice(QubitDevice):
from pennylane itself. Which is defined in amazon-braket-pennylane-plugin
.
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.
I could also make this change in the runtime.py
file. Somewhere around these lines.
if dname == "braket.local.qubit": # pragma: no cover
device_kwargs["device_type"] = dname
device_kwargs["backend"] = (
# pylint: disable=protected-access
device._device._delegate.DEVICE_ID
)
elif dname == "braket.aws.qubit": # pragma: no cover
device_kwargs["device_type"] = dname
device_kwargs["device_arn"] = device._device._arn # pylint: disable=protected-access
if device._s3_folder: # pylint: disable=protected-access
device_kwargs["s3_destination_folder"] = str(
device._s3_folder # pylint: disable=protected-access
)
@@ -603,7 +603,7 @@ jobs: | |||
- name: Install additional dependencies (OpenQasm device) | |||
if: ${{ matrix.backend == 'openqasm' }} | |||
run: | | |||
pip install numpy amazon-braket-sdk | |||
pip install numpy amazon-braket-sdk amazon-braket-pennylane-plugin>=1.27.1 |
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.
pip install numpy amazon-braket-sdk amazon-braket-pennylane-plugin>=1.27.1 | |
pip install numpy amazon-braket-pennylane-plugin |
Closed. It was decided we are going to try to open a PR for SProd and Sum to the amazon-braket-pennylane-plugin github repo. |
@dime10 we had a brief discussion offline, you said you still want this code in master? |
Yes I think the version check is still a good improvement to the user's experience :) Is there a way to add a test that it is working as intended? |
Context: To help users understand which version of
amazon-braket-pennylane-plugin
is compatible with catalystDescription of the Change:
amazon-braket-pennylane-plugin
is found.semantic_version
module in order check non-trivial version compatibilities.Benefits:
Possible Drawbacks:
Related GitHub Issues: