quapp-qiskit 0.0.13.dev1__tar.gz
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.
- quapp_qiskit-0.0.13.dev1/LICENSE +8 -0
- quapp_qiskit-0.0.13.dev1/PKG-INFO +37 -0
- quapp_qiskit-0.0.13.dev1/README.md +3 -0
- quapp_qiskit-0.0.13.dev1/pyproject.toml +31 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/__init__.py +1 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/async_tasks/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/async_tasks/qiskit_circuit_export_task.py +32 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/component/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/component/backend/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/component/backend/qiskit_invocation.py +59 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/component/backend/qiskit_job_fetching.py +39 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/factory/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/factory/qiskit_device_factory.py +36 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/factory/qiskit_handler_factory.py +33 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/factory/qiskit_provider_factory.py +39 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/handler/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/handler/invocation_handler.py +26 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/handler/job_fetching_handler.py +26 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/ibm_cloud_device.py +28 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/ibm_quantum_device.py +28 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/oqc_cloud_device.py +86 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/qapp_qiskit_device.py +32 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/device/qiskit_device.py +74 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/provider/__init__.py +0 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/provider/ibm_cloud_provider.py +32 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/provider/ibm_quantum_provider.py +27 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/provider/oqc_cloud_provider.py +25 -0
- quapp_qiskit-0.0.13.dev1/qapp_qiskit/model/provider/qapp_qiskit_provider.py +35 -0
- quapp_qiskit-0.0.13.dev1/quapp_qiskit.egg-info/PKG-INFO +37 -0
- quapp_qiskit-0.0.13.dev1/quapp_qiskit.egg-info/SOURCES.txt +34 -0
- quapp_qiskit-0.0.13.dev1/quapp_qiskit.egg-info/dependency_links.txt +1 -0
- quapp_qiskit-0.0.13.dev1/quapp_qiskit.egg-info/requires.txt +12 -0
- quapp_qiskit-0.0.13.dev1/quapp_qiskit.egg-info/top_level.txt +1 -0
- quapp_qiskit-0.0.13.dev1/setup.cfg +4 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quapp-qiskit
|
|
3
|
+
Version: 0.0.13.dev1
|
|
4
|
+
Summary: Quapp common library supporting Quapp Platform for Quantum Computing
|
|
5
|
+
Author-email: "CITYNOW Co. Ltd. " <corp@citynow.vn>
|
|
6
|
+
License: The MIT License (MIT)
|
|
7
|
+
Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
|
+
Project-URL: Homepage, https://citynow.asia/
|
|
15
|
+
Keywords: quapp,quapp-qiskit,quantum
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Requires-Python: <3.11,>=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: oqc-qcaas-client==3.12.0
|
|
23
|
+
Requires-Dist: quapp-common==0.0.11.dev1
|
|
24
|
+
Requires-Dist: qiskit-aer==0.16.1
|
|
25
|
+
Requires-Dist: qiskit-ibm-runtime==0.35.0
|
|
26
|
+
Requires-Dist: qiskit==1.3.2
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: black; extra == "dev"
|
|
29
|
+
Requires-Dist: bumpver; extra == "dev"
|
|
30
|
+
Requires-Dist: isort; extra == "dev"
|
|
31
|
+
Requires-Dist: pip-tools; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# qapp-qiskit
|
|
36
|
+
|
|
37
|
+
qapp-qiskit
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0.0", "wheel==0.45.1"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "quapp-qiskit"
|
|
7
|
+
version = "0.0.13.dev1"
|
|
8
|
+
description = "Quapp common library supporting Quapp Platform for Quantum Computing"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [{ name = "CITYNOW Co. Ltd. ", email = "corp@citynow.vn" }]
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"License :: OSI Approved :: MIT License",
|
|
14
|
+
"Programming Language :: Python",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
]
|
|
17
|
+
keywords = ["quapp", "quapp-qiskit", "quantum"]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"oqc-qcaas-client==3.12.0",
|
|
20
|
+
"quapp-common==0.0.11.dev1",
|
|
21
|
+
"qiskit-aer==0.16.1",
|
|
22
|
+
"qiskit-ibm-runtime==0.35.0",
|
|
23
|
+
"qiskit==1.3.2"
|
|
24
|
+
]
|
|
25
|
+
requires-python = ">=3.9,<3.11"
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
dev = ["black", "bumpver", "isort", "pip-tools", "pytest"]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://citynow.asia/"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .factory.qiskit_handler_factory import QiskitHandlerFactory
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_circuit_export_task.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit import transpile
|
|
5
|
+
|
|
6
|
+
from qapp_common.async_tasks.export_circuit_task import CircuitExportTask
|
|
7
|
+
from qapp_common.config.logging_config import logger
|
|
8
|
+
from qapp_common.enum.sdk import Sdk
|
|
9
|
+
|
|
10
|
+
from ..factory.qiskit_provider_factory import QiskitProviderFactory
|
|
11
|
+
from ..model.provider.oqc_cloud_provider import OqcCloudProvider
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class QiskitCircuitExportTask(CircuitExportTask):
|
|
15
|
+
|
|
16
|
+
def _transpile_circuit(self):
|
|
17
|
+
logger.debug("[QiskitCircuitExportTask] _transpile_circuit()")
|
|
18
|
+
|
|
19
|
+
circuit = self.circuit_data_holder.circuit
|
|
20
|
+
backend_information = self.backend_data_holder.backend_information
|
|
21
|
+
|
|
22
|
+
provider = QiskitProviderFactory.create_provider(
|
|
23
|
+
sdk=Sdk.QISKIT,
|
|
24
|
+
provider_type=backend_information.provider_tag,
|
|
25
|
+
authentication=backend_information.authentication)
|
|
26
|
+
|
|
27
|
+
if isinstance(provider, OqcCloudProvider):
|
|
28
|
+
return circuit
|
|
29
|
+
|
|
30
|
+
backend = provider.get_backend(backend_information.device_name)
|
|
31
|
+
|
|
32
|
+
return transpile(circuits=circuit, backend=backend)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_invocation.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit import QuantumCircuit
|
|
5
|
+
|
|
6
|
+
from qapp_common.component.backend.invocation import Invocation
|
|
7
|
+
from qapp_common.data.async_task.circuit_export.backend_holder import BackendDataHolder
|
|
8
|
+
from qapp_common.data.async_task.circuit_export.circuit_holder import CircuitDataHolder
|
|
9
|
+
from qapp_common.data.request.invocation_request import InvocationRequest
|
|
10
|
+
from qapp_common.model.provider.provider import Provider
|
|
11
|
+
from qapp_common.config.logging_config import logger
|
|
12
|
+
from qapp_common.config.thread_config import circuit_exporting_pool
|
|
13
|
+
|
|
14
|
+
from ...factory.qiskit_provider_factory import QiskitProviderFactory
|
|
15
|
+
from ...factory.qiskit_device_factory import QiskitDeviceFactory
|
|
16
|
+
from ...async_tasks.qiskit_circuit_export_task import QiskitCircuitExportTask
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class QiskitInvocation(Invocation):
|
|
20
|
+
|
|
21
|
+
def __init__(self, request_data: InvocationRequest):
|
|
22
|
+
super().__init__(request_data)
|
|
23
|
+
|
|
24
|
+
def _export_circuit(self, circuit):
|
|
25
|
+
logger.info("[QiskitInvocation] _export_circuit()")
|
|
26
|
+
|
|
27
|
+
circuit_export_task = QiskitCircuitExportTask(
|
|
28
|
+
circuit_data_holder=CircuitDataHolder(circuit, self.circuit_export_url),
|
|
29
|
+
backend_data_holder=BackendDataHolder(
|
|
30
|
+
self.backend_information, self.authentication.user_token
|
|
31
|
+
),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
circuit_exporting_pool.submit(circuit_export_task.do)
|
|
35
|
+
|
|
36
|
+
def _create_provider(self):
|
|
37
|
+
logger.info("[QiskitInvocation] _create_provider()")
|
|
38
|
+
|
|
39
|
+
return QiskitProviderFactory.create_provider(
|
|
40
|
+
provider_type=self.backend_information.provider_tag,
|
|
41
|
+
sdk=self.sdk,
|
|
42
|
+
authentication=self.backend_information.authentication,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def _create_device(self, provider: Provider):
|
|
46
|
+
logger.info("[QiskitInvocation] _create_device()")
|
|
47
|
+
|
|
48
|
+
return QiskitDeviceFactory.create_device(
|
|
49
|
+
provider=provider,
|
|
50
|
+
device_specification=self.backend_information.device_name,
|
|
51
|
+
authentication=self.backend_information.authentication,
|
|
52
|
+
sdk=self.sdk,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def _get_qubit_amount(self, circuit):
|
|
56
|
+
if isinstance(circuit, QuantumCircuit):
|
|
57
|
+
return int(circuit.num_qubits)
|
|
58
|
+
|
|
59
|
+
raise Exception("Invalid circuit type!")
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_job_fetching.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qapp_common.component.backend.job_fetching import JobFetching
|
|
5
|
+
from qapp_common.data.request.job_fetching_request import JobFetchingRequest
|
|
6
|
+
from qapp_common.config.logging_config import logger
|
|
7
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
8
|
+
from qapp_common.enum.sdk import Sdk
|
|
9
|
+
|
|
10
|
+
from ...factory.qiskit_provider_factory import QiskitProviderFactory
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class QiskitJobFetching(JobFetching):
|
|
14
|
+
|
|
15
|
+
def __init__(self, request_data: JobFetchingRequest):
|
|
16
|
+
super().__init__(request_data)
|
|
17
|
+
|
|
18
|
+
def _collect_provider(self, ):
|
|
19
|
+
logger.info("[QiskitJobFetching] _collect_provider()")
|
|
20
|
+
|
|
21
|
+
return QiskitProviderFactory.create_provider(
|
|
22
|
+
provider_type=ProviderTag.IBM_QUANTUM,
|
|
23
|
+
sdk=Sdk.QISKIT,
|
|
24
|
+
authentication=self.provider_authentication).collect_provider()
|
|
25
|
+
|
|
26
|
+
def _retrieve_job(self, provider):
|
|
27
|
+
logger.info("[QiskitJobFetching] _retrieve_job()")
|
|
28
|
+
|
|
29
|
+
return provider.job(job_id=self.provider_job_id)
|
|
30
|
+
|
|
31
|
+
def _get_job_status(self, job):
|
|
32
|
+
logger.info("[QiskitJobFetching] _get_job_status()")
|
|
33
|
+
|
|
34
|
+
return job.status()
|
|
35
|
+
|
|
36
|
+
def _get_job_result(self, job):
|
|
37
|
+
logger.info("[QiskitJobFetching] _get_job_result()")
|
|
38
|
+
|
|
39
|
+
return job
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_device_factory.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
5
|
+
from qapp_common.enum.sdk import Sdk
|
|
6
|
+
from qapp_common.factory.device_factory import DeviceFactory
|
|
7
|
+
from qapp_common.model.provider.provider import Provider
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
|
|
10
|
+
from ..model.device.oqc_cloud_device import OqcCloudDevice
|
|
11
|
+
from ..model.device.qapp_qiskit_device import QappQiskitDevice
|
|
12
|
+
from ..model.device.ibm_quantum_device import IbmQuantumDevice
|
|
13
|
+
from ..model.device.ibm_cloud_device import IbmCloudDevice
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class QiskitDeviceFactory(DeviceFactory):
|
|
17
|
+
|
|
18
|
+
@staticmethod
|
|
19
|
+
def create_device(provider: Provider, device_specification: str, authentication: dict, sdk: Sdk):
|
|
20
|
+
logger.info("[QiskitDeviceFactory] create_device()")
|
|
21
|
+
|
|
22
|
+
provider_type = ProviderTag.resolve(provider.get_provider_type().value)
|
|
23
|
+
|
|
24
|
+
if ProviderTag.QUAO_QUANTUM_SIMULATOR.__eq__(provider_type) and Sdk.QISKIT.__eq__(sdk):
|
|
25
|
+
return QappQiskitDevice(provider, device_specification)
|
|
26
|
+
|
|
27
|
+
if ProviderTag.IBM_QUANTUM.__eq__(provider_type):
|
|
28
|
+
return IbmQuantumDevice(provider, device_specification)
|
|
29
|
+
|
|
30
|
+
if ProviderTag.IBM_CLOUD.__eq__(provider_type):
|
|
31
|
+
return IbmCloudDevice(provider, device_specification)
|
|
32
|
+
|
|
33
|
+
if ProviderTag.OQC_CLOUD.__eq__(provider_type):
|
|
34
|
+
return OqcCloudDevice(provider, device_specification)
|
|
35
|
+
|
|
36
|
+
raise Exception("Unsupported device!")
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_handler_factory.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from qapp_common.config.logging_config import logger
|
|
6
|
+
from qapp_common.factory.handler_factory import HandlerFactory
|
|
7
|
+
from qapp_common.handler.handler import Handler
|
|
8
|
+
|
|
9
|
+
from ..handler.invocation_handler import InvocationHandler
|
|
10
|
+
from ..handler.job_fetching_handler import JobFetchingHandler
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class QiskitHandlerFactory(HandlerFactory):
|
|
14
|
+
|
|
15
|
+
@staticmethod
|
|
16
|
+
def create_handler(event, circuit_preparation_fn, post_processing_fn) -> Handler:
|
|
17
|
+
logger.info("[QiskitHandlerFactory] create_handler()")
|
|
18
|
+
|
|
19
|
+
request_data = event.json()
|
|
20
|
+
provider_job_id = request_data.get("providerJobId")
|
|
21
|
+
|
|
22
|
+
if provider_job_id is None:
|
|
23
|
+
logger.debug("Create InvocationHandler")
|
|
24
|
+
return InvocationHandler(
|
|
25
|
+
request_data=request_data,
|
|
26
|
+
circuit_preparation_fn=circuit_preparation_fn,
|
|
27
|
+
post_processing_fn=post_processing_fn,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
logger.debug("Create JobFetchingHandler")
|
|
31
|
+
return JobFetchingHandler(
|
|
32
|
+
request_data=request_data, post_processing_fn=post_processing_fn
|
|
33
|
+
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_provider_factory.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
5
|
+
from qapp_common.enum.sdk import Sdk
|
|
6
|
+
from qapp_common.factory.provider_factory import ProviderFactory
|
|
7
|
+
from qapp_common.config.logging_config import logger
|
|
8
|
+
|
|
9
|
+
from ..model.provider.oqc_cloud_provider import OqcCloudProvider
|
|
10
|
+
from ..model.provider.qapp_qiskit_provider import QappQiskitProvider
|
|
11
|
+
from ..model.provider.ibm_quantum_provider import IbmQuantumProvider
|
|
12
|
+
from ..model.provider.ibm_cloud_provider import IbmCloudProvider
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class QiskitProviderFactory(ProviderFactory):
|
|
16
|
+
|
|
17
|
+
@staticmethod
|
|
18
|
+
def create_provider(provider_type: ProviderTag, sdk: Sdk, authentication: dict):
|
|
19
|
+
logger.info("[QiskitProviderFactory] create_provider()")
|
|
20
|
+
|
|
21
|
+
if ProviderTag.QUAO_QUANTUM_SIMULATOR.__eq__(provider_type) and Sdk.QISKIT.__eq__(sdk):
|
|
22
|
+
return QappQiskitProvider()
|
|
23
|
+
|
|
24
|
+
if ProviderTag.IBM_QUANTUM.__eq__(provider_type):
|
|
25
|
+
return IbmQuantumProvider(authentication.get("token"))
|
|
26
|
+
|
|
27
|
+
if ProviderTag.IBM_CLOUD.__eq__(provider_type):
|
|
28
|
+
return IbmCloudProvider(
|
|
29
|
+
authentication.get("token"),
|
|
30
|
+
authentication.get("crn")
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
if ProviderTag.OQC_CLOUD.__eq__(provider_type):
|
|
34
|
+
return OqcCloudProvider(
|
|
35
|
+
authentication.get("url"),
|
|
36
|
+
authentication.get("accessToken")
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
raise Exception("Unsupported provider!")
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp platform Project invocation_handler.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qapp_common.data.request.invocation_request import InvocationRequest
|
|
5
|
+
from qapp_common.handler.handler import Handler
|
|
6
|
+
from qapp_common.config.logging_config import logger
|
|
7
|
+
|
|
8
|
+
from ..component.backend.qiskit_invocation import QiskitInvocation
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InvocationHandler(Handler):
|
|
12
|
+
def __init__(self, request_data: dict,
|
|
13
|
+
circuit_preparation_fn,
|
|
14
|
+
post_processing_fn):
|
|
15
|
+
super().__init__(request_data, post_processing_fn)
|
|
16
|
+
self.circuit_preparation_fn = circuit_preparation_fn
|
|
17
|
+
|
|
18
|
+
def handle(self):
|
|
19
|
+
logger.info("[InvocationHandler] handle()")
|
|
20
|
+
|
|
21
|
+
invocation_request = InvocationRequest(self.request_data)
|
|
22
|
+
|
|
23
|
+
backend = QiskitInvocation(invocation_request)
|
|
24
|
+
|
|
25
|
+
backend.submit_job(circuit_preparation_fn=self.circuit_preparation_fn,
|
|
26
|
+
post_processing_fn=self.post_processing_fn)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project job_fetching_handler.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qapp_common.data.request.job_fetching_request import JobFetchingRequest
|
|
5
|
+
from qapp_common.handler.handler import Handler
|
|
6
|
+
from qapp_common.config.logging_config import logger
|
|
7
|
+
|
|
8
|
+
from ..component.backend.qiskit_job_fetching import QiskitJobFetching
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class JobFetchingHandler(Handler):
|
|
12
|
+
def __init__(self,
|
|
13
|
+
request_data: dict,
|
|
14
|
+
post_processing_fn):
|
|
15
|
+
super().__init__(request_data, post_processing_fn)
|
|
16
|
+
|
|
17
|
+
def handle(self):
|
|
18
|
+
logger.info("[JobFetchingHandler] handle()")
|
|
19
|
+
|
|
20
|
+
request = JobFetchingRequest(self.request_data)
|
|
21
|
+
|
|
22
|
+
job_fetching = QiskitJobFetching(request)
|
|
23
|
+
|
|
24
|
+
fetching_result = job_fetching.fetch(post_processing_fn=self.post_processing_fn)
|
|
25
|
+
|
|
26
|
+
return fetching_result
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project ibm_cloud_device.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit_ibm_runtime import Options, Session, Sampler
|
|
5
|
+
|
|
6
|
+
from qapp_common.config.logging_config import logger
|
|
7
|
+
from qapp_common.data.device.circuit_running_option import CircuitRunningOption
|
|
8
|
+
|
|
9
|
+
from .qiskit_device import QiskitDevice
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IbmCloudDevice(QiskitDevice):
|
|
13
|
+
def _is_simulator(self) -> bool:
|
|
14
|
+
logger.debug('[IBM Cloud] Get device type')
|
|
15
|
+
|
|
16
|
+
return self.device.configuration().simulator
|
|
17
|
+
|
|
18
|
+
def _create_job(self, circuit, options: CircuitRunningOption):
|
|
19
|
+
logger.debug('[IBM Cloud] Create job with {0} shots'.format(options.shots))
|
|
20
|
+
|
|
21
|
+
running_options = Options(optimization_level=1)
|
|
22
|
+
running_options.execution.shots = options.shots
|
|
23
|
+
|
|
24
|
+
with Session(service=self.provider.collect_provider(), backend=self.device) as session:
|
|
25
|
+
sampler = Sampler(session=session, options=running_options)
|
|
26
|
+
job = sampler.run(circuits=circuit)
|
|
27
|
+
|
|
28
|
+
return job
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project ibm_quantum_device.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit import transpile
|
|
5
|
+
|
|
6
|
+
from qiskit_ibm_runtime import SamplerV2 as Sampler
|
|
7
|
+
|
|
8
|
+
from qapp_common.data.device.circuit_running_option import CircuitRunningOption
|
|
9
|
+
from qapp_common.config.logging_config import logger
|
|
10
|
+
|
|
11
|
+
from .qiskit_device import QiskitDevice
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IbmQuantumDevice(QiskitDevice):
|
|
15
|
+
|
|
16
|
+
def _is_simulator(self) -> bool:
|
|
17
|
+
logger.debug('[IbmQuantumDevice] _is_simulator()')
|
|
18
|
+
|
|
19
|
+
return self.device.configuration().simulator
|
|
20
|
+
|
|
21
|
+
def _create_job(self, circuit, options: CircuitRunningOption):
|
|
22
|
+
logger.debug('[IbmQuantumDevice] _create_job() with {0} shots'.format(options.shots))
|
|
23
|
+
|
|
24
|
+
transpiled_circuit = transpile(circuits=circuit, backend=self.device)
|
|
25
|
+
|
|
26
|
+
sampler = Sampler(self.device)
|
|
27
|
+
|
|
28
|
+
return sampler.run([transpiled_circuit], shots=options.shots)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project ibm_cloud_device.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from abc import ABC
|
|
5
|
+
from time import time
|
|
6
|
+
|
|
7
|
+
from qapp_common.config.logging_config import logger
|
|
8
|
+
from qapp_common.data.device.circuit_running_option import CircuitRunningOption
|
|
9
|
+
from qapp_common.enum.status.job_status import JobStatus
|
|
10
|
+
from qapp_common.model.device.custom_device import CustomDevice
|
|
11
|
+
from qapp_common.model.provider.provider import Provider
|
|
12
|
+
from qcaas_client.client import QPUTask, CompilerConfig
|
|
13
|
+
from qiskit.qasm2 import dumps
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class OqcCloudDevice(CustomDevice, ABC):
|
|
17
|
+
|
|
18
|
+
def __init__(self, provider: Provider, device_specification: str):
|
|
19
|
+
super().__init__(provider, device_specification)
|
|
20
|
+
|
|
21
|
+
self.device_specification = device_specification
|
|
22
|
+
|
|
23
|
+
def _create_job(self, circuit, options: CircuitRunningOption):
|
|
24
|
+
logger.debug("[OqcCloudDevice] _create_job() with {0} shots".format(options.shots))
|
|
25
|
+
|
|
26
|
+
start_time = time()
|
|
27
|
+
|
|
28
|
+
qasm_str = dumps(circuit)
|
|
29
|
+
circuit_submit_options = CompilerConfig(repeats=options.shots)
|
|
30
|
+
|
|
31
|
+
task = QPUTask(program=qasm_str, config=circuit_submit_options)
|
|
32
|
+
job = self.device.execute_tasks(task, qpu_id=self.device_specification)
|
|
33
|
+
|
|
34
|
+
self.execution_time = time() - start_time
|
|
35
|
+
|
|
36
|
+
return job
|
|
37
|
+
|
|
38
|
+
def _is_simulator(self) -> bool:
|
|
39
|
+
logger.debug("[OqcCloudDevice] _is_simulator()")
|
|
40
|
+
|
|
41
|
+
return True
|
|
42
|
+
|
|
43
|
+
def _produce_histogram_data(self, job_result) -> dict | None:
|
|
44
|
+
logger.debug("[OqcCloudDevice] _produce_histogram_data()")
|
|
45
|
+
|
|
46
|
+
return next(iter(job_result.result.values()))
|
|
47
|
+
|
|
48
|
+
def _get_provider_job_id(self, job) -> str:
|
|
49
|
+
logger.debug("[OqcCloudDevice] _get_provider_job_id()")
|
|
50
|
+
|
|
51
|
+
return job[0].id
|
|
52
|
+
|
|
53
|
+
def _get_job_status(self, job) -> str:
|
|
54
|
+
logger.debug("[OqcCloudDevice] _get_job_status()")
|
|
55
|
+
|
|
56
|
+
oqc_status = self.device.get_task_status(task_id=job[0].id,
|
|
57
|
+
qpu_id=self.device_specification)
|
|
58
|
+
logger.debug("[OqcCloudDevice] job status: {0} ".format(oqc_status))
|
|
59
|
+
|
|
60
|
+
if "FAILED".__eq__(oqc_status):
|
|
61
|
+
return JobStatus.ERROR.value
|
|
62
|
+
elif "COMPLETED".__eq__(oqc_status):
|
|
63
|
+
return JobStatus.DONE.value
|
|
64
|
+
|
|
65
|
+
return oqc_status
|
|
66
|
+
|
|
67
|
+
def _calculate_execution_time(self, job_result):
|
|
68
|
+
logger.debug("[OqcCloudDevice] _calculate_execution_time()")
|
|
69
|
+
|
|
70
|
+
logger.debug("[OqcCloudDevice] Execution time calculation was: {0} seconds"
|
|
71
|
+
.format(self.execution_time))
|
|
72
|
+
|
|
73
|
+
def _get_job_result(self, job):
|
|
74
|
+
logger.debug("[OqcCloudDevice] _get_job_result()")
|
|
75
|
+
|
|
76
|
+
return job[0]
|
|
77
|
+
|
|
78
|
+
def _get_shots(self, job_result) -> int | None:
|
|
79
|
+
logger.debug("[OqcCloudDevice] _get_shots()")
|
|
80
|
+
result_classical = job_result.result.get('classical')
|
|
81
|
+
if result_classical is not None:
|
|
82
|
+
total_shots = sum(value for value in result_classical.values())
|
|
83
|
+
logger.debug("[OqcCloudDevice] Total shots calculated: {0}".format(total_shots))
|
|
84
|
+
return total_shots
|
|
85
|
+
logger.debug("[OqcCloudDevice] No classical results found.")
|
|
86
|
+
return None
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qapp_qiskit_device.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit import transpile
|
|
5
|
+
|
|
6
|
+
from qapp_common.data.device.circuit_running_option import CircuitRunningOption
|
|
7
|
+
from qapp_common.model.provider.provider import Provider
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
|
|
10
|
+
from .qiskit_device import QiskitDevice
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class QappQiskitDevice(QiskitDevice):
|
|
14
|
+
def __init__(self, provider: Provider,
|
|
15
|
+
device_specification: str):
|
|
16
|
+
super().__init__(provider, device_specification)
|
|
17
|
+
|
|
18
|
+
def _create_job(self, circuit, options: CircuitRunningOption):
|
|
19
|
+
logger.debug('[QappQiskitDevice] _create_job() with {0} shots'.format(options.shots))
|
|
20
|
+
|
|
21
|
+
self.device.set_options(device=options.processing_unit.value,
|
|
22
|
+
shots=options.shots,
|
|
23
|
+
executor=options.executor,
|
|
24
|
+
max_job_size=options.max_job_size)
|
|
25
|
+
transpiled_circuit = transpile(circuits=circuit, backend=self.device)
|
|
26
|
+
|
|
27
|
+
return self.device.run(transpiled_circuit)
|
|
28
|
+
|
|
29
|
+
def _is_simulator(self) -> bool:
|
|
30
|
+
logger.debug('[QappQiskitDevice] _is_simulator()')
|
|
31
|
+
|
|
32
|
+
return True
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qiskit_device.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from abc import ABC
|
|
5
|
+
|
|
6
|
+
from qiskit import QiskitError
|
|
7
|
+
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
from qapp_common.model.device.custom_device import CustomDevice
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class QiskitDevice(CustomDevice, ABC):
|
|
13
|
+
|
|
14
|
+
def _produce_histogram_data(self, job_result) -> dict | None:
|
|
15
|
+
logger.info('[QiskitDevice] _produce_histogram_data()')
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
histogram_data = job_result.get_counts()
|
|
19
|
+
except QiskitError as qiskit_error:
|
|
20
|
+
logger.debug("[QiskitDevice] Can't produce histogram with error: {0}".format(str(qiskit_error)))
|
|
21
|
+
histogram_data = None
|
|
22
|
+
|
|
23
|
+
return histogram_data
|
|
24
|
+
|
|
25
|
+
def _get_provider_job_id(self, job) -> str:
|
|
26
|
+
logger.debug('[QiskitDevice] Get provider job id')
|
|
27
|
+
|
|
28
|
+
return job.job_id()
|
|
29
|
+
|
|
30
|
+
def _get_job_status(self, job) -> str:
|
|
31
|
+
logger.debug('[QiskitDevice] Get job status')
|
|
32
|
+
|
|
33
|
+
return str(job.status()).split(".")[-1]
|
|
34
|
+
|
|
35
|
+
def _calculate_execution_time(self, job_result):
|
|
36
|
+
logger.debug('[QiskitDevice] Calculate execution time')
|
|
37
|
+
|
|
38
|
+
if "metadata" not in job_result:
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
metadata = job_result["metadata"]
|
|
42
|
+
|
|
43
|
+
if metadata is None or not bool(metadata) or "time_taken_execute" not in metadata:
|
|
44
|
+
return None
|
|
45
|
+
|
|
46
|
+
self.execution_time = metadata["time_taken_execute"]
|
|
47
|
+
|
|
48
|
+
logger.debug('[QiskitDevice] Execution time calculation was: {0} seconds'
|
|
49
|
+
.format(self.execution_time))
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
def _get_job_result(self, job):
|
|
53
|
+
logger.debug('[QiskitDevice] _get_job_result()')
|
|
54
|
+
|
|
55
|
+
return job.result()
|
|
56
|
+
|
|
57
|
+
def _get_shots(self, job_result) -> int | None:
|
|
58
|
+
"""
|
|
59
|
+
Get the number of shots used in the job.
|
|
60
|
+
|
|
61
|
+
:param job_result:
|
|
62
|
+
:return: The number of shots used in the job if available, otherwise None.
|
|
63
|
+
"""
|
|
64
|
+
if not job_result.results:
|
|
65
|
+
logger.debug('[QiskitDevice] _get_shots(): No results found in job_result')
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
if job_result.results[0] is None:
|
|
69
|
+
logger.debug('[QiskitDevice] _get_shots(): First result is None')
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
shots = job_result.results[0].shots
|
|
73
|
+
logger.debug('[QiskitDevice] _get_shots(): Number of shots: {0}'.format(shots))
|
|
74
|
+
return shots
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project ibm_cloud_provider.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit_ibm_runtime import QiskitRuntimeService
|
|
5
|
+
from qiskit_ibm_runtime.accounts import ChannelType
|
|
6
|
+
|
|
7
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
8
|
+
from qapp_common.model.provider.provider import Provider
|
|
9
|
+
from qapp_common.config.logging_config import logger
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IbmCloudProvider(Provider):
|
|
13
|
+
|
|
14
|
+
def __init__(self, api_key, crn):
|
|
15
|
+
super().__init__(ProviderTag.IBM_CLOUD)
|
|
16
|
+
self.api_key = api_key
|
|
17
|
+
self.crn = crn
|
|
18
|
+
self.channel: ChannelType = "ibm_cloud"
|
|
19
|
+
|
|
20
|
+
def get_backend(self, device_specification: str):
|
|
21
|
+
logger.debug('[IbmCloudProvider] Get backend')
|
|
22
|
+
|
|
23
|
+
provider = self.collect_provider()
|
|
24
|
+
|
|
25
|
+
return provider.get_backend(name=device_specification)
|
|
26
|
+
|
|
27
|
+
def collect_provider(self):
|
|
28
|
+
logger.debug('[IbmCloudProvider] Connect to provider')
|
|
29
|
+
|
|
30
|
+
return QiskitRuntimeService(channel=self.channel,
|
|
31
|
+
token=self.api_key,
|
|
32
|
+
instance=self.crn)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project ibm_quantum_provider.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit_ibm_runtime import QiskitRuntimeService,Sampler
|
|
5
|
+
|
|
6
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
7
|
+
from qapp_common.model.provider.provider import Provider
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class IbmQuantumProvider(Provider):
|
|
12
|
+
|
|
13
|
+
def __init__(self, api_token):
|
|
14
|
+
super().__init__(ProviderTag.IBM_QUANTUM)
|
|
15
|
+
self.api_token = api_token
|
|
16
|
+
|
|
17
|
+
def get_backend(self, device_specification: str):
|
|
18
|
+
logger.debug('[IbmQuantumProvider] get_backend()')
|
|
19
|
+
|
|
20
|
+
provider = self.collect_provider()
|
|
21
|
+
|
|
22
|
+
return provider.backend(device_specification)
|
|
23
|
+
|
|
24
|
+
def collect_provider(self):
|
|
25
|
+
logger.debug('[IbmQuantumProvider] collect_provider()')
|
|
26
|
+
|
|
27
|
+
return QiskitRuntimeService(channel='ibm_quantum',token=self.api_token)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project oqc_cloud_provider.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qcaas_client.client import OQCClient
|
|
5
|
+
|
|
6
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
7
|
+
from qapp_common.model.provider.provider import Provider
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class OqcCloudProvider(Provider):
|
|
12
|
+
def __init__(self, oqc_cloud_url: str, access_token: str):
|
|
13
|
+
super().__init__(ProviderTag.OQC_CLOUD)
|
|
14
|
+
self.oqc_cloud_url = oqc_cloud_url
|
|
15
|
+
self.access_token = access_token
|
|
16
|
+
|
|
17
|
+
def get_backend(self, device_specification):
|
|
18
|
+
logger.debug("[OqcCloudProvider] get_backend()")
|
|
19
|
+
|
|
20
|
+
return self.collect_provider()
|
|
21
|
+
|
|
22
|
+
def collect_provider(self):
|
|
23
|
+
logger.debug("[OqcCloudProvider] collect_provider()")
|
|
24
|
+
|
|
25
|
+
return OQCClient(url=self.oqc_cloud_url, authentication_token=self.access_token)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QApp Platform Project qapp_qiskit_provider.py Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
3
|
+
"""
|
|
4
|
+
from qiskit_aer import Aer
|
|
5
|
+
|
|
6
|
+
from qapp_common.enum.provider_tag import ProviderTag
|
|
7
|
+
from qapp_common.model.provider.provider import Provider
|
|
8
|
+
from qapp_common.config.logging_config import logger
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class QappQiskitProvider(Provider):
|
|
12
|
+
|
|
13
|
+
def __init__(self, ):
|
|
14
|
+
super().__init__(ProviderTag.QUAO_QUANTUM_SIMULATOR)
|
|
15
|
+
|
|
16
|
+
def get_backend(self, device_specification):
|
|
17
|
+
logger.debug('[QappQiskitProvider] get_backend()')
|
|
18
|
+
|
|
19
|
+
provider = self.collect_provider()
|
|
20
|
+
|
|
21
|
+
device_names = set(map(self.__map_aer_backend_name, provider.backends()))
|
|
22
|
+
|
|
23
|
+
if device_names.__contains__(device_specification):
|
|
24
|
+
return provider.get_backend(device_specification)
|
|
25
|
+
|
|
26
|
+
raise Exception('[QappQiskitProvider] Unsupported device')
|
|
27
|
+
|
|
28
|
+
def collect_provider(self):
|
|
29
|
+
logger.debug('[QappQiskitProvider] collect_provider()')
|
|
30
|
+
|
|
31
|
+
return Aer
|
|
32
|
+
|
|
33
|
+
@staticmethod
|
|
34
|
+
def __map_aer_backend_name(backend):
|
|
35
|
+
return backend.configuration().backend_name
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quapp-qiskit
|
|
3
|
+
Version: 0.0.13.dev1
|
|
4
|
+
Summary: Quapp common library supporting Quapp Platform for Quantum Computing
|
|
5
|
+
Author-email: "CITYNOW Co. Ltd. " <corp@citynow.vn>
|
|
6
|
+
License: The MIT License (MIT)
|
|
7
|
+
Copyright © CITYNOW Co. Ltd. All rights reserved.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
|
+
Project-URL: Homepage, https://citynow.asia/
|
|
15
|
+
Keywords: quapp,quapp-qiskit,quantum
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Requires-Python: <3.11,>=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: oqc-qcaas-client==3.12.0
|
|
23
|
+
Requires-Dist: quapp-common==0.0.11.dev1
|
|
24
|
+
Requires-Dist: qiskit-aer==0.16.1
|
|
25
|
+
Requires-Dist: qiskit-ibm-runtime==0.35.0
|
|
26
|
+
Requires-Dist: qiskit==1.3.2
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: black; extra == "dev"
|
|
29
|
+
Requires-Dist: bumpver; extra == "dev"
|
|
30
|
+
Requires-Dist: isort; extra == "dev"
|
|
31
|
+
Requires-Dist: pip-tools; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# qapp-qiskit
|
|
36
|
+
|
|
37
|
+
qapp-qiskit
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
qapp_qiskit/__init__.py
|
|
5
|
+
qapp_qiskit/async_tasks/__init__.py
|
|
6
|
+
qapp_qiskit/async_tasks/qiskit_circuit_export_task.py
|
|
7
|
+
qapp_qiskit/component/__init__.py
|
|
8
|
+
qapp_qiskit/component/backend/__init__.py
|
|
9
|
+
qapp_qiskit/component/backend/qiskit_invocation.py
|
|
10
|
+
qapp_qiskit/component/backend/qiskit_job_fetching.py
|
|
11
|
+
qapp_qiskit/factory/__init__.py
|
|
12
|
+
qapp_qiskit/factory/qiskit_device_factory.py
|
|
13
|
+
qapp_qiskit/factory/qiskit_handler_factory.py
|
|
14
|
+
qapp_qiskit/factory/qiskit_provider_factory.py
|
|
15
|
+
qapp_qiskit/handler/__init__.py
|
|
16
|
+
qapp_qiskit/handler/invocation_handler.py
|
|
17
|
+
qapp_qiskit/handler/job_fetching_handler.py
|
|
18
|
+
qapp_qiskit/model/__init__.py
|
|
19
|
+
qapp_qiskit/model/device/__init__.py
|
|
20
|
+
qapp_qiskit/model/device/ibm_cloud_device.py
|
|
21
|
+
qapp_qiskit/model/device/ibm_quantum_device.py
|
|
22
|
+
qapp_qiskit/model/device/oqc_cloud_device.py
|
|
23
|
+
qapp_qiskit/model/device/qapp_qiskit_device.py
|
|
24
|
+
qapp_qiskit/model/device/qiskit_device.py
|
|
25
|
+
qapp_qiskit/model/provider/__init__.py
|
|
26
|
+
qapp_qiskit/model/provider/ibm_cloud_provider.py
|
|
27
|
+
qapp_qiskit/model/provider/ibm_quantum_provider.py
|
|
28
|
+
qapp_qiskit/model/provider/oqc_cloud_provider.py
|
|
29
|
+
qapp_qiskit/model/provider/qapp_qiskit_provider.py
|
|
30
|
+
quapp_qiskit.egg-info/PKG-INFO
|
|
31
|
+
quapp_qiskit.egg-info/SOURCES.txt
|
|
32
|
+
quapp_qiskit.egg-info/dependency_links.txt
|
|
33
|
+
quapp_qiskit.egg-info/requires.txt
|
|
34
|
+
quapp_qiskit.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
qapp_qiskit
|