quantum_tasks
Creates, updates, deletes, gets or lists a quantum_tasks resource.
Overview
| Name | quantum_tasks |
| Type | Resource |
| Id | aws.braket.quantum_tasks |
Fields
The following fields are returned by SELECT queries:
- get_quantum_task
- search_quantum_tasks
| Name | Datatype | Description |
|---|---|---|
action_metadata | object | Metadata about the action performed by the quantum task, including information about the type of action and program counts. |
associations | array | The list of Amazon Braket resources associated with the quantum task. |
created_at | string (date-time) | The time at which the quantum task was created. |
device_arn | string | The ARN of the device the quantum task was run on. |
device_parameters | string | The parameters for the device on which the quantum task ran. |
ended_at | string (date-time) | The time at which the quantum task ended. |
experimental_capabilities | object | Enabled experimental capabilities for quantum hardware. Note that the use of these features may impact device capabilities and performance beyond its standard specifications. |
failure_reason | string | The reason that a quantum task failed. |
job_arn | string | The ARN of the Amazon Braket job associated with the quantum task. (pattern: <code>arn:aws[a-z-]:braket:[a-z0-9-]+:[0-9]{12}:job/.</code>) |
num_successful_shots | integer (int64) | The number of successful shots for the quantum task. This is available after a successfully completed quantum task. |
output_s3_bucket | string | The S3 bucket where quantum task results are stored. |
output_s3_directory | string | The folder in the S3 bucket where quantum task results are stored. |
quantum_task_arn | string | The ARN of the quantum task. |
queue_info | object | Queue information for the requested quantum task. Only returned if QueueInfo is specified in the additionalAttributeNames" field in the GetQuantumTask API request. |
shots | integer (int64) | The number of shots used in the quantum task. |
status | string | The status of the quantum task. (CREATED, QUEUED, RUNNING, COMPLETED, FAILED, CANCELLING, CANCELLED) |
tags | object | The tags that belong to this quantum task. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The time at which the quantum task was created. |
device_arn | string | The ARN of the device the quantum task ran on. |
ended_at | string (date-time) | The time at which the quantum task finished. |
output_s3_bucket | string | The S3 bucket where the quantum task result file is stored. |
output_s3_directory | string | The folder in the S3 bucket where the quantum task result file is stored. |
quantum_task_arn | string | The ARN of the quantum task. |
shots | integer (int64) | The shots used for the quantum task. |
status | string | The status of the quantum task. (CREATED, QUEUED, RUNNING, COMPLETED, FAILED, CANCELLING, CANCELLED) |
tags | object | Displays the key, value pairs of tags associated with this quantum task. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_quantum_task | select | quantum_task_arn, region | additionalAttributeNames | Retrieves the specified quantum task. |
search_quantum_tasks | select | region | Searches for tasks that match the specified filter values. | |
create_quantum_task | insert | region, clientToken, deviceArn, shots, outputS3Bucket, outputS3KeyPrefix, action | Creates a quantum task. | |
cancel_quantum_task | exec | quantum_task_arn, region, clientToken | Cancels the specified task. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
quantum_task_arn | string | The ARN of the quantum task to cancel. |
region | string | AWS region (default: us-east-1) |
additionalAttributeNames | array | A list of attributes to return additional information for. Only the QueueInfo additional attribute name is currently supported. |
SELECT examples
- get_quantum_task
- search_quantum_tasks
Retrieves the specified quantum task.
SELECT
action_metadata,
associations,
created_at,
device_arn,
device_parameters,
ended_at,
experimental_capabilities,
failure_reason,
job_arn,
num_successful_shots,
output_s3_bucket,
output_s3_directory,
quantum_task_arn,
queue_info,
shots,
status,
tags
FROM aws.braket.quantum_tasks
WHERE quantum_task_arn = '{{ quantum_task_arn }}' -- required
AND region = '{{ region }}' -- required
AND additionalAttributeNames = '{{ additionalAttributeNames }}'
;
Searches for tasks that match the specified filter values.
SELECT
created_at,
device_arn,
ended_at,
output_s3_bucket,
output_s3_directory,
quantum_task_arn,
shots,
status,
tags
FROM aws.braket.quantum_tasks
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_quantum_task
- Manifest
Creates a quantum task.
INSERT INTO aws.braket.quantum_tasks (
clientToken,
deviceArn,
deviceParameters,
shots,
outputS3Bucket,
outputS3KeyPrefix,
action,
tags,
jobToken,
associations,
experimentalCapabilities,
region
)
SELECT
'{{ clientToken }}' /* required */,
'{{ deviceArn }}' /* required */,
'{{ deviceParameters }}',
{{ shots }} /* required */,
'{{ outputS3Bucket }}' /* required */,
'{{ outputS3KeyPrefix }}' /* required */,
'{{ action }}' /* required */,
'{{ tags }}',
'{{ jobToken }}',
'{{ associations }}',
'{{ experimentalCapabilities }}',
'{{ region }}'
RETURNING
quantum_task_arn
;
# Description fields are for documentation purposes
- name: quantum_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the quantum_tasks resource.
- name: clientToken
value: "{{ clientToken }}"
- name: deviceArn
value: "{{ deviceArn }}"
- name: deviceParameters
value: "{{ deviceParameters }}"
- name: shots
value: {{ shots }}
- name: outputS3Bucket
value: "{{ outputS3Bucket }}"
- name: outputS3KeyPrefix
value: "{{ outputS3KeyPrefix }}"
- name: action
value: "{{ action }}"
- name: tags
value: "{{ tags }}"
- name: jobToken
value: "{{ jobToken }}"
- name: associations
value:
- arn: "{{ arn }}"
type_: "{{ type_ }}"
- name: experimentalCapabilities
description: |
Enabled experimental capabilities for quantum hardware. Note that the use of these features may impact device capabilities and performance beyond its standard specifications.
value:
enabled: "{{ enabled }}"
Lifecycle Methods
- cancel_quantum_task
Cancels the specified task.
EXEC aws.braket.quantum_tasks.cancel_quantum_task
@quantum_task_arn='{{ quantum_task_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}"
}'
;