AWS Braket¶
Run benchmarks on quantum computers through Amazon Braket.
Prerequisites¶
- An AWS account
- AWS credentials with Braket permissions
- (Optional) An S3 bucket for job results
Setup¶
1. Get AWS Credentials¶
- Log in to the AWS Console
- Navigate to IAM > Users > Your User > Security credentials
- Create an access key
2. Configure Environment¶
Add to your .env file:
Optionally, set your default region:
Discovering Devices¶
AWS Braket provides access to multiple hardware providers (IonQ, Rigetti, IQM) and simulators. Device availability changes frequently.
To see currently available devices:
from qbraid.runtime import load_provider
provider = load_provider("braket")
for device in provider.get_devices():
print(f"{device.id}: {device.status}")
Or check the Braket Console for current devices and their ARNs.
Usage¶
Dispatch to Braket Hardware¶
mgym job dispatch metriq_gym/schemas/examples/wit.example.json \
--provider braket \
--device "arn:aws:braket:us-east-1::device/qpu/ionq/Aria-1"
Dispatch to Braket Simulator¶
mgym job dispatch metriq_gym/schemas/examples/wit.example.json \
--provider braket \
--device "arn:aws:braket:::device/quantum-simulator/amazon/sv1"
Poll Results¶
Pricing¶
See AWS Braket Pricing for current rates.
Troubleshooting¶
Authentication Errors¶
Verify credentials:
Region Issues¶
Some devices are only available in specific regions. Ensure your AWS_DEFAULT_REGION matches the device location.
Insufficient Permissions¶
Your IAM user/role needs the AmazonBraketFullAccess policy or equivalent permissions.