Skip to content

job_results

Core module for oqtopus-client.

Classes:

OqtopusEstimationJobResult

OqtopusEstimationJobResult(
    *,
    job_id: str,
    job_type: JobsJobType | str,
    status: JobsJobStatus | str,
    name: str,
    description: str | None = None,
    device_id: str,
    shots: int,
    job_info: JobsJobInfo | Mapping[str, Any],
    transpiler_info: Mapping[str, Any] | None = None,
    simulator_info: Mapping[str, Any] | None = None,
    mitigation_info: Mapping[str, Any] | None = None,
    transpile_result: JobsS3TranspileResult
    | Mapping[str, Any]
    | None = None,
    message: str | None = None,
    execution_time: float | None = None,
    submitted_at: datetime | None = None,
    ready_at: datetime | None = None,
    running_at: datetime | None = None,
    ended_at: datetime | None = None,
    client: object | None = None,
)

              flowchart TD
              oqtopus_client.services.job_results.OqtopusEstimationJobResult[OqtopusEstimationJobResult]
              oqtopus_client.services.job_results.OqtopusJobResult[OqtopusJobResult]

                              oqtopus_client.services.job_results.OqtopusJobResult --> oqtopus_client.services.job_results.OqtopusEstimationJobResult
                


              click oqtopus_client.services.job_results.OqtopusEstimationJobResult href "" "oqtopus_client.services.job_results.OqtopusEstimationJobResult"
              click oqtopus_client.services.job_results.OqtopusJobResult href "" "oqtopus_client.services.job_results.OqtopusJobResult"
            

Specialized SDK result object for estimation jobs.

Raises:

  • ValueError

    If job_type or status is invalid.

Methods:

  • from_raw

    Build a result object from a full job payload.

  • get_exp_value

    Return estimation exp_value.

  • get_stds

    Return estimation stds.

  • is_estimation

    Return True when this result belongs to an estimation job.

  • is_multi_manual

    Return True when this result belongs to a multi-manual job.

  • is_sampling

    Return True when this result belongs to a sampling job.

  • is_sse

    Return True when this result belongs to an SSE job.

Attributes:

  • description (str | None) –

    Return the related job description when known.

  • device_id (str | None) –

    Return the related device id when known.

  • ended_at (datetime | None) –

    Return the related end time when known.

  • estimation (EstimationPayload) –

    Return estimation payload only, or None when unavailable.

  • execution_time (float | int | None) –

    Return the related execution time in seconds when known.

  • exp_value (float | None) –

    Alias of :meth:get_exp_value.

  • job_id (str | None) –

    Return the related job id when known.

  • job_info (JobsJobInfo | Mapping[str, Any] | None) –

    Return the related job_info payload when known.

  • job_type (JobsJobType | None) –

    Return the related job type when known.

  • message (str | None) –

    Return the related message when known.

  • mitigation_info (Mapping[str, Any] | None) –

    Return the related mitigation info when known.

  • name (str | None) –

    Return the related job name when known.

  • ready_at (datetime | None) –

    Return the related ready time when known.

  • running_at (datetime | None) –

    Return the related running time when known.

  • sampling (SamplingPayload) –

    Return sampling payload when result is sampling-like.

  • shots (int | None) –

    Return the related shot count when known.

  • simulator_info (Mapping[str, Any] | None) –

    Return the related simulator info when known.

  • status (JobsJobStatus | None) –

    Return related job status when known.

  • stds (float | None) –

    Alias of :meth:get_stds.

  • submitted_at (datetime | None) –

    Return the related submission time when known.

  • transpile_result (JobsS3TranspileResult | Mapping[str, Any] | None) –

    Return the related transpile result when known.

  • transpiler_info (Mapping[str, Any] | None) –

    Return the related transpiler info when known.

description property

description: str | None

Return the related job description when known.

This corresponds to the optional description supplied at submission time.

device_id property

device_id: str | None

Return the related device id when known.

This identifies the backend where the job was submitted.

ended_at property

ended_at: datetime | None

Return the related end time when known.

This timestamp is set when the job reaches a terminal state.

estimation property

estimation: EstimationPayload

Return estimation payload only, or None when unavailable.

Returns:

  • EstimationPayload

    Estimation payload when available.

execution_time property

execution_time: float | int | None

Return the related execution time in seconds when known.

This value is reported by the API and may be absent for unfinished jobs.

exp_value property

exp_value: float | None

Alias of :meth:get_exp_value.

Returns:

  • float | None

    Estimated expectation value when available.

job_id property

job_id: str | None

Return the related job id when known.

This is the same identifier used by client methods such as status(), wait(), and cancel_job().

job_info property

job_info: JobsJobInfo | Mapping[str, Any] | None

Return the related job_info payload when known.

This contains nested execution results and other API-provided metadata.

job_type property

job_type: JobsJobType | None

Return the related job type when known.

Examples include sampling, estimation, multi_manual, and sse.

message property

message: str | None

Return the related message when known.

Error details and backend-provided status messages are often surfaced here.

mitigation_info property

mitigation_info: Mapping[str, Any] | None

Return the related mitigation info when known.

This contains error-mitigation settings associated with the job.

name property

name: str | None

Return the related job name when known.

This corresponds to the optional name supplied when the job was submitted.

ready_at property

ready_at: datetime | None

Return the related ready time when known.

This timestamp is set when the job has been prepared and is ready to run.

running_at property

running_at: datetime | None

Return the related running time when known.

This timestamp is set when execution actually starts.

sampling property

sampling: SamplingPayload

Return sampling payload when result is sampling-like.

Returns:

  • SamplingPayload

    Sampling payload when available.

shots property

shots: int | None

Return the related shot count when known.

For job types that do not use sampling-style shots, this may be absent.

simulator_info property

simulator_info: Mapping[str, Any] | None

Return the related simulator info when known.

This is typically present for simulator-backed executions.

status property

status: JobsJobStatus | None

Return related job status when known.

Possible values are submitted, ready, running, succeeded, failed, and cancelled.

For helpers that wait for completion such as wait() and run_*(), the returned status is typically succeeded, failed, or cancelled.

stds property

stds: float | None

Alias of :meth:get_stds.

Returns:

  • float | None

    Estimated standard deviation when available.

submitted_at property

submitted_at: datetime | None

Return the related submission time when known.

This timestamp is set when the API accepts the job.

transpile_result property

transpile_result: (
    JobsS3TranspileResult | Mapping[str, Any] | None
)

Return the related transpile result when known.

This may include transpiled circuits or backend-specific transpilation metadata returned by the API.

transpiler_info property

transpiler_info: Mapping[str, Any] | None

Return the related transpiler info when known.

This is the transpiler metadata submitted with the job or echoed back by the API.

from_raw classmethod

from_raw(
    job: JobsJob, *, client: object | None = None
) -> Self

Build a result object from a full job payload.

Parameters:

  • job

    (Required) –

    Job definition returned by the API.

  • client

    (Optional, default: None ) –

    Client object bound to this result.

Returns:

  • Self

    A result object populated from the job definition.

Raises:

  • ValueError

    If the payload is missing required submitted-job fields.

get_exp_value

get_exp_value() -> float | None

Return estimation exp_value.

Returns:

  • float | None

    Estimated expectation value when available.

get_stds

get_stds() -> float | None

Return estimation stds.

Returns:

  • float | None

    Estimated standard deviation when available.

is_estimation

is_estimation() -> bool

Return True when this result belongs to an estimation job.

Returns:

  • bool

    True when the job type is estimation.

is_multi_manual

is_multi_manual() -> bool

Return True when this result belongs to a multi-manual job.

Returns:

  • bool

    True when the job type is multi-manual.

is_sampling

is_sampling() -> bool

Return True when this result belongs to a sampling job.

Returns:

  • bool

    True when the job type is sampling.

is_sse

is_sse() -> bool

Return True when this result belongs to an SSE job.

Returns:

  • bool

    True when the job type is SSE.

OqtopusJobResult

OqtopusJobResult(
    *,
    job_id: str,
    job_type: JobsJobType | str,
    status: JobsJobStatus | str,
    name: str,
    description: str | None = None,
    device_id: str,
    shots: int,
    job_info: JobsJobInfo | Mapping[str, Any],
    transpiler_info: Mapping[str, Any] | None = None,
    simulator_info: Mapping[str, Any] | None = None,
    mitigation_info: Mapping[str, Any] | None = None,
    transpile_result: JobsS3TranspileResult
    | Mapping[str, Any]
    | None = None,
    message: str | None = None,
    execution_time: float | None = None,
    submitted_at: datetime | None = None,
    ready_at: datetime | None = None,
    running_at: datetime | None = None,
    ended_at: datetime | None = None,
    client: object | None = None,
)

SDK result object for a job's state and execution output payloads.

Raises:

  • ValueError

    If job_type or status is invalid.

Methods:

  • from_raw

    Build a result object from a full job payload.

  • is_estimation

    Return True when this result belongs to an estimation job.

  • is_multi_manual

    Return True when this result belongs to a multi-manual job.

  • is_sampling

    Return True when this result belongs to a sampling job.

  • is_sse

    Return True when this result belongs to an SSE job.

Attributes:

  • description (str | None) –

    Return the related job description when known.

  • device_id (str | None) –

    Return the related device id when known.

  • ended_at (datetime | None) –

    Return the related end time when known.

  • estimation (EstimationPayload) –

    Return estimation payload when result is estimation-like.

  • execution_time (float | int | None) –

    Return the related execution time in seconds when known.

  • job_id (str | None) –

    Return the related job id when known.

  • job_info (JobsJobInfo | Mapping[str, Any] | None) –

    Return the related job_info payload when known.

  • job_type (JobsJobType | None) –

    Return the related job type when known.

  • message (str | None) –

    Return the related message when known.

  • mitigation_info (Mapping[str, Any] | None) –

    Return the related mitigation info when known.

  • name (str | None) –

    Return the related job name when known.

  • ready_at (datetime | None) –

    Return the related ready time when known.

  • running_at (datetime | None) –

    Return the related running time when known.

  • sampling (SamplingPayload) –

    Return sampling payload when result is sampling-like.

  • shots (int | None) –

    Return the related shot count when known.

  • simulator_info (Mapping[str, Any] | None) –

    Return the related simulator info when known.

  • status (JobsJobStatus | None) –

    Return related job status when known.

  • submitted_at (datetime | None) –

    Return the related submission time when known.

  • transpile_result (JobsS3TranspileResult | Mapping[str, Any] | None) –

    Return the related transpile result when known.

  • transpiler_info (Mapping[str, Any] | None) –

    Return the related transpiler info when known.

description property

description: str | None

Return the related job description when known.

This corresponds to the optional description supplied at submission time.

device_id property

device_id: str | None

Return the related device id when known.

This identifies the backend where the job was submitted.

ended_at property

ended_at: datetime | None

Return the related end time when known.

This timestamp is set when the job reaches a terminal state.

estimation property

estimation: EstimationPayload

Return estimation payload when result is estimation-like.

Returns:

  • EstimationPayload

    Estimation payload when available.

execution_time property

execution_time: float | int | None

Return the related execution time in seconds when known.

This value is reported by the API and may be absent for unfinished jobs.

job_id property

job_id: str | None

Return the related job id when known.

This is the same identifier used by client methods such as status(), wait(), and cancel_job().

job_info property

job_info: JobsJobInfo | Mapping[str, Any] | None

Return the related job_info payload when known.

This contains nested execution results and other API-provided metadata.

job_type property

job_type: JobsJobType | None

Return the related job type when known.

Examples include sampling, estimation, multi_manual, and sse.

message property

message: str | None

Return the related message when known.

Error details and backend-provided status messages are often surfaced here.

mitigation_info property

mitigation_info: Mapping[str, Any] | None

Return the related mitigation info when known.

This contains error-mitigation settings associated with the job.

name property

name: str | None

Return the related job name when known.

This corresponds to the optional name supplied when the job was submitted.

ready_at property

ready_at: datetime | None

Return the related ready time when known.

This timestamp is set when the job has been prepared and is ready to run.

running_at property

running_at: datetime | None

Return the related running time when known.

This timestamp is set when execution actually starts.

sampling property

sampling: SamplingPayload

Return sampling payload when result is sampling-like.

Returns:

  • SamplingPayload

    Sampling payload when available.

shots property

shots: int | None

Return the related shot count when known.

For job types that do not use sampling-style shots, this may be absent.

simulator_info property

simulator_info: Mapping[str, Any] | None

Return the related simulator info when known.

This is typically present for simulator-backed executions.

status property

status: JobsJobStatus | None

Return related job status when known.

Possible values are submitted, ready, running, succeeded, failed, and cancelled.

For helpers that wait for completion such as wait() and run_*(), the returned status is typically succeeded, failed, or cancelled.

submitted_at property

submitted_at: datetime | None

Return the related submission time when known.

This timestamp is set when the API accepts the job.

transpile_result property

transpile_result: (
    JobsS3TranspileResult | Mapping[str, Any] | None
)

Return the related transpile result when known.

This may include transpiled circuits or backend-specific transpilation metadata returned by the API.

transpiler_info property

transpiler_info: Mapping[str, Any] | None

Return the related transpiler info when known.

This is the transpiler metadata submitted with the job or echoed back by the API.

from_raw classmethod

from_raw(
    job: JobsJob, *, client: object | None = None
) -> Self

Build a result object from a full job payload.

Parameters:

  • job

    (Required) –

    Job definition returned by the API.

  • client

    (Optional, default: None ) –

    Client object bound to this result.

Returns:

  • Self

    A result object populated from the job definition.

Raises:

  • ValueError

    If the payload is missing required submitted-job fields.

is_estimation

is_estimation() -> bool

Return True when this result belongs to an estimation job.

Returns:

  • bool

    True when the job type is estimation.

is_multi_manual

is_multi_manual() -> bool

Return True when this result belongs to a multi-manual job.

Returns:

  • bool

    True when the job type is multi-manual.

is_sampling

is_sampling() -> bool

Return True when this result belongs to a sampling job.

Returns:

  • bool

    True when the job type is sampling.

is_sse

is_sse() -> bool

Return True when this result belongs to an SSE job.

Returns:

  • bool

    True when the job type is SSE.

OqtopusMultiManualJobResult

OqtopusMultiManualJobResult(
    *,
    job_id: str,
    job_type: JobsJobType | str,
    status: JobsJobStatus | str,
    name: str,
    description: str | None = None,
    device_id: str,
    shots: int,
    job_info: JobsJobInfo | Mapping[str, Any],
    transpiler_info: Mapping[str, Any] | None = None,
    simulator_info: Mapping[str, Any] | None = None,
    mitigation_info: Mapping[str, Any] | None = None,
    transpile_result: JobsS3TranspileResult
    | Mapping[str, Any]
    | None = None,
    message: str | None = None,
    execution_time: float | None = None,
    submitted_at: datetime | None = None,
    ready_at: datetime | None = None,
    running_at: datetime | None = None,
    ended_at: datetime | None = None,
    client: object | None = None,
)

              flowchart TD
              oqtopus_client.services.job_results.OqtopusMultiManualJobResult[OqtopusMultiManualJobResult]
              oqtopus_client.services.job_results.OqtopusSamplingJobResult[OqtopusSamplingJobResult]
              oqtopus_client.services.job_results.OqtopusJobResult[OqtopusJobResult]

                              oqtopus_client.services.job_results.OqtopusSamplingJobResult --> oqtopus_client.services.job_results.OqtopusMultiManualJobResult
                                oqtopus_client.services.job_results.OqtopusJobResult --> oqtopus_client.services.job_results.OqtopusSamplingJobResult
                



              click oqtopus_client.services.job_results.OqtopusMultiManualJobResult href "" "oqtopus_client.services.job_results.OqtopusMultiManualJobResult"
              click oqtopus_client.services.job_results.OqtopusSamplingJobResult href "" "oqtopus_client.services.job_results.OqtopusSamplingJobResult"
              click oqtopus_client.services.job_results.OqtopusJobResult href "" "oqtopus_client.services.job_results.OqtopusJobResult"
            

Specialized SDK result object for multi_manual jobs.

Raises:

  • ValueError

    If job_type or status is invalid.

Methods:

  • counts_with_integer_keys

    Convert bitstring keys to integer keys for sampling payload.

  • from_raw

    Build a result object from a full job payload.

  • get_counts

    Return raw counts with original bitstring keys.

  • get_divided_counts

    Return integer-keyed counts per sub-result from divided_counts.

  • is_estimation

    Return True when this result belongs to an estimation job.

  • is_multi_manual

    Return True when this result belongs to a multi-manual job.

  • is_sampling

    Return True when this result belongs to a sampling job.

  • is_sse

    Return True when this result belongs to an SSE job.

Attributes:

  • description (str | None) –

    Return the related job description when known.

  • device_id (str | None) –

    Return the related device id when known.

  • ended_at (datetime | None) –

    Return the related end time when known.

  • estimation (EstimationPayload) –

    Return estimation payload when result is estimation-like.

  • execution_time (float | int | None) –

    Return the related execution time in seconds when known.

  • job_id (str | None) –

    Return the related job id when known.

  • job_info (JobsJobInfo | Mapping[str, Any] | None) –

    Return the related job_info payload when known.

  • job_type (JobsJobType | None) –

    Return the related job type when known.

  • message (str | None) –

    Return the related message when known.

  • mitigation_info (Mapping[str, Any] | None) –

    Return the related mitigation info when known.

  • name (str | None) –

    Return the related job name when known.

  • ready_at (datetime | None) –

    Return the related ready time when known.

  • running_at (datetime | None) –

    Return the related running time when known.

  • sampling (SamplingPayload) –

    Return sampling payload only, or None when unavailable.

  • shots (int | None) –

    Return the related shot count when known.

  • simulator_info (Mapping[str, Any] | None) –

    Return the related simulator info when known.

  • status (JobsJobStatus | None) –

    Return related job status when known.

  • submitted_at (datetime | None) –

    Return the related submission time when known.

  • transpile_result (JobsS3TranspileResult | Mapping[str, Any] | None) –

    Return the related transpile result when known.

  • transpiler_info (Mapping[str, Any] | None) –

    Return the related transpiler info when known.

description property

description: str | None

Return the related job description when known.

This corresponds to the optional description supplied at submission time.

device_id property

device_id: str | None

Return the related device id when known.

This identifies the backend where the job was submitted.

ended_at property

ended_at: datetime | None

Return the related end time when known.

This timestamp is set when the job reaches a terminal state.

estimation property

estimation: EstimationPayload

Return estimation payload when result is estimation-like.

Returns:

  • EstimationPayload

    Estimation payload when available.

execution_time property

execution_time: float | int | None

Return the related execution time in seconds when known.

This value is reported by the API and may be absent for unfinished jobs.

job_id property

job_id: str | None

Return the related job id when known.

This is the same identifier used by client methods such as status(), wait(), and cancel_job().

job_info property

job_info: JobsJobInfo | Mapping[str, Any] | None

Return the related job_info payload when known.

This contains nested execution results and other API-provided metadata.

job_type property

job_type: JobsJobType | None

Return the related job type when known.

Examples include sampling, estimation, multi_manual, and sse.

message property

message: str | None

Return the related message when known.

Error details and backend-provided status messages are often surfaced here.

mitigation_info property

mitigation_info: Mapping[str, Any] | None

Return the related mitigation info when known.

This contains error-mitigation settings associated with the job.

name property

name: str | None

Return the related job name when known.

This corresponds to the optional name supplied when the job was submitted.

ready_at property

ready_at: datetime | None

Return the related ready time when known.

This timestamp is set when the job has been prepared and is ready to run.

running_at property

running_at: datetime | None

Return the related running time when known.

This timestamp is set when execution actually starts.

sampling property

sampling: SamplingPayload

Return sampling payload only, or None when unavailable.

Returns:

  • SamplingPayload

    Sampling payload when available.

shots property

shots: int | None

Return the related shot count when known.

For job types that do not use sampling-style shots, this may be absent.

simulator_info property

simulator_info: Mapping[str, Any] | None

Return the related simulator info when known.

This is typically present for simulator-backed executions.

status property

status: JobsJobStatus | None

Return related job status when known.

Possible values are submitted, ready, running, succeeded, failed, and cancelled.

For helpers that wait for completion such as wait() and run_*(), the returned status is typically succeeded, failed, or cancelled.

submitted_at property

submitted_at: datetime | None

Return the related submission time when known.

This timestamp is set when the API accepts the job.

transpile_result property

transpile_result: (
    JobsS3TranspileResult | Mapping[str, Any] | None
)

Return the related transpile result when known.

This may include transpiled circuits or backend-specific transpilation metadata returned by the API.

transpiler_info property

transpiler_info: Mapping[str, Any] | None

Return the related transpiler info when known.

This is the transpiler metadata submitted with the job or echoed back by the API.

counts_with_integer_keys

counts_with_integer_keys() -> dict[str, dict[int, Any]]

Convert bitstring keys to integer keys for sampling payload.

Returns:

  • dict[str, dict[int, Any]]

    Sampling counts with integer keys.

from_raw classmethod

from_raw(
    job: JobsJob, *, client: object | None = None
) -> Self

Build a result object from a full job payload.

Parameters:

  • job

    (Required) –

    Job definition returned by the API.

  • client

    (Optional, default: None ) –

    Client object bound to this result.

Returns:

  • Self

    A result object populated from the job definition.

Raises:

  • ValueError

    If the payload is missing required submitted-job fields.

get_counts

get_counts() -> dict[str, Any]

Return raw counts with original bitstring keys.

Returns:

  • dict[str, Any]

    Raw sampling counts keyed by bitstring.

get_divided_counts

get_divided_counts() -> dict[str, dict[int, Any]]

Return integer-keyed counts per sub-result from divided_counts.

Returns:

  • dict[str, dict[int, Any]]

    Integer-keyed counts keyed by sub-result id.

is_estimation

is_estimation() -> bool

Return True when this result belongs to an estimation job.

Returns:

  • bool

    True when the job type is estimation.

is_multi_manual

is_multi_manual() -> bool

Return True when this result belongs to a multi-manual job.

Returns:

  • bool

    True when the job type is multi-manual.

is_sampling

is_sampling() -> bool

Return True when this result belongs to a sampling job.

Returns:

  • bool

    True when the job type is sampling.

is_sse

is_sse() -> bool

Return True when this result belongs to an SSE job.

Returns:

  • bool

    True when the job type is SSE.

OqtopusSamplingJobResult

OqtopusSamplingJobResult(
    *,
    job_id: str,
    job_type: JobsJobType | str,
    status: JobsJobStatus | str,
    name: str,
    description: str | None = None,
    device_id: str,
    shots: int,
    job_info: JobsJobInfo | Mapping[str, Any],
    transpiler_info: Mapping[str, Any] | None = None,
    simulator_info: Mapping[str, Any] | None = None,
    mitigation_info: Mapping[str, Any] | None = None,
    transpile_result: JobsS3TranspileResult
    | Mapping[str, Any]
    | None = None,
    message: str | None = None,
    execution_time: float | None = None,
    submitted_at: datetime | None = None,
    ready_at: datetime | None = None,
    running_at: datetime | None = None,
    ended_at: datetime | None = None,
    client: object | None = None,
)

              flowchart TD
              oqtopus_client.services.job_results.OqtopusSamplingJobResult[OqtopusSamplingJobResult]
              oqtopus_client.services.job_results.OqtopusJobResult[OqtopusJobResult]

                              oqtopus_client.services.job_results.OqtopusJobResult --> oqtopus_client.services.job_results.OqtopusSamplingJobResult
                


              click oqtopus_client.services.job_results.OqtopusSamplingJobResult href "" "oqtopus_client.services.job_results.OqtopusSamplingJobResult"
              click oqtopus_client.services.job_results.OqtopusJobResult href "" "oqtopus_client.services.job_results.OqtopusJobResult"
            

Specialized SDK result object for sampling jobs.

Raises:

  • ValueError

    If job_type or status is invalid.

Methods:

  • counts_with_integer_keys

    Convert bitstring keys to integer keys for sampling payload.

  • from_raw

    Build a result object from a full job payload.

  • get_counts

    Return raw counts with original bitstring keys.

  • is_estimation

    Return True when this result belongs to an estimation job.

  • is_multi_manual

    Return True when this result belongs to a multi-manual job.

  • is_sampling

    Return True when this result belongs to a sampling job.

  • is_sse

    Return True when this result belongs to an SSE job.

Attributes:

  • description (str | None) –

    Return the related job description when known.

  • device_id (str | None) –

    Return the related device id when known.

  • ended_at (datetime | None) –

    Return the related end time when known.

  • estimation (EstimationPayload) –

    Return estimation payload when result is estimation-like.

  • execution_time (float | int | None) –

    Return the related execution time in seconds when known.

  • job_id (str | None) –

    Return the related job id when known.

  • job_info (JobsJobInfo | Mapping[str, Any] | None) –

    Return the related job_info payload when known.

  • job_type (JobsJobType | None) –

    Return the related job type when known.

  • message (str | None) –

    Return the related message when known.

  • mitigation_info (Mapping[str, Any] | None) –

    Return the related mitigation info when known.

  • name (str | None) –

    Return the related job name when known.

  • ready_at (datetime | None) –

    Return the related ready time when known.

  • running_at (datetime | None) –

    Return the related running time when known.

  • sampling (SamplingPayload) –

    Return sampling payload only, or None when unavailable.

  • shots (int | None) –

    Return the related shot count when known.

  • simulator_info (Mapping[str, Any] | None) –

    Return the related simulator info when known.

  • status (JobsJobStatus | None) –

    Return related job status when known.

  • submitted_at (datetime | None) –

    Return the related submission time when known.

  • transpile_result (JobsS3TranspileResult | Mapping[str, Any] | None) –

    Return the related transpile result when known.

  • transpiler_info (Mapping[str, Any] | None) –

    Return the related transpiler info when known.

description property

description: str | None

Return the related job description when known.

This corresponds to the optional description supplied at submission time.

device_id property

device_id: str | None

Return the related device id when known.

This identifies the backend where the job was submitted.

ended_at property

ended_at: datetime | None

Return the related end time when known.

This timestamp is set when the job reaches a terminal state.

estimation property

estimation: EstimationPayload

Return estimation payload when result is estimation-like.

Returns:

  • EstimationPayload

    Estimation payload when available.

execution_time property

execution_time: float | int | None

Return the related execution time in seconds when known.

This value is reported by the API and may be absent for unfinished jobs.

job_id property

job_id: str | None

Return the related job id when known.

This is the same identifier used by client methods such as status(), wait(), and cancel_job().

job_info property

job_info: JobsJobInfo | Mapping[str, Any] | None

Return the related job_info payload when known.

This contains nested execution results and other API-provided metadata.

job_type property

job_type: JobsJobType | None

Return the related job type when known.

Examples include sampling, estimation, multi_manual, and sse.

message property

message: str | None

Return the related message when known.

Error details and backend-provided status messages are often surfaced here.

mitigation_info property

mitigation_info: Mapping[str, Any] | None

Return the related mitigation info when known.

This contains error-mitigation settings associated with the job.

name property

name: str | None

Return the related job name when known.

This corresponds to the optional name supplied when the job was submitted.

ready_at property

ready_at: datetime | None

Return the related ready time when known.

This timestamp is set when the job has been prepared and is ready to run.

running_at property

running_at: datetime | None

Return the related running time when known.

This timestamp is set when execution actually starts.

sampling property

sampling: SamplingPayload

Return sampling payload only, or None when unavailable.

Returns:

  • SamplingPayload

    Sampling payload when available.

shots property

shots: int | None

Return the related shot count when known.

For job types that do not use sampling-style shots, this may be absent.

simulator_info property

simulator_info: Mapping[str, Any] | None

Return the related simulator info when known.

This is typically present for simulator-backed executions.

status property

status: JobsJobStatus | None

Return related job status when known.

Possible values are submitted, ready, running, succeeded, failed, and cancelled.

For helpers that wait for completion such as wait() and run_*(), the returned status is typically succeeded, failed, or cancelled.

submitted_at property

submitted_at: datetime | None

Return the related submission time when known.

This timestamp is set when the API accepts the job.

transpile_result property

transpile_result: (
    JobsS3TranspileResult | Mapping[str, Any] | None
)

Return the related transpile result when known.

This may include transpiled circuits or backend-specific transpilation metadata returned by the API.

transpiler_info property

transpiler_info: Mapping[str, Any] | None

Return the related transpiler info when known.

This is the transpiler metadata submitted with the job or echoed back by the API.

counts_with_integer_keys

counts_with_integer_keys() -> dict[str, dict[int, Any]]

Convert bitstring keys to integer keys for sampling payload.

Returns:

  • dict[str, dict[int, Any]]

    Sampling counts with integer keys.

from_raw classmethod

from_raw(
    job: JobsJob, *, client: object | None = None
) -> Self

Build a result object from a full job payload.

Parameters:

  • job

    (Required) –

    Job definition returned by the API.

  • client

    (Optional, default: None ) –

    Client object bound to this result.

Returns:

  • Self

    A result object populated from the job definition.

Raises:

  • ValueError

    If the payload is missing required submitted-job fields.

get_counts

get_counts() -> dict[str, Any]

Return raw counts with original bitstring keys.

Returns:

  • dict[str, Any]

    Raw sampling counts keyed by bitstring.

is_estimation

is_estimation() -> bool

Return True when this result belongs to an estimation job.

Returns:

  • bool

    True when the job type is estimation.

is_multi_manual

is_multi_manual() -> bool

Return True when this result belongs to a multi-manual job.

Returns:

  • bool

    True when the job type is multi-manual.

is_sampling

is_sampling() -> bool

Return True when this result belongs to a sampling job.

Returns:

  • bool

    True when the job type is sampling.

is_sse

is_sse() -> bool

Return True when this result belongs to an SSE job.

Returns:

  • bool

    True when the job type is SSE.

OqtopusSseJobResult

OqtopusSseJobResult(
    *,
    job_id: str,
    job_type: JobsJobType | str,
    status: JobsJobStatus | str,
    name: str,
    description: str | None = None,
    device_id: str,
    shots: int,
    job_info: JobsJobInfo | Mapping[str, Any],
    transpiler_info: Mapping[str, Any] | None = None,
    simulator_info: Mapping[str, Any] | None = None,
    mitigation_info: Mapping[str, Any] | None = None,
    transpile_result: JobsS3TranspileResult
    | Mapping[str, Any]
    | None = None,
    message: str | None = None,
    execution_time: float | None = None,
    submitted_at: datetime | None = None,
    ready_at: datetime | None = None,
    running_at: datetime | None = None,
    ended_at: datetime | None = None,
    client: object | None = None,
)

              flowchart TD
              oqtopus_client.services.job_results.OqtopusSseJobResult[OqtopusSseJobResult]
              oqtopus_client.services.job_results.OqtopusJobResult[OqtopusJobResult]

                              oqtopus_client.services.job_results.OqtopusJobResult --> oqtopus_client.services.job_results.OqtopusSseJobResult
                


              click oqtopus_client.services.job_results.OqtopusSseJobResult href "" "oqtopus_client.services.job_results.OqtopusSseJobResult"
              click oqtopus_client.services.job_results.OqtopusJobResult href "" "oqtopus_client.services.job_results.OqtopusJobResult"
            

Specialized SDK result object for sse jobs.

Raises:

  • ValueError

    If job_type or status is invalid.

Methods:

  • download_log

    Download SSE archive from /jobs/{job_id}/sselog.

  • from_raw

    Build a result object from a full job payload.

  • get_job_result

    Return a job result object with the specific type based on available payload.

  • is_estimation

    Return True when this result belongs to an estimation job.

  • is_multi_manual

    Return True when this result belongs to a multi-manual job.

  • is_sampling

    Return True when this result belongs to a sampling job.

  • is_sse

    Return True when this result belongs to an SSE job.

  • read_log_text

    Decode SSE log response and return readable text.

  • show_log

    Read SSE log text and print it.

Attributes:

  • description (str | None) –

    Return the related job description when known.

  • device_id (str | None) –

    Return the related device id when known.

  • ended_at (datetime | None) –

    Return the related end time when known.

  • estimation (EstimationPayload) –

    Return estimation payload when result is estimation-like.

  • execution_time (float | int | None) –

    Return the related execution time in seconds when known.

  • job_id (str | None) –

    Return the related job id when known.

  • job_info (JobsJobInfo | Mapping[str, Any] | None) –

    Return the related job_info payload when known.

  • job_type (JobsJobType | None) –

    Return the related job type when known.

  • message (str | None) –

    Return the related message when known.

  • mitigation_info (Mapping[str, Any] | None) –

    Return the related mitigation info when known.

  • name (str | None) –

    Return the related job name when known.

  • ready_at (datetime | None) –

    Return the related ready time when known.

  • running_at (datetime | None) –

    Return the related running time when known.

  • sampling (SamplingPayload) –

    Return sampling payload when result is sampling-like.

  • shots (int | None) –

    Return the related shot count when known.

  • simulator_info (Mapping[str, Any] | None) –

    Return the related simulator info when known.

  • status (JobsJobStatus | None) –

    Return related job status when known.

  • submitted_at (datetime | None) –

    Return the related submission time when known.

  • transpile_result (JobsS3TranspileResult | Mapping[str, Any] | None) –

    Return the related transpile result when known.

  • transpiler_info (Mapping[str, Any] | None) –

    Return the related transpiler info when known.

description property

description: str | None

Return the related job description when known.

This corresponds to the optional description supplied at submission time.

device_id property

device_id: str | None

Return the related device id when known.

This identifies the backend where the job was submitted.

ended_at property

ended_at: datetime | None

Return the related end time when known.

This timestamp is set when the job reaches a terminal state.

estimation property

estimation: EstimationPayload

Return estimation payload when result is estimation-like.

Returns:

  • EstimationPayload

    Estimation payload when available.

execution_time property

execution_time: float | int | None

Return the related execution time in seconds when known.

This value is reported by the API and may be absent for unfinished jobs.

job_id property

job_id: str | None

Return the related job id when known.

This is the same identifier used by client methods such as status(), wait(), and cancel_job().

job_info property

job_info: JobsJobInfo | Mapping[str, Any] | None

Return the related job_info payload when known.

This contains nested execution results and other API-provided metadata.

job_type property

job_type: JobsJobType | None

Return the related job type when known.

Examples include sampling, estimation, multi_manual, and sse.

message property

message: str | None

Return the related message when known.

Error details and backend-provided status messages are often surfaced here.

mitigation_info property

mitigation_info: Mapping[str, Any] | None

Return the related mitigation info when known.

This contains error-mitigation settings associated with the job.

name property

name: str | None

Return the related job name when known.

This corresponds to the optional name supplied when the job was submitted.

ready_at property

ready_at: datetime | None

Return the related ready time when known.

This timestamp is set when the job has been prepared and is ready to run.

running_at property

running_at: datetime | None

Return the related running time when known.

This timestamp is set when execution actually starts.

sampling property

sampling: SamplingPayload

Return sampling payload when result is sampling-like.

Returns:

  • SamplingPayload

    Sampling payload when available.

shots property

shots: int | None

Return the related shot count when known.

For job types that do not use sampling-style shots, this may be absent.

simulator_info property

simulator_info: Mapping[str, Any] | None

Return the related simulator info when known.

This is typically present for simulator-backed executions.

status property

status: JobsJobStatus | None

Return related job status when known.

Possible values are submitted, ready, running, succeeded, failed, and cancelled.

For helpers that wait for completion such as wait() and run_*(), the returned status is typically succeeded, failed, or cancelled.

submitted_at property

submitted_at: datetime | None

Return the related submission time when known.

This timestamp is set when the API accepts the job.

transpile_result property

transpile_result: (
    JobsS3TranspileResult | Mapping[str, Any] | None
)

Return the related transpile result when known.

This may include transpiled circuits or backend-specific transpilation metadata returned by the API.

transpiler_info property

transpiler_info: Mapping[str, Any] | None

Return the related transpiler info when known.

This is the transpiler metadata submitted with the job or echoed back by the API.

download_log

download_log(
    *,
    save_dir: str | Path | None = None,
    file_name: str | None = None,
    overwrite: bool = False,
    persist: bool = False,
) -> bytes | str

Download SSE archive from /jobs/{job_id}/sselog.

Default behavior keeps processing in-memory and returns archive bytes. Set persist=True to write the archive file to disk and return its path.

Parameters:

  • save_dir

    (Optional, default: None ) –

    Destination directory used when persist=True.

  • file_name

    (Optional, default: None ) –

    Saved archive file name when persist=True.

  • overwrite

    (Optional, default: False ) –

    Whether to overwrite an existing file when persist=True.

  • persist

    (Optional, default: False ) –

    Whether to save the archive to disk instead of returning bytes.

Returns:

  • bytes | str

    Archive bytes in memory, or a saved file path when persist=True.

Raises:

  • ValueError

    If persistence arguments are inconsistent with persist.

from_raw classmethod

from_raw(
    job: JobsJob, *, client: object | None = None
) -> Self

Build a result object from a full job payload.

Parameters:

  • job

    (Required) –

    Job definition returned by the API.

  • client

    (Optional, default: None ) –

    Client object bound to this result.

Returns:

  • Self

    A result object populated from the job definition.

Raises:

  • ValueError

    If the payload is missing required submitted-job fields.

get_job_result

get_job_result() -> OqtopusJobResult

Return a job result object with the specific type based on available payload.

Returns:

  • OqtopusJobResult

    A job result object with the specific type based on available payload.

is_estimation

is_estimation() -> bool

Return True when this result belongs to an estimation job.

Returns:

  • bool

    True when the job type is estimation.

is_multi_manual

is_multi_manual() -> bool

Return True when this result belongs to a multi-manual job.

Returns:

  • bool

    True when the job type is multi-manual.

is_sampling

is_sampling() -> bool

Return True when this result belongs to a sampling job.

Returns:

  • bool

    True when the job type is sampling.

is_sse

is_sse() -> bool

Return True when this result belongs to an SSE job.

Returns:

  • bool

    True when the job type is SSE.

read_log_text

read_log_text(
    *, encoding: str = "utf-8", errors: str = "replace"
) -> str

Decode SSE log response and return readable text.

Parameters:

  • encoding

    (Optional, default: 'utf-8' ) –

    Text encoding used to decode log contents.

  • errors

    (Optional, default: 'replace' ) –

    Error handling mode passed to decode().

Returns:

  • str

    Decoded SSE log text.

show_log

show_log(
    *,
    encoding: str = "utf-8",
    errors: str = "replace",
    print_fn: Callable[[str], Any] = print,
) -> str

Read SSE log text and print it.

Parameters:

  • encoding

    (Optional, default: 'utf-8' ) –

    Text encoding used to decode log contents.

  • errors

    (Optional, default: 'replace' ) –

    Error handling mode passed to decode().

  • print_fn

    (Optional, default: print ) –

    Printer function used to display the decoded log.

Returns:

  • str

    The printed SSE log text.