Source code for qurry.exceptions

"""Exceptions (:mod:`qurry.exceptions`)"""


[docs] class QurryError(Exception): """Base class for errors raised by Qurrium.""" def __init__(self, *message): """Set the error message.""" super().__init__(" ".join(message)) self.message = " ".join(message) def __str__(self): """Return the message.""" return repr(self.message)
[docs] class QurryInvalidInherition(QurryError): """Invalid inherition class making by Qurrium."""
[docs] class QurryExperimentCountsNotCompleted(QurryError): """Experiment is not completed."""
[docs] class QurrySummonerInvalid(QurryError): """Warning for summoner info incompletion. The summoner is the instance of :class:`~qurry.qurrium.multimanager.multimanager.MultiManager`."""
[docs] class QurryExtraPackageRequired(QurryError, ImportError): """Extra package required for Qurrium."""
[docs] class QurryInvalidArgument(QurryError, ValueError): """Invalid argument for Qurrium."""
[docs] class QurryPositionalArgumentNotSupported(QurryError, ValueError): """Positional argument is not supported."""
[docs] class QurryCountLost(QurryError): """Count lost error."""
[docs] class QurryDependenciesFailureError(QurryError): """The dependencies of Qurrium like Qiskit raise some error."""
[docs] class RandomizedMeasureError(QurryError): """The error for randomized measure."""
[docs] class RandomizedMeasureUnitaryOperatorNotFullCovering(RandomizedMeasureError, ValueError): """Randomized measure unitary operator warning for not full covering the measure range."""
[docs] class OverlapComparisonSizeDifferent(RandomizedMeasureError, ValueError): """The sizes between two system that need to be compared are different."""
# General Warning
[docs] class QurryWarning(Warning): """Base class for warning raised by Qurrium.""" def __init__(self, *message): """Set the error message.""" super().__init__(" ".join(message)) self.message = " ".join(message) def __str__(self): """Return the message.""" return repr(self.message)
[docs] class UnconfiguredWarning(QurryWarning): "For dummy function in qurrium has been activated."
[docs] class QurryInheritionNoEffect(QurryWarning): "This configuration method has no effect."
[docs] class QurryUnrecongnizedArguments(QurryWarning): "This argument is not recognized but may be kept at somewhere."
[docs] class QurryMemoryOverAllocationWarning(QurryWarning): "Automatically shutdown experiment to protect RAM for preventing crashing."
[docs] class QurryImportWarning(QurryWarning): "Warning for qurry trying to import something."
[docs] class QurryResetSecurityActivated(QurryWarning): "Warning for reset class security."
[docs] class QurryResetAccomplished(QurryWarning): "Warning for class reset."
[docs] class QurryProtectContent(QurryWarning): "Warning for protect content."
[docs] class QurryDummyRunnerWarning(QurryWarning): """Dummy runner warning."""
[docs] class QurryHashIDInvalid(QurryWarning): """Hash ID invalid warning."""
[docs] class QurryArgumentsExpectedNotNone(QurryWarning): """Arguments expected not None warning."""
[docs] class QurryDependenciesNotWorking(QurryWarning): """Some function from the dependencies of Qurry like Qiskit will not working for some reason."""
[docs] class QurryTranspileConfigurationIgnored(QurryWarning): """Transpile configuration ignored warning."""
[docs] class QurryPendingTagTooMany(QurryWarning): """Pending tag too many warning."""
[docs] class QurryDeprecatedWarning(QurryWarning, DeprecationWarning): """Deprecated warning."""
[docs] class QurryUnknownExportOption(QurryWarning): """Unknown export option warning."""
[docs] class SeperatedExecutingOverlapResult(QurryWarning): """When the seperated executing overlap the result with the same backend"""
[docs] class OpenQASMProcessingWarning(QurryWarning): """OpenQASM processing warning."""
[docs] class OpenQASM3Issue13362Warning(OpenQASMProcessingWarning): """OpenQASM3 warning for Qiskit issue 12632. You will need to upgrade your Qiskit version to 1.3.2 for fixing this issue. - The issues report: https://github.com/Qiskit/qiskit/issues/13362 - Pull Requests merged: 1. https://github.com/Qiskit/qiskit/pull/13633 2. https://github.com/Qiskit/qiskit/pull/13663 """
[docs] class QurryUnprovenFeatureWarning(QurryWarning): """Unproven feature warning. This feature is not proven to be working or not. Please report if you find any issue with this feature. """