Shortcuts

qiskit.providers.ibmq.AccountProvider

class AccountProvider(credentials, access_token)[소스]

Provider for a single IBM Quantum Experience account.

The account provider class provides access to the IBM Quantum Experience backends available to this account.

You can access a provider by enabling an account with the IBMQ.enable_account() method, which returns the default provider you have access to:

from qiskit import IBMQ
provider = IBMQ.enable_account(<INSERT_IBM_QUANTUM_EXPERIENCE_TOKEN>)

To select a different provider, use the IBMQ.get_provider() method and specify the hub, group, or project name of the desired provider.

The backends() method returns all the backends available to this account:

backends = provider.backends()

The get_backend() method returns a backend that matches the filters passed as argument. An example of retrieving a backend that matches a specified name:

simulator_backend = provider.get_backend('ibmq_qasm_simulator')

It is also possible to use the backends attribute to reference a backend. As an example, to retrieve the same backend from the example above:

simulator_backend = provider.backends.ibmq_qasm_simulator

참고

The backends attribute can be used to autocomplete the names of backends available to this provider. To autocomplete, press tab after provider.backends.. This feature may not be available if an error occurs during backend discovery. Also note that this feature is only available in interactive sessions, such as in Jupyter Notebook and the Python interpreter.

AccountProvider constructor.

매개변수
  • credentials (Credentials) – IBM Quantum Experience credentials.

  • access_token (str) – IBM Quantum Experience access token.

__init__(credentials, access_token)[소스]

AccountProvider constructor.

매개변수
  • credentials (Credentials) – IBM Quantum Experience credentials.

  • access_token (str) – IBM Quantum Experience access token.

Methods

__init__(credentials, access_token)

AccountProvider constructor.

backends([name])

Return all backends accessible via this provider, subject to optional filtering.

get_backend([name])

Return a single backend matching the specified filtering.

Attributes

experiment

Return the experiment service.

backends(name=None, **kwargs)[소스]

Return all backends accessible via this provider, subject to optional filtering.

반환 형식

List[IBMQBackend]

property experiment

Return the experiment service.

반환 형식

ExperimentService

반환값

The experiment service instance.

예외

IBMQNotAuthorizedError – If the account is not authorized to use the experiment service.

get_backend(name=None, **kwargs)

Return a single backend matching the specified filtering.

매개변수
  • name (str) – name of the backend.

  • **kwargs – dict used for filtering.

반환값

a backend matching the filtering.

반환 형식

BaseBackend

예외

QiskitBackendNotFoundError – if no backend could be found or more than one backend matches the filtering criteria.

당신은 다음 언어로 문서를 보고 있다 lang: Korean
언어
English
Japanese
German
Korean