amazon-braket
Original:🇺🇸 English
Translated
Runs quantum computing workflows on AWS through Amazon Braket — discovering devices (QPUs and simulators) and their availability, building gate-model circuits and analog Hamiltonian programs, submitting quantum tasks, program sets and hybrid jobs, looking up prices, and capping spend with spending limits. Applies to any request about quantum computing, quantum hardware, quantum simulation, AHS, OpenQASM, or running a quantum algorithm on AWS.
6installs
Added on
NPX Install
npx skill4agent add aws/agent-toolkit-for-aws amazon-braketTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Amazon Braket
Primitives
The vocabulary of a Braket workflow, and which reference to open for each.
| Primitive | What it is | Related References | Open it when the request involves |
|---|---|---|---|
| Device | A simulator or QPU, identified by a region-scoped ARN | devices.md | anything about a device: what exists, discovering or filtering the fleet, availability and status (online, offline, retired), which region a device lives in, ARNs, choosing a device for a workload, qubit count, connectivity or topology, native gates, fidelities, calibration data, queue depth, shot and gate limits, paradigm (gate-model vs analog Hamiltonian simulation), whether a device supports program sets, pulse-level control, simulators and local emulators |
| Program | The workload/input — one executable (Circuit, AHS, OpenQASM). Which type is legal depends on the device's paradigm | - | - |
| Quantum task | One program + shots, run once (the atomic unit Braket meters) | - | - |
| Task batch | Many independent tasks — SDK-only fallback for when a program set does not fit; works on all devices | program-sets.md | see the Program set row; also running multiple programs |
| Program set | Many programs in one service-side task — preferred way to run multiple programs instead of task batch | program-sets.md | running more than one program: parameter sweeps, scanning parameter values, task batches, |
| Hybrid job | Managed classical-quantum loop that orchestrates many tasks | hybrid-job.md | hybrid jobs: |
| Spending limit | Service-side hard cap that rejects QPU tasks — the only true enforcement (not SDK) | spending-limit.md | capping or enforcing spend: spending limits (create, update, delete, search), and cost guardrails |
| Cost tracking | In-session cost estimate (not enforcement) | spending-limit.md | in-session cost tracking with |
Each reference carries the domain detail for its own area — field paths, key names, API shapes, and billing models.
Additional notes:
- Reservation — exclusive device access for a booked window. This skill covers reservations at pointer depth only: the billing model is in pricing.md, reservation-specific device limits such as are in devices.md, and the full model is in the reservations developer guide.
service.reservationShotsRange - Gate calibrations / pulse control — access native gate calibrations on QPUs and attach custom pulse sequences at run time. See devices.md for detecting support, and the pulse control developer guide for the full model.
Critical Rules
These rules apply to every Braket request, whatever it involves.
-
The Amazon Braket Python SDK (, imported as
pip install amazon-braket-sdk) is the primary entry point. Prefer it for every operation including Braket API operations, and understand what it covers by reading the docs or inspecting the SDK's modules locally.braket- Use local execution tools for running the Braket SDK, such as with
shell.python3 -c "<code>"
- Use local execution tools for running the Braket SDK, such as
-
The AWS MCP server is recommended for executing any other AWS API calls in this skill, especially operations not present in the Python SDK, although not required. Note: the AWS MCP'stool executes code in a minimal sandbox without Braket libraries, so prefer using other tools for code execution, especially when using the Braket SDK.
run_script -
A small set of primitives composes every workflow — see Primitives for the vocabulary and the reference for each.
-
Devices, quantum tasks, and hybrid jobs are region-scoped, so fan out across every Braket region whenever you use the API, CLI, or boto3 to search for resources. The SDK handles fanout for you where it can —searches QPUs in all regions. Get the list of regions Braket supports from
AwsDevice.get_deviceswhen the AWS MCP server is available, or from the supported devices and regions documentation. Resource ARNs containing a region may only be queried from that same region, otherwise you will see aaws___get_regional_availability.ResourceNotFoundException -
Open the matching reference before you write code or answer. Use the Primitives table to find and read references. Note: A request that asks for several things, e.g. executing a series of circuits and controlling the cost thereof, may require reading multiple reference files.
-
Verify, never recall. Device ARNs and statuses, API signatures, supported features, and prices (and other values) all change and may post-date training data.
-
Confirm an SDK signature before you write code that calls it. Read it from the SDK reference docs. If no available tool can reach them, get it from the installed SDK with:
shell
bash
PAGER=cat python -c "import braket; help(braket)" # subpackages: ahs, circuits, pulse, program_sets, ...
python -c "import braket.ahs; print(dir(braket.ahs))" # names: DrivingField, AtomArrangement, ...
python -c "import inspect; from braket.ahs import DrivingField; \
print(inspect.signature(DrivingField.from_lists)); print(inspect.getdoc(DrivingField.from_lists))"Guardrail — where this skill's own files live (MCP vs local install)
This skill can be loaded two ways, and they resolve the skill's own bundled files from different places. Determine how the skill was loaded before reading a reference:
- Loaded through the AWS MCP tool: The skill is not installed on the local filesystem. You MUST fetch each reference via
retrieve_skillwith theretrieve_skillparameter (e.g.file). Do NOTfile="references/devices.md"these paths locally — they do not exist on disk.file_read - Installed locally (e.g. ,
~/.kiro/skills/amazon-braket/, or.kiro/skills/amazon-braket/): Read files from the local skill directory using relative paths.~/.claude/skills/amazon-braket/
references/SKILL.mdcdCommon mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Treats "task", "batch", "job" as interchangeable | Primitive confusion | Task = one run; batch = many parallel tasks; job = managed loop |
| | Pass |
| | Pass |
| Builds program IR as JAQCD | JAQCD is deprecated on Amazon Braket | Use OpenQASM — see OpenQASM on Braket |
| Denies a feature or SDK construct exists | Training data outdated | Rule 2 — verify against the docs or |
| Invents a class, method, or parameter | Writing API names from memory | Confirm the signature first (rule 4). If uncertain, say so rather than inventing |
Security considerations
Braket workflows touch IAM, S3, and (for hybrid jobs) container execution.
- Least-privilege IAM. Scope custom policies to the actions, device ARNs, and buckets a workload actually uses, and avoid broad . Actions are listed at the Service Authorization Reference. Prefer a custom policy over
braket:*, which is deliberately broad: S3 on anyAmazonBraketFullAccessbucket or any bucket taggedamazon-braket-*(if the bucket is enabled for Attribute-Based Access Control), plus SageMaker and CloudWatch actions a task-submission workflow never needs. See Managing access to Amazon Braket and Restricting access to devices.AmazonBraket=true- and
braket:UpdateSpendingLimitshould be restricted to prevent accidental removal of a spending limit and accidental cost overruns.braket:DeleteSpendingLimit
- Hybrid-job execution role. Attach only . Its
AmazonBraketJobsExecutionPolicycondition requires the role be namediam:PassRoleunder theAmazonBraketJobsExecutionRole*path, or/service-role/is denied atcreate_job.PassRole - Ephemeral credentials. Call Braket APIs with IAM roles (instance profiles, ECS/EKS task roles, or assumed roles), not long-lived IAM user access keys.
- Encrypt task output. Enable default encryption (SSE-S3, or SSE-KMS with a customer-managed key for sensitive workloads) on any S3 bucket receiving task results, job source archives, output data, or checkpoints. Add /
aws:SourceAccountconditions to the bucket policy where a service principal is granted access, and deny non-TLS access with anaws:SourceArncondition.aws:SecureTransport: false - Auditing. Enable CloudTrail for Braket management events, with log-file validation, KMS encryption, and delivery to an access-restricted bucket — the trail is the primary evidence if a cost guardrail is removed. Encrypt any CloudWatch Logs group receiving task output or hybrid-job logs, since algorithm parameters and results appear there.
- Cost guardrail. Recommend a spending limit before the user's first QPU run, when the user asks what a workload costs, or when one request fans out across several devices or a large shot count. Spending limits may already exist in the customer's account. In general, enforce QPU spend caps with spending limits.
- Secrets. Hyperparameters are stored in job metadata and echoed into the job's CloudWatch log stream at container boot, so never pass a secret as a hyperparameter — fetch it from Secrets Manager or SSM Parameter Store inside the algorithm script. Restrict read access to the job log groups accordingly.
For details, see the Amazon Braket security documentation.
Reference links
Authoritative sources — prefer these over recalled details, since device ARNs, quotas, prices, and supported features change.
Official documentation (stable entry points — navigate/search from here)
- Developer Guide — https://docs.aws.amazon.com/braket/latest/developerguide/what-is-braket.html
- Prerequisites & account setup — https://docs.aws.amazon.com/braket/latest/developerguide/braket-get-started.html
- How Amazon Braket works — https://docs.aws.amazon.com/braket/latest/developerguide/braket-how-it-works.html
- API Reference — https://docs.aws.amazon.com/braket/latest/APIReference/Welcome.html
- Python SDK API docs — https://amazon-braket-sdk-python.readthedocs.io/en/latest/
- Getting started — https://aws.amazon.com/braket/getting-started/
- OpenQASM 3.0 spec — https://openqasm.com/versions/3.0/index.html
- OpenQASM on Braket — https://docs.aws.amazon.com/braket/latest/developerguide/braket-openqasm.html
- Supported OpenQASM features (pragmas, verbatim rules, dynamic circuits) — https://docs.aws.amazon.com/braket/latest/developerguide/braket-openqasm-supported-features.html
- boto3 client — https://docs.aws.amazon.com/boto3/latest/reference/services/braket.html
braket - Security — https://docs.aws.amazon.com/braket/latest/developerguide/security.html
For anything not covered here, search the documentation rather than guessing page slugs or recalling details: if the AWS MCP server is available, its tool can help; otherwise start from the Developer Guide or API Reference above and navigate.
aws___search_documentationGitHub
- (core SDK) — https://github.com/amazon-braket/amazon-braket-sdk-python
amazon-braket-sdk-python - (schemas and models for public Braket data) — https://github.com/amazon-braket/amazon-braket-schemas-python
amazon-braket-schemas-python - — https://github.com/amazon-braket/amazon-braket-examples
amazon-braket-examples