def __init__(
        self,
        remote_host: str,
        api_key: str,
        default_target: str | None = None,
        api_version: str = 'v0.3',
        max_retry_seconds: int = 3600,  # 1 hour
        verbose: bool = False,
    ):
        """Creates the IonQClient.

        Users should use `cirq_ionq.Service` instead of this class directly.

        The IonQClient handles making requests to the IonQClient, returning dictionary results.
        It handles retry and authentication.

        Args:
            remote_host: The url of the server exposing the IonQ API. This will strip anything
                besides the base scheme and netloc, i.e. it only takes the part of the host of
                the form `http://example.com` of `http://example.com/test`.
            api_key: The key used for authenticating against the IonQ API.
            default_target: The default target to run against. Supports one of 'qpu' and
                'simulator'. Can be overridden by calls with target in their signature.
            api_version: Which version fo the api to use. As of Feb, 2023, accepts 'v0.3' only,
                which is the default.
            max_retry_seconds: The time to continue retriable responses. Defaults to 3600.
            verbose: Whether to print to stderr and stdio any retriable errors that are encountered.
        """
        url = urllib.parse.urlparse(remote_host)
        assert url.scheme and url.netloc, (
            f'Specified remote_host {remote_host} is not a valid url, for example '
            'http://example.com'
        )
        assert (
            api_version in self.SUPPORTED_VERSIONS
        ), f'Only api v0.3 is accepted but was {api_version}'
        assert (
            default_target is None or default_target in self.SUPPORTED_TARGETS
        ), f'Target can only be one of {self.SUPPORTED_TARGETS} but was {default_target}.'
        assert max_retry_seconds >= 0, 'Negative retry not possible without time machine.'

        self.url = f'{url.scheme}://{url.netloc}/{api_version}'
        self.headers = self.api_headers(api_key)
        self.default_target = default_target
        self.max_retry_seconds = max_retry_seconds
        self.verbose = verbose
Creates the IonQClient.

        Users should use `cirq_ionq.Service` instead of this class directly.

        The IonQClient handles making requests to the IonQClient, returning dictionary results.
        It handles retry and authentication.

        Args:
            remote_host: The url of the server exposing the IonQ API. This will strip anything
                besides the base scheme and netloc, i.e. it only takes the part of the host of
                the form `http://example.com` of `http://example.com/test`.
            api_key: The key used for authenticating against the IonQ API.
            default_target: The default target to run against. Supports one of 'qpu' and
                'simulator'. Can be overridden by calls with target in their signature.
            api_version: Which version fo the api to use. As of Feb, 2023, accepts 'v0.3' only,
                which is the default.
            max_retry_seconds: The time to continue retriable responses. Defaults to 3600.
            verbose: Whether to print to stderr and stdio any retriable errors that are encountered.
        
cirq-ionq/cirq_ionq/ionq_client.py