Table of Contents
Braket.
Client
¶A low-level client representing Braket
The Amazon Braket API Reference provides information about the operations and structures supported in Amazon Braket.
Additional Resources:
import boto3
client = boto3.client('braket')
These are the available methods:
can_paginate()
cancel_job()
cancel_quantum_task()
close()
create_job()
create_quantum_task()
get_device()
get_job()
get_paginator()
get_quantum_task()
get_waiter()
list_tags_for_resource()
search_devices()
search_jobs()
search_quantum_tasks()
tag_resource()
untag_resource()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.cancel_job
(**kwargs)¶Cancels an Amazon Braket job.
See also: AWS API Documentation
Request Syntax
response = client.cancel_job(
jobArn='string'
)
[REQUIRED]
The ARN of the Amazon Braket job to cancel.
{
'cancellationStatus': 'CANCELLING'|'CANCELLED',
'jobArn': 'string'
}
Response Structure
The status of the job cancellation request.
The ARN of the Amazon Braket job.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ConflictException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
cancel_quantum_task
(**kwargs)¶Cancels the specified task.
See also: AWS API Documentation
Request Syntax
response = client.cancel_quantum_task(
clientToken='string',
quantumTaskArn='string'
)
[REQUIRED]
The client token associated with the request.
This field is autopopulated if not provided.
[REQUIRED]
The ARN of the task to cancel.
dict
Response Syntax
{
'cancellationStatus': 'CANCELLING'|'CANCELLED',
'quantumTaskArn': 'string'
}
Response Structure
(dict) --
cancellationStatus (string) --
The status of the cancellation request.
quantumTaskArn (string) --
The ARN of the task.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ConflictException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
close
()¶Closes underlying endpoint connections.
create_job
(**kwargs)¶Creates an Amazon Braket job.
See also: AWS API Documentation
Request Syntax
response = client.create_job(
algorithmSpecification={
'containerImage': {
'uri': 'string'
},
'scriptModeConfig': {
'compressionType': 'NONE'|'GZIP',
'entryPoint': 'string',
's3Uri': 'string'
}
},
checkpointConfig={
'localPath': 'string',
's3Uri': 'string'
},
clientToken='string',
deviceConfig={
'device': 'string'
},
hyperParameters={
'string': 'string'
},
inputDataConfig=[
{
'channelName': 'string',
'contentType': 'string',
'dataSource': {
's3DataSource': {
's3Uri': 'string'
}
}
},
],
instanceConfig={
'instanceCount': 123,
'instanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
'volumeSizeInGb': 123
},
jobName='string',
outputDataConfig={
'kmsKeyId': 'string',
's3Path': 'string'
},
roleArn='string',
stoppingCondition={
'maxRuntimeInSeconds': 123
},
tags={
'string': 'string'
}
)
[REQUIRED]
Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information about the Python scripts used for entry and training.
The container image used to create an Amazon Braket job.
The URI locating the container image.
Configures the paths to the Python scripts used for entry and training.
The type of compression used by the Python scripts for an Amazon Braket job.
The path to the Python script that serves as the entry point for an Amazon Braket job.
The URI that specifies the S3 path to the Python script module that contains the training script used by an Amazon Braket job.
Information about the output locations for job checkpoint data.
(Optional) The local directory where checkpoints are written. The default directory is /opt/braket/checkpoints/
.
Identifies the S3 path where you want Amazon Braket to store checkpoints. For example, s3://bucket-name/key-name-prefix
.
[REQUIRED]
A unique token that guarantees that the call to this API is idempotent.
This field is autopopulated if not provided.
[REQUIRED]
The quantum processing unit (QPU) or simulator used to create an Amazon Braket job.
The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the training job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
A list of parameters that specify the name and type of input data and where it is located.
A list of parameters that specify the input channels, type of input data, and where it is located.
A named input source that an Amazon Braket job can consume.
The MIME type of the data.
The location of the channel data.
Information about the data stored in Amazon S3 used by the Amazon Braket job.
Depending on the value specified for the S3DataType
, identifies either a key name prefix or a manifest that locates the S3 data source.
[REQUIRED]
Configuration of the resource instances to use while running the hybrid job on Amazon Braket.
Configures the number of resource instances to use while running an Amazon Braket job on Amazon Braket. The default value is 1.
Configures the type resource instances to use while running an Amazon Braket hybrid job.
The size of the storage volume, in GB, that user wants to provision.
[REQUIRED]
The name of the Amazon Braket job.
[REQUIRED]
The path to the S3 location where you want to store job artifacts and the encryption key used to store them.
The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt the job training artifacts at rest using Amazon S3 server-side encryption.
Identifies the S3 path where you want Amazon Braket to store the job training artifacts. For example, s3://bucket-name/key-name-prefix
.
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the users' s3 buckets.
The user-defined criteria that specifies when a job stops running.
The maximum length of time, in seconds, that an Amazon Braket job can run.
A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
dict
Response Syntax
{
'jobArn': 'string'
}
Response Structure
(dict) --
jobArn (string) --
The ARN of the Amazon Braket job created.
Exceptions
Braket.Client.exceptions.ConflictException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.DeviceRetiredException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ServiceQuotaExceededException
Braket.Client.exceptions.ValidationException
create_quantum_task
(**kwargs)¶Creates a quantum task.
See also: AWS API Documentation
Request Syntax
response = client.create_quantum_task(
action='string',
clientToken='string',
deviceArn='string',
deviceParameters='string',
jobToken='string',
outputS3Bucket='string',
outputS3KeyPrefix='string',
shots=123,
tags={
'string': 'string'
}
)
[REQUIRED]
The action associated with the task.
[REQUIRED]
The client token associated with the request.
This field is autopopulated if not provided.
[REQUIRED]
The ARN of the device to run the task on.
[REQUIRED]
The S3 bucket to store task result files in.
[REQUIRED]
The key prefix for the location in the S3 bucket to store task results in.
[REQUIRED]
The number of shots to use for the task.
Tags to be added to the quantum task you're creating.
dict
Response Syntax
{
'quantumTaskArn': 'string'
}
Response Structure
(dict) --
quantumTaskArn (string) --
The ARN of the task created by the request.
Exceptions
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.DeviceOfflineException
Braket.Client.exceptions.DeviceRetiredException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ServiceQuotaExceededException
Braket.Client.exceptions.ValidationException
get_device
(**kwargs)¶Retrieves the devices available in Amazon Braket.
Note
For backwards compatibility with older versions of BraketSchemas, OpenQASM information is omitted from GetDevice API calls. To get this information the user-agent needs to present a recent version of the BraketSchemas (1.8.0 or later). The Braket SDK automatically reports this for you. If you do not see OpenQASM results in the GetDevice response when using a Braket SDK, you may need to set AWS_EXECUTION_ENV environment variable to configure user-agent. See the code examples provided below for how to do this for the AWS CLI, Boto3, and the Go, Java, and JavaScript/TypeScript SDKs.
See also: AWS API Documentation
Request Syntax
response = client.get_device(
deviceArn='string'
)
[REQUIRED]
The ARN of the device to retrieve.
{
'deviceArn': 'string',
'deviceCapabilities': 'string',
'deviceName': 'string',
'deviceStatus': 'ONLINE'|'OFFLINE'|'RETIRED',
'deviceType': 'QPU'|'SIMULATOR',
'providerName': 'string'
}
Response Structure
The ARN of the device.
Details about the capabilities of the device.
The name of the device.
The status of the device.
The type of the device.
The name of the partner company for the device.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
get_job
(**kwargs)¶Retrieves the specified Amazon Braket job.
See also: AWS API Documentation
Request Syntax
response = client.get_job(
jobArn='string'
)
[REQUIRED]
The ARN of the job to retrieve.
{
'algorithmSpecification': {
'containerImage': {
'uri': 'string'
},
'scriptModeConfig': {
'compressionType': 'NONE'|'GZIP',
'entryPoint': 'string',
's3Uri': 'string'
}
},
'billableDuration': 123,
'checkpointConfig': {
'localPath': 'string',
's3Uri': 'string'
},
'createdAt': datetime(2015, 1, 1),
'deviceConfig': {
'device': 'string'
},
'endedAt': datetime(2015, 1, 1),
'events': [
{
'eventType': 'WAITING_FOR_PRIORITY'|'QUEUED_FOR_EXECUTION'|'STARTING_INSTANCE'|'DOWNLOADING_DATA'|'RUNNING'|'DEPRIORITIZED_DUE_TO_INACTIVITY'|'UPLOADING_RESULTS'|'COMPLETED'|'FAILED'|'MAX_RUNTIME_EXCEEDED'|'CANCELLED',
'message': 'string',
'timeOfEvent': datetime(2015, 1, 1)
},
],
'failureReason': 'string',
'hyperParameters': {
'string': 'string'
},
'inputDataConfig': [
{
'channelName': 'string',
'contentType': 'string',
'dataSource': {
's3DataSource': {
's3Uri': 'string'
}
}
},
],
'instanceConfig': {
'instanceCount': 123,
'instanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge',
'volumeSizeInGb': 123
},
'jobArn': 'string',
'jobName': 'string',
'outputDataConfig': {
'kmsKeyId': 'string',
's3Path': 'string'
},
'roleArn': 'string',
'startedAt': datetime(2015, 1, 1),
'status': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'stoppingCondition': {
'maxRuntimeInSeconds': 123
},
'tags': {
'string': 'string'
}
}
Response Structure
Definition of the Amazon Braket job created. Specifies the container image the job uses, information about the Python scripts used for entry and training, and the user-defined metrics used to evaluation the job.
The container image used to create an Amazon Braket job.
The URI locating the container image.
Configures the paths to the Python scripts used for entry and training.
The type of compression used by the Python scripts for an Amazon Braket job.
The path to the Python script that serves as the entry point for an Amazon Braket job.
The URI that specifies the S3 path to the Python script module that contains the training script used by an Amazon Braket job.
The billable time the Amazon Braket job used to complete.
Information about the output locations for job checkpoint data.
(Optional) The local directory where checkpoints are written. The default directory is /opt/braket/checkpoints/
.
Identifies the S3 path where you want Amazon Braket to store checkpoints. For example, s3://bucket-name/key-name-prefix
.
The date and time that the Amazon Braket job was created.
The quantum processing unit (QPU) or simulator used to run the Amazon Braket job.
The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
The date and time that the Amazon Braket job ended.
Details about the type and time events occurred related to the Amazon Braket job.
Details about the type and time events occurred related to the Amazon Braket job.
The type of event that occurred related to the Amazon Braket job.
A message describing the event that occurred related to the Amazon Braket job.
TThe type of event that occurred related to the Amazon Braket job.
A description of the reason why an Amazon Braket job failed, if it failed.
Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the traiing job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
A list of parameters that specify the name and type of input data and where it is located.
A list of parameters that specify the input channels, type of input data, and where it is located.
A named input source that an Amazon Braket job can consume.
The MIME type of the data.
The location of the channel data.
Information about the data stored in Amazon S3 used by the Amazon Braket job.
Depending on the value specified for the S3DataType
, identifies either a key name prefix or a manifest that locates the S3 data source.
The resource instances to use while running the hybrid job on Amazon Braket.
Configures the number of resource instances to use while running an Amazon Braket job on Amazon Braket. The default value is 1.
Configures the type resource instances to use while running an Amazon Braket hybrid job.
The size of the storage volume, in GB, that user wants to provision.
The ARN of the Amazon Braket job.
The name of the Amazon Braket job.
The path to the S3 location where job artifacts are stored and the encryption key used to store them there.
The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt the job training artifacts at rest using Amazon S3 server-side encryption.
Identifies the S3 path where you want Amazon Braket to store the job training artifacts. For example, s3://bucket-name/key-name-prefix
.
The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the s3 buckets of a user.
The date and time that the Amazon Braket job was started.
The status of the Amazon Braket job.
The user-defined criteria that specifies when to stop a job running.
The maximum length of time, in seconds, that an Amazon Braket job can run.
A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_quantum_task
(**kwargs)¶Retrieves the specified quantum task.
See also: AWS API Documentation
Request Syntax
response = client.get_quantum_task(
quantumTaskArn='string'
)
[REQUIRED]
the ARN of the task to retrieve.
{
'createdAt': datetime(2015, 1, 1),
'deviceArn': 'string',
'deviceParameters': 'string',
'endedAt': datetime(2015, 1, 1),
'failureReason': 'string',
'jobArn': 'string',
'outputS3Bucket': 'string',
'outputS3Directory': 'string',
'quantumTaskArn': 'string',
'shots': 123,
'status': 'CREATED'|'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'tags': {
'string': 'string'
}
}
Response Structure
The time at which the task was created.
The ARN of the device the task was run on.
The parameters for the device on which the task ran.
The time at which the task ended.
The reason that a task failed.
The ARN of the Amazon Braket job associated with the quantum task.
The S3 bucket where task results are stored.
The folder in the S3 bucket where task results are stored.
The ARN of the task.
The number of shots used in the task.
The status of the task.
The tags that belong to this task.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
Shows the tags associated with this resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
Specify the resourceArn
for the resource whose tags to display.
{
'tags': {
'string': 'string'
}
}
Response Structure
Displays the key, value pairs of tags associated with this resource.
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
search_devices
(**kwargs)¶Searches for devices using the specified filters.
See also: AWS API Documentation
Request Syntax
response = client.search_devices(
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The filter values to use to search for a device.
The filter to use for searching devices.
The name to use to filter results.
The values to use to filter results.
dict
Response Syntax
{
'devices': [
{
'deviceArn': 'string',
'deviceName': 'string',
'deviceStatus': 'ONLINE'|'OFFLINE'|'RETIRED',
'deviceType': 'QPU'|'SIMULATOR',
'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.
Exceptions
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
search_jobs
(**kwargs)¶Searches for Amazon Braket jobs that match the specified filter values.
See also: AWS API Documentation
Request Syntax
response = client.search_jobs(
filters=[
{
'name': 'string',
'operator': 'LT'|'LTE'|'EQUAL'|'GT'|'GTE'|'BETWEEN'|'CONTAINS',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
The filter values to use when searching for a job.
A filter used to search for Amazon Braket jobs.
The name to use for the jobs filter.
An operator to use for the jobs filter.
The values to use for the jobs filter.
dict
Response Syntax
{
'jobs': [
{
'createdAt': datetime(2015, 1, 1),
'device': 'string',
'endedAt': datetime(2015, 1, 1),
'jobArn': 'string',
'jobName': 'string',
'startedAt': datetime(2015, 1, 1),
'status': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'tags': {
'string': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
jobs (list) --
An array of JobSummary
objects for devices that match the specified filter values.
(dict) --
Provides summary information about an Amazon Braket job.
createdAt (datetime) --
The date and time that the Amazon Braket job was created.
device (string) --
Provides summary information about the primary device used by an Amazon Braket job.
endedAt (datetime) --
The date and time that the Amazon Braket job ended.
jobArn (string) --
The ARN of the Amazon Braket job.
jobName (string) --
The name of the Amazon Braket job.
startedAt (datetime) --
The date and time that the Amazon Braket job was started.
status (string) --
The status of the Amazon Braket job.
tags (dict) --
A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
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.
Exceptions
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
search_quantum_tasks
(**kwargs)¶Searches for tasks that match the specified filter values.
See also: AWS API Documentation
Request Syntax
response = client.search_quantum_tasks(
filters=[
{
'name': 'string',
'operator': 'LT'|'LTE'|'EQUAL'|'GT'|'GTE'|'BETWEEN',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
Array of SearchQuantumTasksFilter
objects.
A filter to use to search for tasks.
The name of the device used for the task.
An operator to use in the filter.
The values to use for the filter.
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': 'CREATED'|'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'tags': {
'string': 'string'
}
},
]
}
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.
tags (dict) --
Displays the key, value pairs of tags associated with this quantum task.
Exceptions
Braket.Client.exceptions.AccessDeniedException
Braket.Client.exceptions.ThrottlingException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
tag_resource
(**kwargs)¶Add a tag to the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
Specify the resourceArn
of the resource to which a tag will be added.
[REQUIRED]
Specify the tags to add to the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
untag_resource
(**kwargs)¶Remove tags from a resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
Specify the resourceArn
for the resource from which to remove the tags.
[REQUIRED]
Specify the keys for the tags to remove from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
Braket.Client.exceptions.ResourceNotFoundException
Braket.Client.exceptions.InternalServiceException
Braket.Client.exceptions.ValidationException
The available paginators are:
Braket.Paginator.
SearchDevices
¶paginator = client.get_paginator('search_devices')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Braket.Client.search_devices()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The filter values to use to search for a device.
The filter to use for searching devices.
The name to use to filter results.
The values to use to filter results.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'devices': [
{
'deviceArn': 'string',
'deviceName': 'string',
'deviceStatus': 'ONLINE'|'OFFLINE'|'RETIRED',
'deviceType': 'QPU'|'SIMULATOR',
'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 to resume pagination.
Braket.Paginator.
SearchJobs
¶paginator = client.get_paginator('search_jobs')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Braket.Client.search_jobs()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filters=[
{
'name': 'string',
'operator': 'LT'|'LTE'|'EQUAL'|'GT'|'GTE'|'BETWEEN'|'CONTAINS',
'values': [
'string',
]
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The filter values to use when searching for a job.
A filter used to search for Amazon Braket jobs.
The name to use for the jobs filter.
An operator to use for the jobs filter.
The values to use for the jobs filter.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'jobs': [
{
'createdAt': datetime(2015, 1, 1),
'device': 'string',
'endedAt': datetime(2015, 1, 1),
'jobArn': 'string',
'jobName': 'string',
'startedAt': datetime(2015, 1, 1),
'status': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
jobs (list) --
An array of JobSummary
objects for devices that match the specified filter values.
(dict) --
Provides summary information about an Amazon Braket job.
createdAt (datetime) --
The date and time that the Amazon Braket job was created.
device (string) --
Provides summary information about the primary device used by an Amazon Braket job.
endedAt (datetime) --
The date and time that the Amazon Braket job ended.
jobArn (string) --
The ARN of the Amazon Braket job.
jobName (string) --
The name of the Amazon Braket job.
startedAt (datetime) --
The date and time that the Amazon Braket job was started.
status (string) --
The status of the Amazon Braket job.
tags (dict) --
A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
NextToken (string) --
A token to resume pagination.
Braket.Paginator.
SearchQuantumTasks
¶paginator = client.get_paginator('search_quantum_tasks')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Braket.Client.search_quantum_tasks()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
filters=[
{
'name': 'string',
'operator': 'LT'|'LTE'|'EQUAL'|'GT'|'GTE'|'BETWEEN',
'values': [
'string',
]
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Array of SearchQuantumTasksFilter
objects.
A filter to use to search for tasks.
The name of the device used for the task.
An operator to use in the filter.
The values to use for the filter.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'quantumTasks': [
{
'createdAt': datetime(2015, 1, 1),
'deviceArn': 'string',
'endedAt': datetime(2015, 1, 1),
'outputS3Bucket': 'string',
'outputS3Directory': 'string',
'quantumTaskArn': 'string',
'shots': 123,
'status': 'CREATED'|'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLING'|'CANCELLED',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
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.
tags (dict) --
Displays the key, value pairs of tags associated with this quantum task.
NextToken (string) --
A token to resume pagination.