general_superstaq

Subpackages

Submodules

Attributes

API_URL

API_VERSION

Exceptions

SuperstaqException

An exception for errors coming from Superstaq's API.

SuperstaqServerException

An exception for non-retriable server-side errors.

SuperstaqUnsuccessfulJobException

An exception for attempting to get info about an unsuccessful job.

SuperstaqWarning

A warning issued by the server.

Classes

ResourceEstimate

A class to store data returned from a /resource_estimate request.

Target

A data class to store data returned from a /get_targets request.

Package Contents

exception general_superstaq.SuperstaqException(message: str)

Bases: Exception

An exception for errors coming from Superstaq’s API.

message
exception general_superstaq.SuperstaqServerException(message: str, status_code: int = 400, contact_info: bool = False)

Bases: SuperstaqException

An exception for non-retriable server-side errors.

message
status_code
status_msg
exception general_superstaq.SuperstaqUnsuccessfulJobException(job_id: str, status: str)

Bases: SuperstaqException

An exception for attempting to get info about an unsuccessful job.

This exception occurs when a job has been cancelled, deleted, or failed, and information about this job is attempted to be accessed.

exception general_superstaq.SuperstaqWarning(message: str)

Bases: Warning

A warning issued by the server.

class general_superstaq.ResourceEstimate

A class to store data returned from a /resource_estimate request.

depth: int | None = None
json_data: dataclasses.InitVar[dict[str, int]] = None
num_single_qubit_gates: int | None = None
num_two_qubit_gates: int | None = None
class general_superstaq.Target(/, **data: Any)

Bases: pydantic.BaseModel

A data class to store data returned from a /get_targets request.

available: bool = False
retired: bool = False
supports_compile: bool = False
supports_submit: bool = False
supports_submit_qubo: bool = False
target: str
general_superstaq.API_URL = 'https://superstaq.infleqtion.com'
general_superstaq.API_VERSION = 'v0.2.0'