AWS
This section describes functions which are generic over several types which represent various workflows running on AWS - whether jobs, tasks, or something else.
Braket.arn
— Functionarn(j::AwsQuantumJob)
Returns the ARN identifying the job j
. This ARN can be used to reconstruct the job after the session that launched it has exited.
arn(t::AwsQuantumTask) -> String
Returns the ARN identifying the task t
. This ARN can be used to reconstruct the task after the session that launched it has exited.
Braket.metadata
— Functionmetadata(j::AwsQuantumJob, ::Val{true})
metadata(j::AwsQuantumJob, ::Val{false})
metadata(j::AwsQuantumJob)
Fetch metadata for job j
. If the second argument is ::Val{true}
, use previously cached metadata, if available, otherwise fetch it from the Braket service. If the second argument is ::Val{false}
(default), do not use previously cached metadata, and fetch fresh metadata from the Braket service.
metadata(t::AwsQuantumTask, ::Val{false})
metadata(t::AwsQuantumTask, ::Val{true})
Fetch metadata for task t
. If the second argument is ::Val{true}
, use previously cached metadata, if available, otherwise fetch it from the Braket service. If the second argument is ::Val{false}
, do not use previously cached metadata, and fetch fresh metadata from the Braket service.
Braket.state
— Functionstate(j::AwsQuantumJob, ::Val{true})
state(j::AwsQuantumJob, ::Val{false})
state(j::AwsQuantumJob)
Fetch the state for job j
. Possible states are "CANCELLED"
, "FAILED"
, "COMPLETED"
, "QUEUED"
, and "RUNNING"
. If the second argument is ::Val{true}
, use previously cached metadata, if available, otherwise fetch it from the Braket service. If the second argument is ::Val{false}
(default), do not use previously cached metadata, and fetch fresh metadata from the Braket service.
state(t::AwsQuantumTask, ::Val{false}) -> String
state(t::AwsQuantumTask, ::Val{true}) -> String
state(t::AwsQuantumTask) -> String
Fetch the state for task t
. Possible states are "CANCELLED"
, "FAILED"
, "COMPLETED"
, "QUEUED"
, and "RUNNING"
. If the second argument is ::Val{true}
, use previously cached metadata, if available, otherwise fetch it from the Braket service. If the second argument is ::Val{false}
(default), do not use previously cached metadata, and fetch fresh metadata from the Braket service.
Braket.cancel
— Functioncancel(j::AwsQuantumJob)
Cancels the job j
.
cancel(t::AwsQuantumTask)
Cancels the task t
.
Braket.result
— Functionresult(j::AwsQuantumJob; kwargs...)
Download, extract, and deserialize the results of job j
. Valid kwargs
are:
poll_timeout_seconds::Int
- the maximum number of seconds to wait while polling for results. Default: 864000poll_interval_seconds::Int
- how many seconds to wait between download attempts. Default: 5
result(t::AwsQuantumTask)
Fetches the result of task t
, if available. Blocks until a result is available, in which case the result is returned, or the task enters a terminal state without a result ("FAILED"
or "CANCELLED"
) or exceeds its its polling timeout (set at task creation), in which case nothing
is returned.