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 be None when rehydrating a job by ID alone, in which case qcs_client must be provided.

  • qcs_client (QCSClient | None) – An authenticated QCSClient. When None, the client property falls back to device.client.

  • ro_sources (dict[str, str] | None) – Mapping from declared memory references (e.g. "ro[0]") to the readout buffer keys returned by ExecutionResults.buffers. Sourced from TranslationResult.ro_sources.

  • execution_options (ExecutionOptions | None) – The ExecutionOptions used at submission time. Reused for cancel and retrieve_results so 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 be None when rehydrating a job by ID alone, in which case qcs_client must be provided.

  • qcs_client (QCSClient | None) – An authenticated QCSClient. When None, the client property falls back to device.client.

  • ro_sources (dict[str, str] | None) – Mapping from declared memory references (e.g. "ro[0]") to the readout buffer keys returned by ExecutionResults.buffers. Sourced from TranslationResult.ro_sources.

  • execution_options (ExecutionOptions | None) – The ExecutionOptions used at submission time. Reused for cancel and retrieve_results so 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

client

Return the authenticated QCSClient used by this job.

device

Returns the qbraid QuantumDevice object associated with this job.

id

Return a unique id identifying the job.