Braket

2025/08/13 - Braket - 1 updated api methods

Changes  Add support for Braket program sets.

GetQuantumTask (updated) Link ΒΆ
Changes (response)
{'actionMetadata': {'actionType': 'string',
                    'executableCount': 'long',
                    'programCount': 'long'},
 'numSuccessfulShots': 'long'}

Retrieves the specified quantum task.

See also: AWS API Documentation

Request Syntax

client.get_quantum_task(
    quantumTaskArn='string',
    additionalAttributeNames=[
        'QueueInfo',
    ]
)
type quantumTaskArn:

string

param quantumTaskArn:

[REQUIRED]

The ARN of the quantum task to retrieve.

type additionalAttributeNames:

list

param additionalAttributeNames:

A list of attributes to return additional information for. Only the QueueInfo additional attribute name is currently supported.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'quantumTaskArn': 'string',
    'status': 'CREATED'|'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
    'failureReason': 'string',
    'deviceArn': 'string',
    'deviceParameters': 'string',
    'shots': 123,
    'outputS3Bucket': 'string',
    'outputS3Directory': 'string',
    'createdAt': datetime(2015, 1, 1),
    'endedAt': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    },
    'jobArn': 'string',
    'queueInfo': {
        'queue': 'QUANTUM_TASKS_QUEUE'|'JOBS_QUEUE',
        'position': 'string',
        'queuePriority': 'Normal'|'Priority',
        'message': 'string'
    },
    'associations': [
        {
            'arn': 'string',
            'type': 'RESERVATION_TIME_WINDOW_ARN'
        },
    ],
    'numSuccessfulShots': 123,
    'actionMetadata': {
        'actionType': 'string',
        'programCount': 123,
        'executableCount': 123
    }
}

Response Structure

  • (dict) --

    • quantumTaskArn (string) --

      The ARN of the quantum task.

    • status (string) --

      The status of the quantum task.

    • failureReason (string) --

      The reason that a quantum task failed.

    • deviceArn (string) --

      The ARN of the device the quantum task was run on.

    • deviceParameters (string) --

      The parameters for the device on which the quantum task ran.

    • shots (integer) --

      The number of shots used in the quantum task.

    • outputS3Bucket (string) --

      The S3 bucket where quantum task results are stored.

    • outputS3Directory (string) --

      The folder in the S3 bucket where quantum task results are stored.

    • createdAt (datetime) --

      The time at which the quantum task was created.

    • endedAt (datetime) --

      The time at which the quantum task ended.

    • tags (dict) --

      The tags that belong to this quantum task.

      • (string) --

        • (string) --

    • jobArn (string) --

      The ARN of the Amazon Braket job associated with the quantum task.

    • queueInfo (dict) --

      Queue information for the requested quantum task. Only returned if QueueInfo is specified in the additionalAttributeNames" field in the GetQuantumTask API request.

      • queue (string) --

        The name of the queue.

      • position (string) --

        Current position of the quantum task in the quantum tasks queue.

      • queuePriority (string) --

        Optional. Specifies the priority of the queue. Quantum tasks in a priority queue are processed before the quantum tasks in a normal queue.

      • message (string) --

        Optional. Provides more information about the queue position. For example, if the quantum task is complete and no longer in the queue, the message field contains that information.

    • associations (list) --

      The list of Amazon Braket resources associated with the quantum task.

      • (dict) --

        The Amazon Braket resource and the association type.

        • arn (string) --

          The Amazon Braket resource arn.

        • type (string) --

          The association type for the specified Amazon Braket resource arn.

    • numSuccessfulShots (integer) --

      The number of successful shots for the quantum task. This is available after a successfully completed quantum task.

    • actionMetadata (dict) --

      Metadata about the action performed by the quantum task, including information about the type of action and program counts.

      • actionType (string) --

        The type of action associated with the quantum task.

      • programCount (integer) --

        The number of programs in a program set. This is only available for a Program Set.

      • executableCount (integer) --

        The number of executables in a program set. This is only available for a Program Set.