IonQ Provider¶
Provider for interacting with IonQ backends
- class qiskit_ionq.ionq_provider.BackendService(backends)[source]¶
A service class that allows for autocompletion of backends from provider.
Initialize service
- Parameters:
backends (list) – List of backend instances.
- class qiskit_ionq.ionq_provider.IonQProvider(token: str = None, url: str = None, custom_headers: dict = None)[source]¶
Provider for interacting with IonQ backends
- credentials¶
A dictionary containing
token
andurl
keys, whose values are an IonQ API Access Token and IonQ API URL, respectively.- Type:
dict[str, str]
- get_backend(name=None, gateset='qis', **kwargs)[source]¶
Return a single backend matching the specified filtering. :param name: name of the backend. :type name: str :param gateset: language used (QIS or native), defaults to QIS. :type gateset: str :param **kwargs: dict used for filtering.
- Returns:
a backend matching the filtering.
- Return type:
Backend
- Raises:
QiskitBackendNotFoundError – if no backend could be found or more than one backend matches the filtering criteria.
- qiskit_ionq.ionq_provider.resolve_credentials(token: str = None, url: str = None)[source]¶
Resolve credentials for use in IonQ Client API calls.
If the provided
token
andurl
are bothNone
, then these values are loaded from theQISKIT_IONQ_API_TOKEN
andQISKIT_IONQ_API_URL
environment variables, respectively.If no url is discovered, then
https://api.ionq.co/v0.3
is used.- Parameters:
token (str) – IonQ API access token.
url (str, optional) – IonQ API url. Defaults to
None
.
- Returns:
A dict with “token” and “url” keys, for use by a client.
- Return type:
dict[str]