general_superstaq.superstaq_client ================================== .. py:module:: general_superstaq.superstaq_client .. autoapi-nested-parse:: Client for making requests to Superstaq's API. Attributes ---------- .. autoapisummary:: general_superstaq.superstaq_client.TQuboKey Functions --------- .. autoapisummary:: general_superstaq.superstaq_client.find_api_key general_superstaq.superstaq_client.read_ibm_credentials Module Contents --------------- .. py:function:: find_api_key() -> str Function to try to load a Superstaq API key from the environment or a key file. :raises OSError: If the Superstaq API key could not be found in the environment. :raises EnvironmentError: If the Superstaq API key could not be found. :returns: Superstaq API key string. .. py:function:: read_ibm_credentials(ibmq_name: str | None) -> dict[str, str] Function to try to read IBM credentials from .qiskit/qiskit-ibm.json. :param ibmq_name: The name under which the IBM account credentials are locally stored. :raises FileNotFoundError: If the configuration file is not found. :raises KeyError: If the provided `ibmq_name` does not have credentials stored in the config file or `token` and/or `channel` keys are missing for the credentials of the account under `ibmq_name`. :raises ValueError: If no `ibmq_name` is provided and multiple accounts are found with none marked as default. :returns: Dictionary containing the ibm token, channel, and instance (if available). .. py:data:: TQuboKey