• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

qiskit-community / qiskit-algorithms / 8804213726

23 Apr 2024 04:51PM CUT coverage: 90.612% (-0.04%) from 90.653%
8804213726

Pull #155

github

web-flow
Merge 602ab8cc6 into 3859d63ad
Pull Request #155: Fix bounds parsing in Scipy optimizers and warn when unsupported

10 of 13 new or added lines in 2 files covered. (76.92%)

1 existing line in 1 file now uncovered.

6496 of 7169 relevant lines covered (90.61%)

0.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/qiskit_algorithms/exceptions.py
1
# This code is part of a Qiskit project.
2
#
3
# (C) Copyright IBM 2017, 2024.
4
#
5
# This code is licensed under the Apache License, Version 2.0. You may
6
# obtain a copy of this license in the LICENSE.txt file in the root directory
7
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8
#
9
# Any modifications or derivative works of this code must retain this
10
# copyright notice, and modified files need to carry a notice indicating
11
# that they have been altered from the originals.
12

13
"""Exception and warnings for errors raised by Algorithms module."""
1✔
14

15
from qiskit.exceptions import QiskitError
1✔
16

17

18
class AlgorithmError(QiskitError):
1✔
19
    """For Algorithm specific errors."""
20

21
    pass
1✔
22

23

24
class QiskitAlgorithmsWarning(UserWarning):
1✔
25
    """Base class for warnings raised by Qiskit Algorithms."""
26

27
    def __init__(self, *message):
1✔
28
        """Set the error message."""
NEW
29
        super().__init__(" ".join(message))
×
NEW
30
        self.message = " ".join(message)
×
31

32
    def __str__(self):
1✔
33
        """Return the message."""
NEW
34
        return repr(self.message)
×
35

36

37
class QiskitAlgorithmsOptimizersWarning(QiskitAlgorithmsWarning):
1✔
38
    """For Algorithm specific warnings."""
39

40
    pass
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc