qiskit-serverless 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qiskit_serverless/__init__.py +51 -0
- qiskit_serverless/core/__init__.py +89 -0
- qiskit_serverless/core/client.py +737 -0
- qiskit_serverless/core/constants.py +58 -0
- qiskit_serverless/core/decorators.py +453 -0
- qiskit_serverless/core/files.py +128 -0
- qiskit_serverless/core/function.py +116 -0
- qiskit_serverless/core/job.py +804 -0
- qiskit_serverless/core/tracing.py +151 -0
- qiskit_serverless/exception.py +31 -0
- qiskit_serverless/serializers/__init__.py +42 -0
- qiskit_serverless/serializers/program_serializers.py +84 -0
- qiskit_serverless/serializers/serializers.py +106 -0
- qiskit_serverless/utils/__init__.py +34 -0
- qiskit_serverless/utils/errors.py +54 -0
- qiskit_serverless/utils/json.py +124 -0
- qiskit_serverless/utils/storage.py +77 -0
- qiskit_serverless/visualizaiton/__init__.py +29 -0
- qiskit_serverless/visualizaiton/widget.py +329 -0
- qiskit_serverless-0.11.0.dist-info/METADATA +158 -0
- qiskit_serverless-0.11.0.dist-info/RECORD +31 -0
- qiskit_serverless-0.11.0.dist-info/WHEEL +5 -0
- qiskit_serverless-0.11.0.dist-info/top_level.txt +2 -0
- tests/__init__.py +0 -0
- tests/core/__init__.py +0 -0
- tests/core/test_decorator.py +79 -0
- tests/core/test_job.py +57 -0
- tests/core/test_pattern.py +57 -0
- tests/serializers/__init__.py +0 -0
- tests/serializers/test_program_serializers.py +68 -0
- tests/utils.py +23 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This code is a Qiskit project.
|
|
2
|
+
#
|
|
3
|
+
# (C) Copyright IBM 2022.
|
|
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
|
+
.. currentmodule:: qiskit_serverless
|
|
15
|
+
|
|
16
|
+
.. autosummary::
|
|
17
|
+
:toctree: ../stubs/
|
|
18
|
+
|
|
19
|
+
QiskitServerlessException
|
|
20
|
+
"""
|
|
21
|
+
# pylint: disable=W0404
|
|
22
|
+
from importlib_metadata import version as metadata_version, PackageNotFoundError
|
|
23
|
+
|
|
24
|
+
from .core import (
|
|
25
|
+
BaseProvider,
|
|
26
|
+
BaseClient,
|
|
27
|
+
distribute_task,
|
|
28
|
+
distribute_qiskit_function,
|
|
29
|
+
get,
|
|
30
|
+
put,
|
|
31
|
+
get_refs_by_status,
|
|
32
|
+
ServerlessProvider,
|
|
33
|
+
ServerlessClient,
|
|
34
|
+
IBMServerlessProvider,
|
|
35
|
+
IBMServerlessClient,
|
|
36
|
+
RayProvider,
|
|
37
|
+
RayClient,
|
|
38
|
+
LocalProvider,
|
|
39
|
+
LocalClient,
|
|
40
|
+
save_result,
|
|
41
|
+
Configuration,
|
|
42
|
+
)
|
|
43
|
+
from .exception import QiskitServerlessException
|
|
44
|
+
from .core.function import QiskitPattern, QiskitFunction
|
|
45
|
+
from .serializers import get_arguments
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
__version__ = metadata_version("qiskit_serverless")
|
|
49
|
+
except PackageNotFoundError: # pragma: no cover
|
|
50
|
+
# package is not installed
|
|
51
|
+
pass
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# This code is a Qiskit project.
|
|
2
|
+
#
|
|
3
|
+
# (C) Copyright IBM 2022.
|
|
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
|
+
============================================
|
|
15
|
+
Core module (:mod:`qiskit_serverless.core`)
|
|
16
|
+
============================================
|
|
17
|
+
|
|
18
|
+
.. currentmodule:: qiskit_serverless.core
|
|
19
|
+
|
|
20
|
+
Qiskit Serverless core module classes and functions
|
|
21
|
+
====================================================
|
|
22
|
+
|
|
23
|
+
Core abstractions
|
|
24
|
+
-----------------
|
|
25
|
+
|
|
26
|
+
.. autosummary::
|
|
27
|
+
:toctree: ../stubs/
|
|
28
|
+
|
|
29
|
+
ServerlessClient
|
|
30
|
+
IBMServerlessClient
|
|
31
|
+
BaseClient
|
|
32
|
+
RayClient
|
|
33
|
+
LocalClient
|
|
34
|
+
ComputeResource
|
|
35
|
+
Job
|
|
36
|
+
GatewayJobClient
|
|
37
|
+
BaseJobClient
|
|
38
|
+
RayJobClient
|
|
39
|
+
save_result
|
|
40
|
+
QiskitPattern
|
|
41
|
+
QiskitFunction
|
|
42
|
+
Target
|
|
43
|
+
CircuitMeta
|
|
44
|
+
fetch_execution_meta
|
|
45
|
+
distribute_task
|
|
46
|
+
distribute_program
|
|
47
|
+
distribute_qiskit_function
|
|
48
|
+
get
|
|
49
|
+
put
|
|
50
|
+
get_refs_by_status
|
|
51
|
+
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
from .client import (
|
|
55
|
+
BaseProvider,
|
|
56
|
+
BaseClient,
|
|
57
|
+
ComputeResource,
|
|
58
|
+
ServerlessProvider,
|
|
59
|
+
ServerlessClient,
|
|
60
|
+
IBMServerlessProvider,
|
|
61
|
+
IBMServerlessClient,
|
|
62
|
+
LocalProvider,
|
|
63
|
+
LocalClient,
|
|
64
|
+
RayProvider,
|
|
65
|
+
RayClient,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
from .job import (
|
|
69
|
+
BaseJobClient,
|
|
70
|
+
RayJobClient,
|
|
71
|
+
GatewayJobClient,
|
|
72
|
+
LocalJobClient,
|
|
73
|
+
Job,
|
|
74
|
+
save_result,
|
|
75
|
+
Configuration,
|
|
76
|
+
)
|
|
77
|
+
from .function import QiskitPattern, QiskitFunction
|
|
78
|
+
from .decorators import (
|
|
79
|
+
remote,
|
|
80
|
+
get,
|
|
81
|
+
put,
|
|
82
|
+
get_refs_by_status,
|
|
83
|
+
fetch_execution_meta,
|
|
84
|
+
distribute_task,
|
|
85
|
+
distribute_qiskit_function,
|
|
86
|
+
distribute_program,
|
|
87
|
+
Target,
|
|
88
|
+
CircuitMeta,
|
|
89
|
+
)
|