Skip to main content

quantum_tasks

Creates, updates, deletes, gets or lists a quantum_tasks resource.

Overview

Namequantum_tasks
TypeResource
Idaws.braket.quantum_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_metadataobjectMetadata about the action performed by the quantum task, including information about the type of action and program counts.
associationsarrayThe list of Amazon Braket resources associated with the quantum task.
created_atstring (date-time)The time at which the quantum task was created.
device_arnstringThe ARN of the device the quantum task was run on.
device_parametersstringThe parameters for the device on which the quantum task ran.
ended_atstring (date-time)The time at which the quantum task ended.
experimental_capabilitiesobjectEnabled experimental capabilities for quantum hardware. Note that the use of these features may impact device capabilities and performance beyond its standard specifications.
failure_reasonstringThe reason that a quantum task failed.
job_arnstringThe 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_shotsinteger (int64)The number of successful shots for the quantum task. This is available after a successfully completed quantum task.
output_s3_bucketstringThe S3 bucket where quantum task results are stored.
output_s3_directorystringThe folder in the S3 bucket where quantum task results are stored.
quantum_task_arnstringThe ARN of the quantum task.
queue_infoobjectQueue information for the requested quantum task. Only returned if QueueInfo is specified in the additionalAttributeNames" field in the GetQuantumTask API request.
shotsinteger (int64)The number of shots used in the quantum task.
statusstringThe status of the quantum task. (CREATED, QUEUED, RUNNING, COMPLETED, FAILED, CANCELLING, CANCELLED)
tagsobjectThe tags that belong to this quantum task.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_quantum_taskselectquantum_task_arn, regionadditionalAttributeNamesRetrieves the specified quantum task.
search_quantum_tasksselectregionSearches for tasks that match the specified filter values.
create_quantum_taskinsertregion, clientToken, deviceArn, shots, outputS3Bucket, outputS3KeyPrefix, actionCreates a quantum task.
cancel_quantum_taskexecquantum_task_arn, region, clientTokenCancels 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.

NameDatatypeDescription
quantum_task_arnstringThe ARN of the quantum task to cancel.
regionstringAWS region (default: us-east-1)
additionalAttributeNamesarrayA list of attributes to return additional information for. Only the QueueInfo additional attribute name is currently supported.

SELECT examples

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 }}'
;

INSERT examples

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
;

Lifecycle Methods

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 }}"
}'
;