Braket / Client / get_quantum_task

get_quantum_task#

Braket.Client.get_quantum_task(**kwargs)#

Retrieves the specified quantum task.

See also: AWS API Documentation

Request Syntax

response = client.get_quantum_task(
    additionalAttributeNames=[
        'QueueInfo',
    ],
    quantumTaskArn='string'
)
Parameters:
  • additionalAttributeNames (list) –

    A list of attributes to return information for.

    • (string) –

  • quantumTaskArn (string) –

    [REQUIRED]

    The ARN of the task to retrieve.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • 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.

    • createdAt (datetime) –

      The time at which the task was created.

    • deviceArn (string) –

      The ARN of the device the task was run on.

    • deviceParameters (string) –

      The parameters for the device on which the task ran.

    • endedAt (datetime) –

      The time at which the task ended.

    • failureReason (string) –

      The reason that a task failed.

    • jobArn (string) –

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

    • outputS3Bucket (string) –

      The S3 bucket where task results are stored.

    • outputS3Directory (string) –

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

    • quantumTaskArn (string) –

      The ARN of the 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.

      • message (string) –

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

      • position (string) –

        Current position of the task in the quantum tasks queue.

      • queue (string) –

        The name of the queue.

      • queuePriority (string) –

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

    • shots (integer) –

      The number of shots used in the task.

    • status (string) –

      The status of the task.

    • tags (dict) –

      The tags that belong to this task.

      • (string) –

        • (string) –

Exceptions

  • Braket.Client.exceptions.ResourceNotFoundException

  • Braket.Client.exceptions.AccessDeniedException

  • Braket.Client.exceptions.ThrottlingException

  • Braket.Client.exceptions.InternalServiceException

  • Braket.Client.exceptions.ValidationException