Skip to content

Commit 26afca2

Browse files
committed
manually add type hints for QiskitRuntimeService
1 parent e4be174 commit 26afca2

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

qiskit_ibm_runtime/qiskit_runtime_service.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,32 @@ def __init__(
9191
values in the loaded account.
9292
9393
Args:
94-
channel: Channel type. ``ibm_cloud``, ``ibm_quantum`` or ``local``. If ``local`` is selected,
95-
the local testing mode will be used, and primitive queries will run on a local simulator.
94+
Optional[ChannelType] channel: Channel type. ``ibm_cloud``, ``ibm_quantum`` or
95+
``local``. If ``local`` is selected, the local testing mode will be used, and
96+
primitive queries will run on a local simulator.
9697
For more details, check the `Qiskit Runtime local testing mode
9798
<https://docs.quantum.ibm.com/guides/local-testing-mode>`_ documentation.
9899
The ``ibm_quantum`` channel is deprecated and the ``ibm_cloud``
99100
channel should be used instead. For help, review the `migration guide
100101
<https://quantum.cloud.ibm.com/docs/migration-guides/classic-iqp-to-cloud-iqp>`_.
101-
token: IBM Cloud API key or IBM Quantum API token.
102-
url: The API URL.
102+
Optional[str] token: IBM Cloud API key or IBM Quantum API token.
103+
Optional[str] url: The API URL.
103104
Defaults to https://cloud.ibm.com (ibm_cloud) or
104105
https://auth.quantum.ibm.com/api (ibm_quantum).
105-
filename: Full path of the file where the account is created.
106+
Optional[str] filename: Full path of the file where the account is created.
106107
Default: _DEFAULT_ACCOUNT_CONFIG_JSON_FILE
107-
name: Name of the account to load.
108-
instance: The service instance to use.
108+
Optional[str] name: Name of the account to load.
109+
Optional[str] instance: The service instance to use.
109110
For ``ibm_cloud`` runtime, this is the Cloud Resource Name (CRN) or the service name.
110111
For ``ibm_quantum`` runtime, this is the hub/group/project in that format.
111-
proxies: Proxy configuration. Supported optional keys are
112+
Optional[dict] proxies: Proxy configuration. Supported optional keys are
112113
``urls`` (a dictionary mapping protocol or protocol and host to the URL of the proxy,
113114
documented at https://docs.python-requests.org/en/latest/api/#requests.Session.proxies),
114115
``username_ntlm``, ``password_ntlm`` (username and password to enable NTLM user
115116
authentication)
116-
verify: Whether to verify the server's TLS certificate.
117-
private_endpoint: Connect to private API URL.
118-
url_resolver: Function used to resolve the runtime url.
117+
Optional[bool] verify: Whether to verify the server's TLS certificate.
118+
Optional[bool] private_endpoint: Connect to private API URL.
119+
Optional[Callable] url_resolver: Function used to resolve the runtime url.
119120
120121
Returns:
121122
An instance of QiskitRuntimeService or QiskitRuntimeLocalService for local channel.

0 commit comments

Comments
 (0)