2020/08/13 - Braket - 6 new api methods
Changes Update braket client to latest version
Creates a quantum task.
See also: AWS API Documentation
Request Syntax
client.create_quantum_task( action='string', clientToken='string', deviceArn='string', deviceParameters='string', outputS3Bucket='string', outputS3KeyPrefix='string', shots=123 )
string
[REQUIRED]
The action associated with the task.
string
[REQUIRED]
The client token associated with the request.
This field is autopopulated if not provided.
string
[REQUIRED]
The ARN of the device to run the task on.
string
The parameters for the device to run the task on.
string
[REQUIRED]
The S3 bucket to store task result files in.
string
[REQUIRED]
The key prefix for the location in the S3 bucket to store task results in.
integer
[REQUIRED]
The number of shots to use for the task.
dict
Response Syntax
{ 'quantumTaskArn': 'string' }
Response Structure
(dict) --
quantumTaskArn (string) --
The ARN of the task created by the request.
Retrieves the specified quantum task.
See also: AWS API Documentation
Request Syntax
client.get_quantum_task( quantumTaskArn='string' )
string
[REQUIRED]
the ARN of the task to retrieve.
dict
Response Syntax
{ 'createdAt': datetime(2015, 1, 1), 'deviceArn': 'string', 'deviceParameters': 'string', 'endedAt': datetime(2015, 1, 1), 'failureReason': 'string', 'outputS3Bucket': 'string', 'outputS3Directory': 'string', 'quantumTaskArn': 'string', 'shots': 123, 'status': 'CANCELLED'|'CANCELLING'|'COMPLETED'|'CREATED'|'FAILED'|'QUEUED'|'RUNNING' }
Response Structure
(dict) --
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.
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.
shots (integer) --
The number of shots used in the task.
status (string) --
The status of the task.
Cancels the specified task.
See also: AWS API Documentation
Request Syntax
client.cancel_quantum_task( clientToken='string', quantumTaskArn='string' )
string
[REQUIRED]
The client token associated with the request.
This field is autopopulated if not provided.
string
[REQUIRED]
The ARN of the task to cancel.
dict
Response Syntax
{ 'cancellationStatus': 'CANCELLED'|'CANCELLING', 'quantumTaskArn': 'string' }
Response Structure
(dict) --
cancellationStatus (string) --
The status of the cancellation request.
quantumTaskArn (string) --
The ARN of the task.
Searches for devices using the specified filters.
See also: AWS API Documentation
Request Syntax
client.search_devices( filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
list
[REQUIRED]
The filter values to use to search for a device.
(dict) --
The filter to use for searching devices.
name (string) -- [REQUIRED]
The name to use to filter results.
values (list) -- [REQUIRED]
The values to use to filter results.
(string) --
integer
The maximum number of results to return in the response.
string
A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
dict
Response Syntax
{ 'devices': [ { 'deviceArn': 'string', 'deviceName': 'string', 'deviceStatus': 'QPU'|'SIMULATOR', 'deviceType': 'OFFLINE'|'ONLINE', 'providerName': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
devices (list) --
An array of DeviceSummary objects for devices that match the specified filter values.
(dict) --
Includes information about the device.
deviceArn (string) --
The ARN of the device.
deviceName (string) --
The name of the device.
deviceStatus (string) --
The status of the device.
deviceType (string) --
The type of the device.
providerName (string) --
The provider of the device.
nextToken (string) --
A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
Retrieves the devices available in Amazon Braket.
See also: AWS API Documentation
Request Syntax
client.get_device( deviceArn='string' )
string
[REQUIRED]
The ARN of the device to retrieve.
dict
Response Syntax
{ 'deviceArn': 'string', 'deviceCapabilities': 'string', 'deviceName': 'string', 'deviceStatus': 'QPU'|'SIMULATOR', 'deviceType': 'OFFLINE'|'ONLINE', 'providerName': 'string' }
Response Structure
(dict) --
deviceArn (string) --
The ARN of the device.
deviceCapabilities (string) --
Details about the capabilities of the device.
deviceName (string) --
The name of the device.
deviceStatus (string) --
The status of the device.
deviceType (string) --
The type of the device.
providerName (string) --
The name of the partner company for the device.
Searches for tasks that match the specified filter values.
See also: AWS API Documentation
Request Syntax
client.search_quantum_tasks( filters=[ { 'name': 'string', 'operator': 'BETWEEN'|'EQUAL'|'GT'|'GTE'|'LT'|'LTE', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
list
[REQUIRED]
Array of SearchQuantumTasksFilter objects.
(dict) --
A filter to use to search for tasks.
name (string) -- [REQUIRED]
The name of the device used for the task.
operator (string) -- [REQUIRED]
An operator to use in the filter.
values (list) -- [REQUIRED]
The values to use for the filter.
(string) --
integer
Maximum number of results to return in the response.
string
A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
dict
Response Syntax
{ 'nextToken': 'string', 'quantumTasks': [ { 'createdAt': datetime(2015, 1, 1), 'deviceArn': 'string', 'endedAt': datetime(2015, 1, 1), 'outputS3Bucket': 'string', 'outputS3Directory': 'string', 'quantumTaskArn': 'string', 'shots': 123, 'status': 'CANCELLED'|'CANCELLING'|'COMPLETED'|'CREATED'|'FAILED'|'QUEUED'|'RUNNING' }, ] }
Response Structure
(dict) --
nextToken (string) --
A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
quantumTasks (list) --
An array of QuantumTaskSummary objects for tasks that match the specified filters.
(dict) --
Includes information about a quantum task.
createdAt (datetime) --
The time at which the task was created.
deviceArn (string) --
The ARN of the device the task ran on.
endedAt (datetime) --
The time at which the task finished.
outputS3Bucket (string) --
The S3 bucket where the task result file is stored..
outputS3Directory (string) --
The folder in the S3 bucket where the task result file is stored.
quantumTaskArn (string) --
The ARN of the task.
shots (integer) --
The shots used for the task.
status (string) --
The status of the task.