Functions for managing and querying AWS Braket quantum devices, including QPUs and simulators.
Functions for managing and querying AWS Braket quantum devices, including QPUs and simulators.
(braket-devices backend)Call AWS Braket API to list available devices
Call AWS Braket API to list available devices
(device-cost device-or-capabilities)Extract device-cost pricing from a device's capabilities.
Reads the device-cost map from the capabilities service properties returned by the GetDevice API. The cost map contains :price and :unit (either "shot" for QPUs or "minute" for simulators).
Parameters:
Returns: {:price <number>, :unit <string>} or nil if not available.
Examples: {:price 0.03, :unit "shot"} ;; IonQ Aria QPU {:price 0.075, :unit "minute"} ;; SV1 simulator
Extract device-cost pricing from a device's capabilities.
Reads the device-cost map from the capabilities service properties
returned by the GetDevice API. The cost map contains :price and :unit
(either "shot" for QPUs or "minute" for simulators).
Parameters:
- device-or-capabilities: Either a device map with :capabilities key,
or a capabilities map directly
Returns:
{:price <number>, :unit <string>} or nil if not available.
Examples:
{:price 0.03, :unit "shot"} ;; IonQ Aria QPU
{:price 0.075, :unit "minute"} ;; SV1 simulator(device-info backend)(device-info backend device-arn)Get detailed device information from AWS Braket GetDevice API.
Fetches device details including capabilities with parsed device-cost data. The result includes the full capabilities map with service properties such as device-cost, execution-windows, and shots-range.
Parameters:
Returns: Device info map with :capabilities key containing parsed JSON capabilities, or {:error ...} on failure.
Get detailed device information from AWS Braket GetDevice API.
Fetches device details including capabilities with parsed device-cost data.
The result includes the full capabilities map with service properties
such as device-cost, execution-windows, and shots-range.
Parameters:
- backend: BraketBackend instance
- device-arn: (optional) Device ARN string; defaults to current device
Returns:
Device info map with :capabilities key containing parsed JSON capabilities,
or {:error ...} on failure.(devices backend)Fetch available devices from AWS Braket and update backend state.
Calls SearchDevices API and stores the device list in backend state.
Parameters:
Returns: Collection of device maps.
Fetch available devices from AWS Braket and update backend state. Calls SearchDevices API and stores the device list in backend state. Parameters: - backend: BraketBackend instance Returns: Collection of device maps.
(fetch-device-cost backend device-arn)Fetch device-cost pricing for a device ARN via the GetDevice API.
Calls device-info to get the full capabilities and extracts the device-cost. Returns nil on API errors.
Parameters:
Returns: {:price <number>, :unit <string>} or nil on failure.
Fetch device-cost pricing for a device ARN via the GetDevice API.
Calls device-info to get the full capabilities and extracts the device-cost.
Returns nil on API errors.
Parameters:
- backend: BraketBackend instance
- device-arn: Device ARN string
Returns:
{:price <number>, :unit <string>} or nil on failure.(parse-device-info device-arn)Parse device information from AWS Braket device ARN
Parse device information from AWS Braket device ARN
(select-device backend device)Select a device for circuit execution on this backend.
When a device ARN string is provided, looks up the device from the cached device list. Fetches device capabilities via GetDevice API if not already present, caching the device-cost for pricing.
Parameters:
Returns: The selected device map (now stored in backend state as :current-device).
Select a device for circuit execution on this backend. When a device ARN string is provided, looks up the device from the cached device list. Fetches device capabilities via GetDevice API if not already present, caching the device-cost for pricing. Parameters: - backend: BraketBackend instance - device: Device map or device ARN string Returns: The selected device map (now stored in backend state as :current-device).
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 |