qbraid.runtime.rigetti.RigettiJob
- class RigettiJob(job_id, num_shots, device=None, qcs_client=None, ro_sources=None, execution_options=None, **kwargs)[source]
Rigetti job class.
Initialize a RigettiJob.
- Parameters:
job_id (str) – The QCS job identifier returned by
qpu_submit(a string).num_shots (int) – Required. Number of shots that the job was submitted with; used downstream by parsers and result formatting.
device (RigettiDevice | None) – The originating
RigettiDevice. May beNonewhen rehydrating a job by ID alone, in which caseqcs_clientmust be provided.qcs_client (QCSClient | None) – An authenticated
QCSClient. WhenNone, theclientproperty falls back todevice.client.ro_sources (dict[str, str] | None) – Mapping from declared memory references (e.g.
"ro[0]") to the readout buffer keys returned byExecutionResults.buffers. Sourced fromTranslationResult.ro_sources.execution_options (ExecutionOptions | None) – The
ExecutionOptionsused at submission time. Reused forcancelandretrieve_resultsso the job hits the same gRPC endpoint that accepted it.
- __init__(job_id, num_shots, device=None, qcs_client=None, ro_sources=None, execution_options=None, **kwargs)[source]
Initialize a RigettiJob.
- Parameters:
job_id (str) – The QCS job identifier returned by
qpu_submit(a string).num_shots (int) – Required. Number of shots that the job was submitted with; used downstream by parsers and result formatting.
device (RigettiDevice | None) – The originating
RigettiDevice. May beNonewhen rehydrating a job by ID alone, in which caseqcs_clientmust be provided.qcs_client (QCSClient | None) – An authenticated
QCSClient. WhenNone, theclientproperty falls back todevice.client.ro_sources (dict[str, str] | None) – Mapping from declared memory references (e.g.
"ro[0]") to the readout buffer keys returned byExecutionResults.buffers. Sourced fromTranslationResult.ro_sources.execution_options (ExecutionOptions | None) – The
ExecutionOptionsused at submission time. Reused forcancelandretrieve_resultsso the job hits the same gRPC endpoint that accepted it.
Methods
__init__(job_id, num_shots[, device, ...])Initialize a RigettiJob.
async_result([timeout, poll_interval])Asynchronously wait for the job to reach a final state and return the result.
cancel()Cancel the Rigetti job.
is_terminal_state()Returns True if job is in final state.
metadata()Return the metadata regarding the job.
result([timeout])Return the result of the Rigetti job.
status()Return the current status of the Rigetti job.
wait_for_final_state([timeout, poll_interval])Poll the job status until it progresses to a final state.
Attributes
clientReturn the authenticated
QCSClientused by this job.deviceReturns the qbraid QuantumDevice object associated with this job.
idReturn a unique id identifying the job.