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

fix: Fallback to JAQCD for device properties #104

Merged
merged 2 commits into from
Jun 8, 2023
Merged

fix: Fallback to JAQCD for device properties #104

merged 2 commits into from
Jun 8, 2023

Conversation

kshitijc
Copy link
Collaborator

@kshitijc kshitijc commented Jun 8, 2023

Summary

  • Update old devices to replace IonQ device with Harmony.
  • Replace Aspen-M-2 with Aspen-M-3.
  • Fallback to JAQCD for old devices.

Comment on lines +254 to +257
action_properties: OpenQASMDeviceActionProperties = (
properties.action.get(DeviceActionType.OPENQASM)
if properties.action.get(DeviceActionType.OPENQASM)
else properties.action.get(DeviceActionType.JAQCD)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
action_properties: OpenQASMDeviceActionProperties = (
properties.action.get(DeviceActionType.OPENQASM)
if properties.action.get(DeviceActionType.OPENQASM)
else properties.action.get(DeviceActionType.JAQCD)
action_properties: OpenQASMDeviceActionProperties = (
openqasm_properties
if (openqasm_properties := properties.action.get(DeviceActionType.OPENQASM))
else properties.action.get(DeviceActionType.JAQCD)

optional nit to avoid duplicate lookups

Copy link
Collaborator

Choose a reason for hiding this comment

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

The type hint on action_properties should be a union type now

@kshitijc kshitijc merged commit 2434a9a into main Jun 8, 2023
@kshitijc kshitijc deleted the irf branch June 8, 2023 17:58
robotAstray pushed a commit to robotAstray/qiskit-braket-provider that referenced this pull request Jun 14, 2023
…y#97)

* Probability to Sample result type

* passes tox lint

* updates toxlint

* fixes observable z error but not passses elint

* unit test added

* final commit with tests

fix: Fallback to JAQCD for device properties (qiskit-community#104)

* fix: Fallback to JAQCD for device properties

* fix: reformat

replacing AWSBraketJob with AmazonBraketTask

run the notebooks containing AmazonBraketTask

deprecation warning added for AWSBraketJob class

formatting fixed

re-add <JOB_ARN>

fix breaking changes on /provider/__init__.py and __init__.py

rename job_id to task_id argument for AmazonBraketTask()

rename braket_jobs_states to braket_tasks_states

add task_id method to access the task_id similar to the one we have in the JobV1 class

adding tests for new class 'AmazonBraketTask' and old class 'AWSBraketJob'

formatting test_braket_job.py

correcting definition of AWSBraketJob

rewriting line 184 in braket_job.py

adding class docstring to AWSBraketJob

standard import 'from warnings import warn'  placed before 'from braket.aws import AwsQuantumTask' (wrong-import-order)

docstring fix in test_braket_job.py

assert the job id in test_AWS_job() function in test_braket_job.py

running how to notebook #0

running how to notebook #1

running how to notebook #2

running how to notebook #3

running how to notebook number 5

running tutorial  notebook number 3

tutorial number 0
christianbmadsen pushed a commit that referenced this pull request Jun 19, 2023
* fix: Updates for Qiskit to Braket circuit conversion (#97)

* Probability to Sample result type

* passes tox lint

* updates toxlint

* fixes observable z error but not passses elint

* unit test added

* final commit with tests

fix: Fallback to JAQCD for device properties (#104)

* fix: Fallback to JAQCD for device properties

* fix: reformat

replacing AWSBraketJob with AmazonBraketTask

run the notebooks containing AmazonBraketTask

deprecation warning added for AWSBraketJob class

formatting fixed

re-add <JOB_ARN>

fix breaking changes on /provider/__init__.py and __init__.py

rename job_id to task_id argument for AmazonBraketTask()

rename braket_jobs_states to braket_tasks_states

add task_id method to access the task_id similar to the one we have in the JobV1 class

adding tests for new class 'AmazonBraketTask' and old class 'AWSBraketJob'

formatting test_braket_job.py

correcting definition of AWSBraketJob

rewriting line 184 in braket_job.py

adding class docstring to AWSBraketJob

standard import 'from warnings import warn'  placed before 'from braket.aws import AwsQuantumTask' (wrong-import-order)

docstring fix in test_braket_job.py

assert the job id in test_AWS_job() function in test_braket_job.py

running how to notebook #0

running how to notebook #1

running how to notebook #2

running how to notebook #3

running how to notebook number 5

running tutorial  notebook number 3

tutorial number 0

* add separate QUEUED and RUNNING states to task status (#46)

---------

Co-authored-by: Yuri Han <45699207+urihan@users.noreply.github.com>
robotAstray added a commit to robotAstray/qiskit-braket-provider that referenced this pull request Jun 19, 2023
* [UnitaryHack] Enable qiskit transpilation discontinous qubit indices (qiskit-community#108)

* convert Rigetti Aspen qubit connectivity continous

* Add qiskit transpilation discountinous qubit indices

* Add more comments, cleanup

* Add more comments, cleanup

* Move in Rigetti branching since not require globally

* Fix lint

* Add better example

* Fix docstring

* Add mock for rigetti aspen m3

* Enable transpilation test

* Fix mypy

* [UnitaryHack] Gate Decomposition(qiskit-community#90) added and tested (qiskit-community#111)

* implement and test gate decomposition

* Implement and Test Gate Decomposition

* addressed comments in previous PR

* Adding separate QUEUED and RUNNING states to task status (qiskit-community#110)

* fix: Updates for Qiskit to Braket circuit conversion (qiskit-community#97)

* Probability to Sample result type

* passes tox lint

* updates toxlint

* fixes observable z error but not passses elint

* unit test added

* final commit with tests

fix: Fallback to JAQCD for device properties (qiskit-community#104)

* fix: Fallback to JAQCD for device properties

* fix: reformat

replacing AWSBraketJob with AmazonBraketTask

run the notebooks containing AmazonBraketTask

deprecation warning added for AWSBraketJob class

formatting fixed

re-add <JOB_ARN>

fix breaking changes on /provider/__init__.py and __init__.py

rename job_id to task_id argument for AmazonBraketTask()

rename braket_jobs_states to braket_tasks_states

add task_id method to access the task_id similar to the one we have in the JobV1 class

adding tests for new class 'AmazonBraketTask' and old class 'AWSBraketJob'

formatting test_braket_job.py

correcting definition of AWSBraketJob

rewriting line 184 in braket_job.py

adding class docstring to AWSBraketJob

standard import 'from warnings import warn'  placed before 'from braket.aws import AwsQuantumTask' (wrong-import-order)

docstring fix in test_braket_job.py

assert the job id in test_AWS_job() function in test_braket_job.py

running how to notebook #0

running how to notebook #1

running how to notebook #2

running how to notebook #3

running how to notebook number 5

running tutorial  notebook number 3

tutorial number 0

* add separate QUEUED and RUNNING states to task status (qiskit-community#46)

---------

Co-authored-by: Yuri Han <45699207+urihan@users.noreply.github.com>

---------

Co-authored-by: WingCode <smallstar1234@gmail.com>
Co-authored-by: Gmontes01 <118773601+Gmontes01@users.noreply.github.com>
Co-authored-by: Yuri Han <45699207+urihan@users.noreply.github.com>
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