qiskit-documentation/docs/api/qiskit-ibm-provider/ibm_provider.mdx

67 lines
5.0 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: qiskit_ibm_provider
description: API reference for qiskit_ibm_provider
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit_ibm_provider
---
<span id="ibm-quantum-provider-qiskit-ibm-provider" />
<span id="module-qiskit_ibm_provider" />
<span id="qiskit-ibm-provider" />
# IBM Quantum Provider
<span id="module-qiskit_ibm_provider" />
`qiskit_ibm_provider`
Modules representing the Qiskit IBM Quantum Provider.
## Logging
The qiskit-ibm-provider uses the `qiskit_ibm_provider` logger.
Two environment variables can be used to control the logging:
> * `QISKIT_IBM_PROVIDER_LOG_LEVEL`: Specifies the log level to use, for the Qiskit IBM provider modules. If an invalid level is set, the log level defaults to `WARNING`. The valid log levels are `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL` (case-insensitive). If the environment variable is not set, then the parent loggers level is used, which also defaults to `WARNING`.
> * `QISKIT_IBM_PROVIDER_LOG_FILE`: Specifies the name of the log file to use. If specified, messages will be logged to the file only. Otherwise messages will be logged to the standard error (usually the screen).
For more advanced use, you can modify the logger itself. For example, to manually set the level to `WARNING`:
```python
import logging
logging.getLogger('qiskit_ibm_provider').setLevel(logging.WARNING)
```
## Functions
| | |
| ----------------------------------------------------------------------------------------- | ------------------------------------------ |
| [`least_busy`](qiskit_ibm_provider.least_busy "qiskit_ibm_provider.least_busy")(backends) | Return the least busy backend from a list. |
## Classes
| | |
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`IBMProvider`](qiskit_ibm_provider.IBMProvider "qiskit_ibm_provider.IBMProvider")(\[token, url, name, instance, ...]) | Provides access to the IBM Quantum services available to an account. |
| [`IBMBackend`](qiskit_ibm_provider.IBMBackend "qiskit_ibm_provider.IBMBackend")(configuration, provider, api\_client) | Backend class interfacing with an IBM Quantum device. |
| [`IBMBackendService`](qiskit_ibm_provider.IBMBackendService "qiskit_ibm_provider.IBMBackendService")(provider, hgp) | Backend namespace for an IBM Quantum account. |
| [`Session`](qiskit_ibm_provider.Session "qiskit_ibm_provider.Session")(\[max\_time, session\_id]) | Class for creating a flexible Qiskit Runtime session. |
## Exceptions
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| [`IBMError`](qiskit_ibm_provider.IBMError "qiskit_ibm_provider.IBMError")(\*message) | Base class for errors raised by the provider modules. |
| [`IBMProviderError`](qiskit_ibm_provider.IBMProviderError "qiskit_ibm_provider.IBMProviderError")(\*message) | Base class for errors raise by IBMProvider. |
| [`IBMProviderValueError`](qiskit_ibm_provider.IBMProviderValueError "qiskit_ibm_provider.IBMProviderValueError")(\*message) | Value errors raised by IBMProvider. |
| [`IBMBackendError`](qiskit_ibm_provider.IBMBackendError "qiskit_ibm_provider.IBMBackendError")(\*message) | Base class for errors raised by the backend modules. |
| [`IBMBackendApiError`](qiskit_ibm_provider.IBMBackendApiError "qiskit_ibm_provider.IBMBackendApiError")(\*message) | Errors that occur unexpectedly when querying the server. |
| [`IBMBackendApiProtocolError`](qiskit_ibm_provider.IBMBackendApiProtocolError "qiskit_ibm_provider.IBMBackendApiProtocolError")(\*message) | Errors raised when an unexpected value is received from the server. |
| [`IBMBackendValueError`](qiskit_ibm_provider.IBMBackendValueError "qiskit_ibm_provider.IBMBackendValueError")(\*message) | Value errors raised by the backend modules. |
| [`IBMProviderError`](qiskit_ibm_provider.IBMProviderError "qiskit_ibm_provider.IBMProviderError")(\*message) | Base class for errors raise by IBMProvider. |