AWS Braket backend implementation for QClojure quantum computing library.
This namespace provides a backend that connects QClojure to Amazon Braket quantum computing services, supporting both simulators and quantum hardware devices.
AWS Braket backend implementation for QClojure quantum computing library. This namespace provides a backend that connects QClojure to Amazon Braket quantum computing services, supporting both simulators and quantum hardware devices.
(create-braket-backend)(create-braket-backend config)Create a new Braket backend instance.
Parameters: config - Configuration map with keys: :region - AWS region (optional, defaults to us-east-1) :device-arn - ARN of the Braket device (optional, defaults to simulator) :shots - Default number of shots (optional, defaults to 1000) :max-parallel-shots - Maximum parallel jobs (optional, defaults to 10) :device-type - Type of device :quantum or :simulator (optional) :s3-bucket - S3 bucket for storing Braket task results (REQUIRED) :s3-key-prefix - S3 key prefix for organizing results (optional, defaults to "braket-results/")
Returns: BraketBackend instance
Example: (create-braket-backend {:region "us-west-2" :device-arn "arn:aws:braket:::device/quantum-simulator/amazon/sv1" :s3-bucket "my-braket-results-bucket" :s3-key-prefix "experiments/" :shots 1000})
Note: AWS Braket requires an S3 bucket to store quantum task results. The S3 bucket must exist and the AWS credentials must have read/write permissions to it.
Create a new Braket backend instance.
Parameters:
config - Configuration map with keys:
:region - AWS region (optional, defaults to us-east-1)
:device-arn - ARN of the Braket device (optional, defaults to simulator)
:shots - Default number of shots (optional, defaults to 1000)
:max-parallel-shots - Maximum parallel jobs (optional, defaults to 10)
:device-type - Type of device :quantum or :simulator (optional)
:s3-bucket - S3 bucket for storing Braket task results (REQUIRED)
:s3-key-prefix - S3 key prefix for organizing results (optional, defaults to "braket-results/")
Returns:
BraketBackend instance
Example:
(create-braket-backend {:region "us-west-2"
:device-arn "arn:aws:braket:::device/quantum-simulator/amazon/sv1"
:s3-bucket "my-braket-results-bucket"
:s3-key-prefix "experiments/"
:shots 1000})
Note:
AWS Braket requires an S3 bucket to store quantum task results. The S3 bucket must exist
and the AWS credentials must have read/write permissions to it.(create-braket-client)(create-braket-client config-overrides)Creates an AWS Braket client with optional configuration overrides.
Args: config-overrides - Map of configuration overrides (optional)
Returns: AWS Braket client instance
Example: (create-braket-client {:region "us-west-2"})
Creates an AWS Braket client with optional configuration overrides.
Args:
config-overrides - Map of configuration overrides (optional)
Returns:
AWS Braket client instance
Example:
(create-braket-client {:region "us-west-2"})(create-braket-qpu device-arn config)Create a Braket QPU backend for quantum hardware execution.
Parameters: device-arn - ARN of the specific QPU device config - Configuration map that must include :s3-bucket and can include: :region - AWS region where the device is located (optional, defaults to us-east-1)
Returns: BraketBackend configured for the specified QPU
Example: (create-braket-qpu "arn:aws:braket:us-east-1::device/qpu/rigetti/Aspen-M-3" {:s3-bucket "my-braket-results" :region "us-east-1"})
Create a Braket QPU backend for quantum hardware execution.
Parameters:
device-arn - ARN of the specific QPU device
config - Configuration map that must include :s3-bucket and can include:
:region - AWS region where the device is located (optional, defaults to us-east-1)
Returns:
BraketBackend configured for the specified QPU
Example:
(create-braket-qpu "arn:aws:braket:us-east-1::device/qpu/rigetti/Aspen-M-3"
{:s3-bucket "my-braket-results"
:region "us-east-1"})(create-braket-simulator config)Create a Braket simulator backend for local testing.
Parameters: config - Configuration map that must include :s3-bucket
Returns: BraketBackend configured for the default AWS Braket simulator
Example: (create-braket-simulator {:s3-bucket "my-braket-results"})
Create a Braket simulator backend for local testing.
Parameters:
config - Configuration map that must include :s3-bucket
Returns:
BraketBackend configured for the default AWS Braket simulator
Example:
(create-braket-simulator {:s3-bucket "my-braket-results"})(quantum-task backend task-arn)Get quantum task details from AWS Braket
Get quantum task details from AWS Braket
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |