From 65703738ada165307c3428b2e3a05187129082bd Mon Sep 17 00:00:00 2001 From: Apostolos Chalkis Date: Tue, 27 Aug 2024 13:20:08 +0300 Subject: [PATCH] fix code style and lint --- .../algorithms/eigensolvers/numpy_eigensolver.py | 2 +- qiskit_optimization/exceptions.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qiskit_optimization/algorithms/eigensolvers/numpy_eigensolver.py b/qiskit_optimization/algorithms/eigensolvers/numpy_eigensolver.py index b7150b29..752e668d 100644 --- a/qiskit_optimization/algorithms/eigensolvers/numpy_eigensolver.py +++ b/qiskit_optimization/algorithms/eigensolvers/numpy_eigensolver.py @@ -24,8 +24,8 @@ from qiskit.quantum_info.operators.base_operator import BaseOperator from qiskit_algorithms.utils.validation import validate_min -from .eigensolver import Eigensolver, EigensolverResult from qiskit_optimization.exceptions import AlgorithmError +from .eigensolver import Eigensolver, EigensolverResult from ..list_or_dict import ListOrDict logger = logging.getLogger(__name__) diff --git a/qiskit_optimization/exceptions.py b/qiskit_optimization/exceptions.py index c719d842..30e004ba 100644 --- a/qiskit_optimization/exceptions.py +++ b/qiskit_optimization/exceptions.py @@ -20,11 +20,13 @@ class QiskitOptimizationError(QiskitError): pass + class AlgorithmError(QiskitError): """For Algorithm specific errors.""" pass + class QiskitAlgorithmsWarning(UserWarning): """Base class for warnings raised by Qiskit Algorithms.""" @@ -37,7 +39,8 @@ def __str__(self): """Return the message.""" return repr(self.message) + class QiskitAlgorithmsOptimizersWarning(QiskitAlgorithmsWarning): """For Algorithm specific warnings.""" - pass \ No newline at end of file + pass