Tasks

"Tasks" are units of work that run on AWS managed devices, such as managed simulators and QPUs. See the Braket documentation about how tasks work and submitting tasks for more information.

Braket.AwsQuantumTaskMethod
AwsQuantumTask(device_arn::String, task_spec; kwargs...)

Launches an AwsQuantumTask based on task_spec on the device associated with device_arn.

task_spec must be one of:

Valid kwargs are:

  • s3_destination_folder::Tuple{String, String}, with default value default_task_bucket().
  • shots::Int - the number of shots to run, with default value 1000. Value must be between 0 and MAX_SHOTS for the specific device.
  • device_params::Dict{String, Any} - device specific parameters. Currently only used for DWave devices and simulators.
  • disable_qubit_rewiring::Bool - whether to allow qubit rewiring in the compilation stage. Default is false.
  • poll_timeout_seconds::Int - maximum number of seconds to wait while polling for results. Default: 432000
  • poll_interval_seconds::Int - default number of seconds to wait between attempts while polling for results. Default: 1
  • tags::Dict{String, String} - tags for the AwsQuantumTask
  • inputs::Dict{String, Float64} - input values for any free parameters in the task_spec
Braket.AwsQuantumTaskBatchType
AwsQuantumTaskBatch

Struct representing a batch of tasks run concurrently on an Amazon-managed device.

Braket.AwsQuantumTaskBatchMethod
AwsQuantumTaskBatch(device_arn::String, task_specs::Vector{<:Union{AbstractProgram, Circuit}}; kwargs...) -> AwsQuantumTaskBatch

Launches a batch of concurrent tasks specified by task_specs on device_arn.

Valid kwargs are:

  • s3_destination_folder::Tuple{String, String} - s3 bucket and prefix in which to store results. Default: default_task_bucket()
  • shots::Int - the number of shots to run each task with. Default: 1000
  • poll_timeout_seconds::Int - maximum number of seconds to wait while polling for results. Default: 432000
  • poll_interval_seconds::Int - default number of seconds to wait between attempts while polling for results. Default: 1
Braket.resultsMethod
results(b::AwsQuantumTaskBatch; kwargs)

Valid kwargs are:

  • fail_unsuccessful::Bool - whether to throw an error if any tasks in the batch are unsuccessful after retries. Default: false
  • max_retries::Int - maximum number of times to retry a failed task. Default: 3
  • use_cached_value::Bool - whether to reuse previously downloaded results for tasks or download all results fresh. Default: true

Blocks and waits while retrieving results for every task in b.