[docs]classQurryError(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."""returnrepr(self.message)
[docs]classQurryInvalidInherition(QurryError):"""Invalid inherition class making by Qurrium."""
[docs]classQurryExperimentCountsNotCompleted(QurryError):"""Experiment is not completed."""
[docs]classQurrySummonerInvalid(QurryError):"""Warning for summoner info incompletion. The summoner is the instance of :class:`~qurry.qurrium.multimanager.multimanager.MultiManager`."""
[docs]classQurryExtraPackageRequired(QurryError,ImportError):"""Extra package required for Qurrium."""
[docs]classQurryInvalidArgument(QurryError,ValueError):"""Invalid argument for Qurrium."""
[docs]classQurryPositionalArgumentNotSupported(QurryError,ValueError):"""Positional argument is not supported."""
[docs]classQurryCountLost(QurryError):"""Count lost error."""
[docs]classQurryDependenciesFailureError(QurryError):"""The dependencies of Qurrium like Qiskit raise some error."""
[docs]classRandomizedMeasureError(QurryError):"""The error for randomized measure."""
[docs]classRandomizedMeasureUnitaryOperatorNotFullCovering(RandomizedMeasureError,ValueError):"""Randomized measure unitary operator warning for not full covering the measure range."""
[docs]classOverlapComparisonSizeDifferent(RandomizedMeasureError,ValueError):"""The sizes between two system that need to be compared are different."""
# General Warning
[docs]classQurryWarning(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."""returnrepr(self.message)
[docs]classUnconfiguredWarning(QurryWarning):"For dummy function in qurrium has been activated."
[docs]classQurryInheritionNoEffect(QurryWarning):"This configuration method has no effect."
[docs]classQurryUnrecongnizedArguments(QurryWarning):"This argument is not recognized but may be kept at somewhere."
[docs]classQurryMemoryOverAllocationWarning(QurryWarning):"Automatically shutdown experiment to protect RAM for preventing crashing."
[docs]classQurryImportWarning(QurryWarning):"Warning for qurry trying to import something."
[docs]classQurryResetSecurityActivated(QurryWarning):"Warning for reset class security."
[docs]classQurryResetAccomplished(QurryWarning):"Warning for class reset."
[docs]classQurryProtectContent(QurryWarning):"Warning for protect content."
[docs]classOpenQASM3Issue13362Warning(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]classQurryUnprovenFeatureWarning(QurryWarning):"""Unproven feature warning. This feature is not proven to be working or not. Please report if you find any issue with this feature. """