Finding active devices
In the previous chapters, we discussed the devices that are available in Amazon Braket. Here, we will look at how to access the device information through code. This will become necessary as new devices are added.
Note: Amazon Braket Device Availability
Carefully evaluate the devices present when you purchase this book and run this code. New devices might have been added, and some devices might have been turned off. Also, depending on the region in which you set up your config file, you might see different devices.
To do this, perform the following steps:
- The following code retrieves active devices in Amazon Braket in the form of a list. The following output has been formatted to be easier to read:
from braket.aws import AwsDevice device_list=AwsDevice.get_devices(statuses=['ONLINE']) print(device_list)
Output:
[Device('name': Advantage_system4.1, 'arn': arn:aws:braket:::device/qpu/d-wave/Advantage_system4...