CreateQuantumTask - Amazon Braket

CreateQuantumTask

Creates a quantum task.

Request Syntax

POST /quantum-task HTTP/1.1 Content-type: application/json { "action": "string", "associations": [ { "arn": "string", "type": "string" } ], "clientToken": "string", "deviceArn": "string", "deviceParameters": "string", "jobToken": "string", "outputS3Bucket": "string", "outputS3KeyPrefix": "string", "shots": number, "tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

action

The action associated with the quantum task.

Type: String

Required: Yes

associations

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

Type: Array of Association objects

Array Members: Minimum number of 0 items. Maximum number of 1 item.

Required: No

clientToken

The client token associated with the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

deviceArn

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: Yes

deviceParameters

The parameters for the device to run the quantum task on.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 48000.

Required: No

jobToken

The token for an Amazon Braket hybrid job that associates it with the quantum task.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: No

outputS3Bucket

The S3 bucket to store quantum task result files in.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Required: Yes

outputS3KeyPrefix

The key prefix for the location in the S3 bucket to store quantum task results in.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: Yes

shots

The number of shots to use for the quantum task.

Type: Long

Valid Range: Minimum value of 0.

Required: Yes

tags

Tags to be added to the quantum task you're creating.

Type: String to string map

Required: No

Response Syntax

HTTP/1.1 201 Content-type: application/json { "quantumTaskArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

quantumTaskArn

The ARN of the quantum task created by the request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient permissions to perform this action.

HTTP Status Code: 403

DeviceOfflineException

The specified device is currently offline.

HTTP Status Code: 424

DeviceRetiredException

The specified device has been retired.

HTTP Status Code: 410

InternalServiceException

The request failed because of an unknown error.

HTTP Status Code: 500

ServiceQuotaExceededException

The request failed because a service quota is exceeded.

HTTP Status Code: 402

ThrottlingException

The API throttling rate limit is exceeded.

HTTP Status Code: 429

ValidationException

The input request failed to satisfy constraints expected by Amazon Braket.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: