QrRuntimeService module
- class QrRuntimeService
- QrRuntimeService(token: str | None = None, url: str | None = None, filename: str | None = None, name: str | None = None, **kwargs) None
Class intializer.
- Args:
token (str): Quantum Rings provided API token for the user’s account url (str): An alternate URL, if provided by Quantum Rings filename (str): An alternate file from which the user’s details are to be loaded. name (str): Quantum Rings provided user account name. Usually the email ID of the user.
- Returns:
The class object.
- backends(**kwargs: Any) list[str]
Returns the list of available backends
- Args:
None
- Returns:
A list of available backends.
- active_account() dict
Returns the currently active account
- Args:
None
- Returns:
The details of the currently active account in the form of a dict.
- backend(name: str, **kwargs) QrBackendV2
Obtains the handle to the requested backend
- Args:
name (str): Name of the backend to be acquired. precision (str): An optional precision parameter - “single” or “double” gpu (int): An optional GPU ID to use. num_qubits (int): An optional number of qubits the backend will use.
- Returns:
A handle to the required backend.
- delete_account(filename: str | None = None, name: str | None = None, **kwargs: Any) bool
Deletes a saved account from the file if provided or from the system configuration file
- Args:
filename: Name of file from which the account is to be deleted. name: Name of the saved account to be deleted.
- Returns:
True if the account was deleted. False if no account was found or if the operation could not be performed.
- least_busy(**kwargs)
Return the “scarlet_quantum_rings” backend. This backend can be used everywhere, whether there is a GPU or not. Though it may not be performing quite well when comparted with a GPU based implementaiton with certain kinds of circuits.
- Args:
min_num_qubits (int): An optional number of qubits the backend will use.. precision (str): An optional precision parameter - “single” or “double”
- Returns:
The backend “scarlet_quantum_rings”.
- Raises:
None
- save_account(token: str | None = None, url: str | None = None, filename: str | None = None, name: str | None = None, **kwargs) None
Saves the account in the provided filename or in the system configuration file.
- Args:
token: Quantum Rings Provided access key. url: Validation server’s URL. filename: Full name of the file where the details are saved. name: Name of the Quantum Rings account.
- Returns:
None
- Raises:
None
- saved_accounts(filename: str | None = None, **kwargs) dict
Provides the details of the account saved in the provided file or in the system configuration file.
- Args:
filename: Name of file whose accounts are returned.
- Returns:
A dictionary with information about the accounts saved on disk.
- Raises:
None