qcs_sdk.client

class QCSClient:

Configuration for connecting and authenticating to QCS APIs and resources.

QCSClient( tokens: Optional[qcs_sdk.client.QCSClientTokens] = None, api_url: Optional[str] = None, auth_server: Optional[qcs_sdk.client.QCSClientAuthServer] = None, grpc_api_url: Optional[str] = None, quilc_url: Optional[str] = None, qvm_url: Optional[str] = None)

Manually construct a QCSClient.

Prefer to use QCSClient.load to construct an environment-based profile.

def load(profile_name: Optional[str] = None) -> qcs_sdk.client.QCSClient:

Create a QCSClient configuration using an environment-based configuration.

Parameters
  • profile_name: The QCS setting's profile name to use. If None, the default value configured in your environment is used.
Raises
  • LoadClientError: If there is an issue loading the profile defails from the environment.

See the QCS documentation for more details.

async def load_async(profile_name: Optional[str] = None) -> qcs_sdk.client.QCSClient:

Create a QCSClient configuration using an environment-based configuration. (async analog of QCSClient.load)

Parameters
  • profile_name: The QCS setting's profile name to use. If None, the default value configured in your environment is used.
Raises
  • LoadClientError: If there is an issue loading the profile defails from the environment.

See the QCS documentation for more details.

qvm_url: str

URL to access the QVM.

api_url: str

URL to access the QCS API.

grpc_api_url: str

URL to access the QCS gRPC API.

quilc_url: str

URL to access the `quilc1 compiler.

class QCSClientAuthServer:

Authentication server configuration for the QCS API.

QCSClientAuthServer(client_id: str, issuer: str)

Manually define authentication server parameters.

Parameters
  • client_id: The OAuth application client ID. If None, a default value is used.
  • issuer: The OAuth token issuer url. If None, a default value is used.
client_id: str
issuer: str
class QCSClientTokens:

Authentication tokens for the QCS API.

QCSClientTokens(bearer_access_token: str, refresh_token: str)

Manually define authentication session tokens.

Parameters
  • bearer_access_token: The session token from an OAuth issuer.
  • refresh_token: A credential to refresh the bearer_access_token when it expires.
bearer_access_token: Optional[str]
refresh_token: Optional[str]
class LoadClientError(builtins.RuntimeError):

Error encountered while loading the QCS API client configuration from the environment configuration.

Inherited Members
builtins.RuntimeError
RuntimeError
builtins.BaseException
with_traceback
add_note
args
class BuildClientError(builtins.RuntimeError):

Error encountered while building the QCS API client configuration manually.

Inherited Members
builtins.RuntimeError
RuntimeError
builtins.BaseException
with_traceback
add_note
args