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

qiskit-community / qiskit-algorithms / 13954979262

19 Mar 2025 07:21PM CUT coverage: 90.454% (-0.02%) from 90.477%
13954979262

Pull #226

github

web-flow
Merge 4f82d7263 into ca48697e8
Pull Request #226: Improve custom equals fns

4 of 6 new or added lines in 2 files covered. (66.67%)

6396 of 7071 relevant lines covered (90.45%)

0.9 hits per line

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

71.43
/qiskit_algorithms/algorithm_job.py
1
# This code is part of a Qiskit project.
2
#
3
# (C) Copyright IBM 2022, 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
"""
14
AlgorithmJob class
15
"""
16
from qiskit.primitives.primitive_job import PrimitiveJob
1✔
17

18

19
class AlgorithmJob(PrimitiveJob):
1✔
20
    """
21
    This class is introduced for typing purposes and provides no
22
    additional function beyond that inherited from its parents.
23

24
    Update: :meth:`AlgorithmJob.submit()` method added. See its
25
    documentation for more info.
26
    """
27

28
    def submit(self) -> None:
1✔
29
        """
30
        Submit the job for execution.
31

32
        For V1 primitives, Qiskit ``PrimitiveJob`` subclassed JobV1 and defined ``submit()``.
33
        ``PrimitiveJob`` was updated for V2 primitives, no longer subclasses ``JobV1``, and
34
        now has a private ``_submit()`` method, with ``submit()`` being deprecated as of
35
        Qiskit version 0.46. This maintains the ``submit()`` for ``AlgorithmJob`` here as
36
        it's called in many places for such a job. An alternative could be to make
37
        0.46 the required minimum version and alter all algorithm's call sites to use
38
        ``_submit()`` and make this an empty class again as it once was. For now this
39
        way maintains compatibility with the current min version of 0.44.
40
        """
41
        # TODO: Considering changing this in the future - see above docstring.
42
        try:
1✔
43
            super()._submit()
1✔
44
        except AttributeError:
×
45
            super().submit()
×
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