Source code for qiskit.providers.ibmq.exceptions

# This code is part of Qiskit.
# (C) Copyright IBM 2018, 2019.
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""Exceptions related to the IBM Quantum Experience provider."""

from qiskit.exceptions import QiskitError

[docs]class IBMQError(QiskitError): """Base class for errors raised by the provider modules.""" pass
[docs]class IBMQAccountError(IBMQError): """Base class for errors raised by account management.""" pass
class IBMQAccountValueError(IBMQError): """Value errors raised by account management."""
[docs]class IBMQAccountCredentialsNotFound(IBMQAccountError): """Errors raised when credentials are not found.""" pass
[docs]class IBMQAccountCredentialsInvalidFormat(IBMQAccountError): """Errors raised when the credentials format is invalid.""" pass
[docs]class IBMQAccountCredentialsInvalidToken(IBMQAccountError): """Errors raised when an IBM Quantum Experience token is invalid.""" pass
[docs]class IBMQAccountCredentialsInvalidUrl(IBMQAccountError): """Errors raised when an IBM Quantum Experience URL is invalid.""" pass
[docs]class IBMQAccountMultipleCredentialsFound(IBMQAccountError): """Errors raised when multiple credentials are found.""" pass
[docs]class IBMQProviderError(IBMQAccountError): """Errors related to provider handling.""" pass
[docs]class IBMQBackendError(IBMQError): """Base class for errors raised by the backend modules.""" pass
[docs]class IBMQBackendApiError(IBMQBackendError): """Errors that occur unexpectedly when querying the server.""" pass
[docs]class IBMQBackendApiProtocolError(IBMQBackendApiError): """Errors raised when an unexpected value is received from the server.""" pass
[docs]class IBMQBackendValueError(IBMQBackendError, ValueError): """Value errors raised by the backend modules.""" pass
class IBMQBackendJobLimitError(IBMQBackendError): """Errors raised when job limit is reached.""" pass class IBMQInputValueError(IBMQError): """Error raised due to invalid input value.""" pass class IBMQNotAuthorizedError(IBMQError): """Error raised when a service is invoked from an unauthorized account.""" pass class IBMQApiError(IBMQError): """Error raised when a server error encountered.""" pass