Skip to content

Commit

Permalink
use get_device_arn instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeach-aws committed Oct 13, 2023
1 parent adfc964 commit b95fc10
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/hybrid_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
from braket.aws import AwsDevice
from braket.circuits import Circuit, FreeParameter, Observable
from braket.devices import Devices
from braket.jobs import hybrid_job
from braket.jobs import get_job_device_arn, hybrid_job
from braket.jobs.metrics import log_metric

device_arn = Devices.Amazon.SV1


@hybrid_job(device=device_arn, wait_until_complete=True) # choose priority device
@hybrid_job(device=Devices.Amazon.SV1, wait_until_complete=True)
def run_hybrid_job(num_tasks=1):
device = AwsDevice(device_arn) # declare AwsDevice within the hybrid job
# declare AwsDevice within the hybrid job
device = AwsDevice(get_job_device_arn())

# create a parametric circuit
circ = Circuit()
Expand All @@ -44,5 +43,4 @@ def run_hybrid_job(num_tasks=1):


job = run_hybrid_job(num_tasks=5)

print(job.result())

0 comments on commit b95fc10

Please sign in to comment.