Module quantum_inspire_provider

class QuantumInspireProvider(*args, **kwargs)[source]

Bases: ProviderV1

Provides a backend and an api for a single Quantum Inspire account.

Parameters:
  • args (Any) –

  • kwargs (Any) –

get_api()[source]

Provides the authenticated Quantum Inspire API.

Returns:

The authenticated API.

Return type:

QuantumInspireAPI

backends(name=None, **kwargs)[source]

Provides a list of backends.

Parameters:
  • name (str | None) – Name of the requested backend. When None we take all available backends

  • kwargs (Any) – Used for filtering, not implemented.

Returns:

List of backends that meet the filter requirements (is_allow == True).

Return type:

List[QuantumInspireBackend]

set_authentication_details(email, password, qi_url='https://api.quantum-inspire.com')[source]

Set a single authentication for Quantum Inspire.

Deprecated since version 0.5.0: Replaced with method set_basic_authentication()

Parameters:
  • email (str) – A valid email address.

  • password (str) – Password for the account.

  • qi_url (str) – URL that points to quantum-inspire api. Default value: ‘https://api.quantum-inspire.com’.

Return type:

None

set_basic_authentication(email, password, qi_url='https://api.quantum-inspire.com')[source]

Set up basic authentication for Quantum Inspire.

Parameters:
  • email (str) – A valid email address.

  • password (str) – Password for the account.

  • qi_url (str) – URL that points to quantum-inspire api. Default value: ‘https://api.quantum-inspire.com’.

Return type:

None

set_token_authentication(token, qi_url='https://api.quantum-inspire.com')[source]

Set up token authentication for Quantum Inspire.

Parameters:
Return type:

None

set_authentication(authentication=None, qi_url='https://api.quantum-inspire.com', project_name=None)[source]

Initializes the API and sets the authentication for Quantum Inspire.

Parameters:
  • authentication (AuthBase | None) –

    The authentication, can be one of the following coreapi authentications:

    • BasicAuthentication(email, password), HTTP authentication with valid email/password.

    • TokenAuthentication(token, scheme="token"), token authentication with a valid API-token.

    When authentication is None, the api will try to load a token from the default resource.

  • qi_url (str) – URL that points to quantum-inspire api. Default value: ‘https://api.quantum-inspire.com’.

  • project_name (str | None) – The project name of the project that is used for executing the jobs.

Return type:

None

set_project_name(project_name)[source]

Set the project name for the Quantum Inspire project that is used for executing the jobs. Default a generated project-name is used, but it can be overridden by the user.

Parameters:

project_name (str) – project name of the QI project used for executing the jobs.

Return type:

None