Shortcuts

qiskit.providers.ibmq.IBMQFactory

class IBMQFactory[소스]

Factory and account manager for IBM Quantum Experience.

IBMQFactory constructor.

__init__()[소스]

IBMQFactory constructor.

Methods

__init__()

IBMQFactory constructor.

active_account()

Return the IBM Quantum Experience account currently in use for the session.

delete_account()

Delete the saved account from disk.

disable_account()

Disable the account currently in use for the session.

enable_account(token[, url, hub, group, project])

Authenticate against IBM Quantum Experience for use during the session.

get_provider([hub, group, project])

Return a provider for a single hub/group/project combination.

load_account()

Authenticate against IBM Quantum Experience from stored credentials.

providers([hub, group, project])

Return a list of providers, subject to optional filtering.

save_account(token[, url, hub, group, …])

Save the account to disk for future use.

stored_account()

List the account stored on disk.

update_account([force])

Interactive helper for migrating stored credentials to IBM Quantum Experience v2.

active_account()[소스]

Return the IBM Quantum Experience account currently in use for the session.

반환 형식

Optional[Dict[str, str]]

반환값

Information about the account currently in the session.

static delete_account()[소스]

Delete the saved account from disk.

예외
반환 형식

None

disable_account()[소스]

Disable the account currently in use for the session.

예외

IBMQAccountCredentialsNotFound – If no account is in use for the session.

반환 형식

None

enable_account(token, url='https://auth.quantum-computing.ibm.com/api', hub=None, group=None, project=None, **kwargs)[소스]

Authenticate against IBM Quantum Experience for use during the session.

참고

With version 0.4 of this qiskit-ibmq-provider package, use of the legacy Quantum Experience and Qconsole (also known as the IBM Quantum Experience v1) credentials is no longer supported.

매개변수
  • token (str) – IBM Quantum Experience token.

  • url (str) – URL for the IBM Quantum Experience authentication server.

  • hub (Optional[str]) – Name of the hub to use.

  • group (Optional[str]) – Name of the group to use.

  • project (Optional[str]) – Name of the project to use.

  • **kwargs

    Additional settings for the connection:

    • proxies (dict): proxy configuration.

    • verify (bool): verify the server’s TLS certificate.

반환 형식

Optional[AccountProvider]

반환값

If hub, group, and project are specified, the corresponding provider is returned. Otherwise the provider for the open access project is returned.

예외
  • IBMQAccountError – If an IBM Quantum Experience account is already in use for the session.

  • IBMQAccountCredentialsInvalidUrl – If the URL specified is not a valid IBM Quantum Experience authentication URL.

  • IBMQProviderError – If no provider matches the specified criteria, or more than one provider matches the specified criteria.

get_provider(hub=None, group=None, project=None)[소스]

Return a provider for a single hub/group/project combination.

매개변수
  • hub (Optional[str]) – Name of the hub.

  • group (Optional[str]) – Name of the group.

  • project (Optional[str]) – Name of the project.

반환 형식

AccountProvider

반환값

A provider that matches the specified criteria.

예외

IBMQProviderError – If no provider matches the specified criteria, or more than one provider matches the specified criteria.

load_account()[소스]

Authenticate against IBM Quantum Experience from stored credentials.

반환 형식

Optional[AccountProvider]

반환값

If the configuration file specifies a default provider, it is returned. Otherwise the provider for the open access project is returned.

예외
providers(hub=None, group=None, project=None)[소스]

Return a list of providers, subject to optional filtering.

매개변수
  • hub (Optional[str]) – Name of the hub.

  • group (Optional[str]) – Name of the group.

  • project (Optional[str]) – Name of the project.

반환 형식

List[AccountProvider]

반환값

A list of providers that match the specified criteria.

static save_account(token, url='https://auth.quantum-computing.ibm.com/api', hub=None, group=None, project=None, overwrite=False, **kwargs)[소스]

Save the account to disk for future use.

참고

If storing a default provider to disk, all three parameters hub, group, project must be specified.

매개변수
  • token (str) – IBM Quantum Experience token.

  • url (str) – URL for the IBM Quantum Experience authentication server.

  • hub (Optional[str]) – Name of the hub for the default provider to store on disk.

  • group (Optional[str]) – Name of the group for the default provider to store on disk.

  • project (Optional[str]) – Name of the project for the default provider to store on disk.

  • overwrite (bool) – Overwrite existing credentials.

  • **kwargs

    • proxies (dict): Proxy configuration for the server.

    • verify (bool): If False, ignores SSL certificates errors

예외
반환 형식

None

static stored_account()[소스]

List the account stored on disk.

반환 형식

Dict[str, str]

반환값

A dictionary with information about the account stored on disk.

예외
static update_account(force=False)[소스]

Interactive helper for migrating stored credentials to IBM Quantum Experience v2.

매개변수

force (bool) – If True, disable interactive prompts and perform the changes.

반환 형식

Optional[Credentials]

반환값

The credentials for IBM Quantum Experience v2 if updating is successful or None otherwise.

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