uniqc.exceptions module#
Custom exceptions for UnifiedQuantum.
This module defines all custom exceptions used throughout the UnifiedQuantum package, providing clear error types for different failure scenarios.
- exception uniqc.exceptions.AuthenticationError(message, *, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when authentication fails (invalid token, expired credentials, etc.).
This error indicates that the provided API token or credentials are invalid, expired, or do not have the required permissions.
- exception uniqc.exceptions.BackendError(message, *, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when a backend operation fails.
This is the base class for all backend-related errors.
- exception uniqc.exceptions.BackendNotAvailableError(message, *, details=None)[source]#
Bases:
BackendErrorRaised when a backend is not available.
This error indicates that the backend is offline, not configured, or cannot be accessed due to missing dependencies.
- exception uniqc.exceptions.BackendNotFoundError(message, *, details=None)[source]#
Bases:
BackendErrorRaised when a requested backend is not found.
This error indicates that the specified backend name is not registered in the backend registry.
- exception uniqc.exceptions.CircuitError(message, *, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when a circuit operation fails.
This is the base class for all circuit-related errors.
- exception uniqc.exceptions.CircuitTranslationError(message, *, source_format=None, target_format=None, details=None)[source]#
Bases:
CircuitErrorRaised when circuit translation fails.
This error indicates that a circuit could not be converted from OriginIR to the target backend’s native format.
- exception uniqc.exceptions.InsufficientCreditsError(message, *, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when the account has insufficient credits to run a task.
This error indicates that the user’s account balance is too low to execute the requested quantum computation.
- exception uniqc.exceptions.NetworkError(message, *, url=None, status_code=None, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when a network operation fails.
This error covers connection failures, timeouts, DNS errors, and other network-related issues when communicating with quantum computing backends.
- exception uniqc.exceptions.QuotaExceededError(message, *, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when the user has exceeded their usage quota.
This error indicates that the user has reached their daily, monthly, or total usage limit for the quantum computing service.
- exception uniqc.exceptions.TaskFailedError(message, *, task_id=None, backend=None, error_code=None, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when a quantum task fails on the backend.
This error indicates that the task was submitted successfully but failed during execution on the quantum computer or simulator.
- exception uniqc.exceptions.TaskNotFoundError(message, *, task_id=None, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when a task cannot be found.
This error indicates that the specified task ID does not exist or the user does not have permission to access it.
- exception uniqc.exceptions.TaskTimeoutError(message, *, task_id=None, timeout=None, details=None)[source]#
Bases:
UnifiedQuantumErrorRaised when waiting for a task result exceeds the timeout.
This error indicates that the task did not complete within the specified timeout period. The task may still be running.
- exception uniqc.exceptions.UnifiedQuantumError(message, *, details=None)[source]#
Bases:
ExceptionBase exception for all UnifiedQuantum errors.
- exception uniqc.exceptions.UnsupportedGateError(message, *, gate_name=None, backend=None, details=None)[source]#
Bases:
CircuitErrorRaised when a circuit contains an unsupported gate.
This error indicates that the target backend does not support one or more gates present in the circuit.