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.AwsQuantumTask
— TypeAwsQuantumTask
Struct representing a task run on an Amazon-managed device.
Braket.AwsQuantumTask
— MethodAwsQuantumTask(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:
OpenQASMProgram
BlackbirdProgram
Problem
Program
Circuit
AHSProgram
AnalogHamiltonianSimulation
Valid kwargs
are:
s3_destination_folder::Tuple{String, String}
, with default valuedefault_task_bucket()
.shots::Int
- the number of shots to run, with default value 1000. Value must be between0
andMAX_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 isfalse
.poll_timeout_seconds::Int
- maximum number of seconds to wait while polling for results. Default: 432000poll_interval_seconds::Int
- default number of seconds to wait between attempts while polling for results. Default: 1tags::Dict{String, String}
- tags for theAwsQuantumTask
Braket.AwsQuantumTaskBatch
— TypeAwsQuantumTaskBatch
Struct representing a batch of tasks run concurrently on an Amazon-managed device.
Braket.AwsQuantumTaskBatch
— MethodAwsQuantumTaskBatch(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: 1000poll_timeout_seconds::Int
- maximum number of seconds to wait while polling for results. Default: 432000poll_interval_seconds::Int
- default number of seconds to wait between attempts while polling for results. Default: 1
Braket.results
— Methodresults(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: 3use_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
.