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.
Protocol for interacting with AWS Braket
Protocol for interacting with AWS Braket
(apply-error-mitigation this circuit options)
Apply error mitigation strategies to a circuit before execution
Apply error mitigation strategies to a circuit before execution
(get-device-info this device-arn)
Get comprehensive device information including provider-specific details
Get comprehensive device information including provider-specific details
(get-device-noise-model this device-arn)
Get the noise model for a specific device
Get the noise model for a specific device
(get-provider-info this provider)
Get information about a specific QPU provider
Get information about a specific QPU provider
(validate-circuit this circuit)
Validate if a circuit can run on the configured device
Validate if a circuit can run on the configured device
(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"})
(create-pricing-client)
(create-pricing-client config-overrides)
Creates an AWS Pricing client with optional configuration overrides.
Args: config-overrides - Map of configuration overrides (optional)
Returns: AWS Pricing client instance
Note: The Pricing API is only available in us-east-1 and ap-south-1 regions
Creates an AWS Pricing client with optional configuration overrides. Args: config-overrides - Map of configuration overrides (optional) Returns: AWS Pricing client instance Note: The Pricing API is only available in us-east-1 and ap-south-1 regions
(create-s3-client)
(create-s3-client config-overrides)
Creates an AWS S3 client with optional configuration overrides.
Args: config-overrides - Map of configuration overrides (optional)
Returns: AWS S3 client instance
Creates an AWS S3 client with optional configuration overrides. Args: config-overrides - Map of configuration overrides (optional) Returns: AWS S3 client instance
(optimize-circuit-for-device circuit device-info & [options])
Optimize a circuit for a specific AWS Braket device using QClojure's hardware optimization.
This function integrates with QClojure's comprehensive hardware optimization pipeline, including topology-aware transformations, gate decomposition, and qubit mapping.
Parameters:
Returns: Optimized circuit with transformation metadata
Optimize a circuit for a specific AWS Braket device using QClojure's hardware optimization. This function integrates with QClojure's comprehensive hardware optimization pipeline, including topology-aware transformations, gate decomposition, and qubit mapping. Parameters: - circuit: QClojure circuit specification - device-info: Device information including provider and constraints - options: Optional optimization settings Returns: Optimized circuit with transformation metadata
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 |