qciconnect 0.3.0__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.
- qciconnect-0.3.0/CHANGELOG.md +76 -0
- qciconnect-0.3.0/CONTRIBUTORS +5 -0
- qciconnect-0.3.0/LICENSE +22 -0
- qciconnect-0.3.0/PKG-INFO +33 -0
- qciconnect-0.3.0/README.md +12 -0
- qciconnect-0.3.0/commons/hequate_common/README.md +0 -0
- qciconnect-0.3.0/commons/hequate_common/__init__.py +1 -0
- qciconnect-0.3.0/commons/hequate_common/models.py +158 -0
- qciconnect-0.3.0/commons/hequate_common/poetry.lock +7 -0
- qciconnect-0.3.0/commons/hequate_common/pyproject.toml +19 -0
- qciconnect-0.3.0/commons/qciconnect_common/.dockerignore +9 -0
- qciconnect-0.3.0/commons/qciconnect_common/.gitignore +129 -0
- qciconnect-0.3.0/commons/qciconnect_common/README.md +28 -0
- qciconnect-0.3.0/commons/qciconnect_common/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/poetry.lock +888 -0
- qciconnect-0.3.0/commons/qciconnect_common/pyproject.toml +34 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_conversion/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_conversion/json_conversion.py +225 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_conversion/tests/test_json_datetime_converter.py +86 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_conversion/tests/test_json_numpy_converter.py +234 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_logging/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_logging/configuration.py +112 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_logging/logger.py +37 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_models/celery/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_models/celery/result.py +51 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_models/task_status.py +19 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_scheduler/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_scheduler/celery_app.py +87 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_settings/__init__.py +1 -0
- qciconnect-0.3.0/commons/qciconnect_common/qciconnect_settings/environment_config.py +54 -0
- qciconnect-0.3.0/examples/example_remote.ipynb +461 -0
- qciconnect-0.3.0/pyproject.toml +55 -0
- qciconnect-0.3.0/qciconnect/__init__.py +3 -0
- qciconnect-0.3.0/qciconnect/client.py +355 -0
- qciconnect-0.3.0/qciconnect/exceptions.py +8 -0
- qciconnect-0.3.0/qciconnect/mageia.py +85 -0
- qciconnect-0.3.0/qciconnect/methods.py +116 -0
- qciconnect-0.3.0/qciconnect/qpus.py +115 -0
- qciconnect-0.3.0/qciconnect/result_handling.py +162 -0
- qciconnect-0.3.0/qciconnect/token_managers.py +109 -0
- qciconnect-0.3.0/qciconnect/utils.py +9 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
## 0.3.0 (2025-05-15)
|
|
2
|
+
|
|
3
|
+
### changed (3 changes)
|
|
4
|
+
|
|
5
|
+
- [Release 0.3.0](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/4e308048e2f2c61fb454c85c6feeeb6cda7f7199) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/68))
|
|
6
|
+
- [Rename hequate -> qciconnect](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/7bc555074613d9b5c7bf12a1293972fe83e11ee9) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/62))
|
|
7
|
+
- [Return a "future" instead of the job id when submitting jobs non-blocking.](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/00f473ec6d411143a1cd57e2df48c8f4edc88b1e) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/51))
|
|
8
|
+
|
|
9
|
+
### fixed (3 changes)
|
|
10
|
+
|
|
11
|
+
- [Fixed missing dependencies and versioning in ci pipeline](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/c226ffaf47ad559913d6e3117520740fd7ce5c72) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/67))
|
|
12
|
+
- [Fixed version numbers](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/2f9a70996dc1fdee06e8ae524fb6104b4cae316c) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/58))
|
|
13
|
+
- [Fixed auto-completion in jupyter notebooks for nested classes](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/e506830adea614c3a95d0dcb5ccf4d7980b60f80) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/66))
|
|
14
|
+
|
|
15
|
+
### added (3 changes)
|
|
16
|
+
|
|
17
|
+
- [Added further code for error handling when accessing qpus.](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/9aee40ae48c2ca49b4a80e36cbb714921f968451) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/61))
|
|
18
|
+
- [Added handling of errors that can occur during initialization of QciConnectClient.](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/7ec3ac526ec7b9c278e0631021c15f5ef962b921) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/63))
|
|
19
|
+
- [Added Further e2e tests (against the platform)](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/41b052932b4b46a7402d2a81574976d0fa3aab22)
|
|
20
|
+
|
|
21
|
+
### improved (1 change)
|
|
22
|
+
|
|
23
|
+
- [Improved error handling so that more meaningful messages are shown to the user](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/commit/b90b19a0c57591cc0caf47c12350ff7f3803d627) ([merge request](https://gitlab.dlr.de/qci-connect/partners/all/qciconnect-sdk/-/merge_requests/65))
|
|
24
|
+
|
|
25
|
+
## 0.2.0 (2025-04-01)
|
|
26
|
+
|
|
27
|
+
### added (12 changes)
|
|
28
|
+
|
|
29
|
+
- [Keycloak support implemented](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/e1ef46b0a5b2783752449abff6dff5ce33e030ec) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/45))
|
|
30
|
+
- [Added "example_remote.ipynb" to test suite so that functionality of the...](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/29d03b29b0e1c6037174d0474228296e5c55980f) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/44))
|
|
31
|
+
- [Added release automation](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/b1d7935a6e892e584cc2f33f9827174b690365fa)
|
|
32
|
+
- [Added changelog-creation automation](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/de48315a9aeb4bd5d171fbd62ece1848d2736b12) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/38))
|
|
33
|
+
- [Added test coverage calculation to the ci](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/7bb7c791)
|
|
34
|
+
- [Implemented Non-blocking calls](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/37368a3a)
|
|
35
|
+
- [Added unit tests for qpu communication](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/98fabd66)
|
|
36
|
+
- [CI: Added build stage. Use this built for the testing](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/755bf1ab)
|
|
37
|
+
- [CI: Added unit tests for hequate client](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/134b1dfd)
|
|
38
|
+
- [CI: Re-enabled end to end tests](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/854d6bb8)
|
|
39
|
+
- [CI: Added end-to-end client tests](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/6e617974)
|
|
40
|
+
- [Added pydantic magic to validate and dump json](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/539f81b2)
|
|
41
|
+
|
|
42
|
+
### changed (5 changes)
|
|
43
|
+
|
|
44
|
+
- [Improved release process](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/c7bfe1f33bbd649154f5fa4cb5e95c7703308a0d) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/40))
|
|
45
|
+
- [Update README.md and minor fixes](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/4ef9d20d5c69b7e74a4c47eef80290c20bd75482) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/30))
|
|
46
|
+
- [Aligned compiler integration with the QCi connect platform](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/d5f64a4225ae1e88962b56e86ad36e0137102a2d) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/35))
|
|
47
|
+
- [Update QSP compiler image](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/a9b179a8d1ab12eb06a653491790804388ed963b) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/36))
|
|
48
|
+
- [Replaced manual rendering of QPU.show() by tabulate lib. Made parameters...](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/94bd834f82d690f74b3799bc3a1932f54ddfc2d0) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/33))
|
|
49
|
+
|
|
50
|
+
### fixed (7 change)
|
|
51
|
+
|
|
52
|
+
- [Check for succesful connection during instantiation](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/214ed08cc19fe676c776cd44fd53c5b4fd295986) ([merge request](https://gitlab.dlr.de/qc/compilation/hequate/-/merge_requests/43))
|
|
53
|
+
- [Increased timeout for blocking interaction with QCI Connect](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/d7d04607)
|
|
54
|
+
- [Enabled use of mini-orchestrator while in VPN](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/3275303d)
|
|
55
|
+
- [Added pyproject.toml for packaging of hequate lib/client](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/e440388d)
|
|
56
|
+
- [Resolved "Improve auto-completion](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/fcbc4f3f)
|
|
57
|
+
- [Removed deprecated files](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/c1fd7877)
|
|
58
|
+
- [Fixed #251: document client side source code](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/93b65a8c)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## 0.1.0 (2025-01-21)
|
|
62
|
+
|
|
63
|
+
### added (7 changes)
|
|
64
|
+
|
|
65
|
+
- [Added a proof of concept for compiler container/image handling of the mini orchestrator](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/dd7d2a6c71ddf657bc96eb48cea009dd133eca0d)
|
|
66
|
+
- [Added basic client side QPU handling](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/49f84a6963116545344c49c50e2ea95b49ed2c7a)
|
|
67
|
+
- [Added usage examples, see hequate/examples folder](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/25cda8cf1372904fd9d108c85ca67b3c0c01f4e4)
|
|
68
|
+
- [Added a first compiler pass](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/99511c3ff3c175b3e58112078a5aa7e1d6f71b51)
|
|
69
|
+
- [Added API client capabilities](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/32a30b1fdc6709cb8373af659cab08888ccdc88a)
|
|
70
|
+
- [Added an orchestrator](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/b75d51ab2b8e7787458d3e820b676afbdcf11fbd)
|
|
71
|
+
- [Added a docker compose setup](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/b240681c2ae1258152aee15ea0210973acca0315)
|
|
72
|
+
|
|
73
|
+
### changed (2 changes)
|
|
74
|
+
|
|
75
|
+
- [Updated the orchestrator](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/54f8d04f7f5f9f7d9b1bee5189777c6589ba27e5)
|
|
76
|
+
- [Updated docker compose setup](https://gitlab.dlr.de/qc/compilation/hequate/-/commit/adf91059870dd46f20564dbc2891717950dee2c4)
|
qciconnect-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 German Aerospace Center / Deutsches Zentrum für Luft- und Raumfahrt (DLR)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: qciconnect
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: An API client to work with the DLR QCI Connect quantum computing platform.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: quantum computing,API client,QCI Connect
|
|
7
|
+
Author: DLR-SC
|
|
8
|
+
Author-email: qc-software@dlr.de
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
15
|
+
Requires-Dist: numpy (>=1.26.0,<2.0.0)
|
|
16
|
+
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
|
|
17
|
+
Requires-Dist: python-keycloak (>=5.3.1,<6.0.0)
|
|
18
|
+
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# QCI Connect SDK
|
|
22
|
+
|
|
23
|
+
This is a python package to interact with the [QCi Connect](http://qc-plat-pro.dlr.de/) platform of the [German Aerospace Center (DLR)](https://www.dlr.de/).
|
|
24
|
+
It also allows to login to the platform, obtain a session token, submit quantum circuits for compilation and execution, and retrieve the results of the execution.
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
The following steps provide a quick start on how to programmatically interact with the QCi Connect platform:
|
|
29
|
+
|
|
30
|
+
- Run `pip install qciconnect`
|
|
31
|
+
- Run `jupyter notebook` and navigate to _./examples/example_remote.ipynb_
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# QCI Connect SDK
|
|
2
|
+
|
|
3
|
+
This is a python package to interact with the [QCi Connect](http://qc-plat-pro.dlr.de/) platform of the [German Aerospace Center (DLR)](https://www.dlr.de/).
|
|
4
|
+
It also allows to login to the platform, obtain a session token, submit quantum circuits for compilation and execution, and retrieve the results of the execution.
|
|
5
|
+
|
|
6
|
+
## Quick start
|
|
7
|
+
|
|
8
|
+
The following steps provide a quick start on how to programmatically interact with the QCi Connect platform:
|
|
9
|
+
|
|
10
|
+
- Run `pip install qciconnect`
|
|
11
|
+
- Run `jupyter notebook` and navigate to _./examples/example_remote.ipynb_
|
|
12
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Init file for hequate_common module."""
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# generated by fastapi-codegen:
|
|
2
|
+
# filename: ./api-wrapper/openapi.yaml
|
|
3
|
+
# timestamp: 2025-01-08T11:10:30+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Any, Dict, List, Optional, Union
|
|
10
|
+
from uuid import UUID
|
|
11
|
+
|
|
12
|
+
from pydantic import BaseModel, Extra, Field, PositiveFloat, PositiveInt, conint, constr
|
|
13
|
+
|
|
14
|
+
class CompilerStatus(Enum):
|
|
15
|
+
running = 'running'
|
|
16
|
+
offline = 'offline'
|
|
17
|
+
maintenance = 'maintenance'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CompilerTable(BaseModel):
|
|
21
|
+
name: str = Field(..., title='Name')
|
|
22
|
+
manufacturer: Optional[str] = Field(..., title='Manufacturer')
|
|
23
|
+
status: CompilerStatus
|
|
24
|
+
description: Optional[constr(min_length=0, max_length=512)] = Field(
|
|
25
|
+
..., title='Description'
|
|
26
|
+
)
|
|
27
|
+
time_limit: PositiveFloat = Field(..., title='Time Limit')
|
|
28
|
+
passes_available: Optional[Dict[str, bool]] = Field(None, title='Passes Available')
|
|
29
|
+
compiler_id: int = Field(..., title='Compiler Id')
|
|
30
|
+
# compiler_alias: str = Field(..., title='Compiler Alias')
|
|
31
|
+
|
|
32
|
+
class CompilerTaskBase(BaseModel):
|
|
33
|
+
compiler_id: Optional[int] = Field(..., title='Compiler Id')
|
|
34
|
+
compilation_pass: str
|
|
35
|
+
options: Optional[Dict[str, Any]] = Field(None, title='Options')
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class CompilerTaskResult(BaseModel):
|
|
39
|
+
meta_data: Any = Field(..., title='Meta Data')
|
|
40
|
+
status: str = Field(..., title='Status')
|
|
41
|
+
status_message: Optional[str] = Field(..., title='Status Message')
|
|
42
|
+
start_date_time: Optional[str] = Field(..., title='Start Date Time')
|
|
43
|
+
end_date_time: Optional[str] = Field(..., title='End Date Time')
|
|
44
|
+
total_runtime: Optional[float] = Field(..., title='Total Runtime')
|
|
45
|
+
compiled_circuit: Optional[Union[str,List[str]]] = Field(..., title='Compiled Circuit')
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Primitive(Enum):
|
|
49
|
+
sampling = 'sampling'
|
|
50
|
+
quantum_state = 'quantum_state'
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class QPUOptions(BaseModel):
|
|
54
|
+
class Config:
|
|
55
|
+
extra = Extra.forbid
|
|
56
|
+
|
|
57
|
+
coupling_map: Optional[List[List[conint(ge=0)]]] = Field(None, title='Coupling Map')
|
|
58
|
+
basis_gates: Optional[List[str]] = Field(None, title='Basis Gates')
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class QPUStatus(Enum):
|
|
62
|
+
idle = 'idle'
|
|
63
|
+
running = 'running'
|
|
64
|
+
offline = 'offline'
|
|
65
|
+
maintenance = 'maintenance'
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class QPUTaskBase(BaseModel):
|
|
69
|
+
total_shots: Optional[conint(ge=1, le=1000000)] = Field(1, title='Total Shots')
|
|
70
|
+
qpu_id: int = Field(..., title='Qpu Id')
|
|
71
|
+
primitive: Optional[Primitive] = 'sampling'
|
|
72
|
+
qpu_options: Optional[QPUOptions]
|
|
73
|
+
class Config:
|
|
74
|
+
use_enum_values = True
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class QPUTaskResult(BaseModel):
|
|
78
|
+
meta_data: Any = Field(..., title='Meta Data')
|
|
79
|
+
status: str = Field(..., title='Status')
|
|
80
|
+
status_message: Optional[str] = Field(..., title='Status Message')
|
|
81
|
+
start_date_time: Optional[str] = Field(..., title='Start Date Time')
|
|
82
|
+
end_date_time: Optional[str] = Field(..., title='End Date Time')
|
|
83
|
+
total_runtime: Optional[float] = Field(..., title='Total Runtime')
|
|
84
|
+
data: Optional[str] = Field(..., title='Data')
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class Technology(Enum):
|
|
88
|
+
statevector_simulator = 'statevector_simulator'
|
|
89
|
+
trapped_ions = 'trapped_ions'
|
|
90
|
+
neutral_atoms = 'neutral_atoms'
|
|
91
|
+
vacancy_centers = 'vacancy_centers'
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class ValidationError(BaseModel):
|
|
95
|
+
loc: List[Union[str, int]] = Field(..., title='Location')
|
|
96
|
+
msg: str = Field(..., title='Message')
|
|
97
|
+
type: str = Field(..., title='Error Type')
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class HTTPValidationError(BaseModel):
|
|
101
|
+
detail: Optional[List[ValidationError]] = Field(None, title='Detail')
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class JobInfo(BaseModel):
|
|
105
|
+
circuit: str = Field(..., title='Circuit')
|
|
106
|
+
primitive: Optional[Primitive] = 'sampling'
|
|
107
|
+
name: constr(min_length=1, max_length=64) = Field(..., title='Name')
|
|
108
|
+
comment: Optional[constr(min_length=0, max_length=512)] = Field(
|
|
109
|
+
..., title='Comment'
|
|
110
|
+
)
|
|
111
|
+
job_id: UUID = Field(..., title='Job Id')
|
|
112
|
+
submission_date_time: datetime = Field(..., title='Submission Date Time')
|
|
113
|
+
status: str = Field(..., title='Status')
|
|
114
|
+
status_message: Optional[str] = Field(..., title='Status Message')
|
|
115
|
+
qpu_name: str = Field(..., title='Qpu Name')
|
|
116
|
+
last_compiler_task: Optional[CompilerTaskBase]
|
|
117
|
+
last_qpu_task: Optional[QPUTaskBase]
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class JobResult(BaseModel):
|
|
121
|
+
status: str = Field(..., title='Status')
|
|
122
|
+
status_message: Optional[str] = Field(..., title='Status Message')
|
|
123
|
+
start_date_time: Optional[str] = Field(..., title='Start Date Time')
|
|
124
|
+
end_date_time: Optional[str] = Field(..., title='End Date Time')
|
|
125
|
+
total_runtime: Optional[float] = Field(..., title='Total Runtime')
|
|
126
|
+
last_compiler_result: Optional[CompilerTaskResult]
|
|
127
|
+
last_qpu_result: Optional[QPUTaskResult]
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class JobSubmission(BaseModel):
|
|
131
|
+
circuit: str = Field(..., title='Circuit')
|
|
132
|
+
primitive: Optional[Primitive] = 'sampling'
|
|
133
|
+
name: constr(min_length=1, max_length=64) = Field(..., title='Name')
|
|
134
|
+
comment: Optional[constr(min_length=0, max_length=512)] = Field(
|
|
135
|
+
..., title='Comment'
|
|
136
|
+
)
|
|
137
|
+
tasks: List[Union[CompilerTaskBase, QPUTaskBase]] = Field(..., title='Tasks')
|
|
138
|
+
class Config:
|
|
139
|
+
use_enum_values = True
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class QPUTable(BaseModel):
|
|
143
|
+
manufacturer: str = Field(..., title='Manufacturer')
|
|
144
|
+
name: str = Field(..., title='Name')
|
|
145
|
+
technology: Technology
|
|
146
|
+
status: QPUStatus
|
|
147
|
+
number_of_qubits_available: PositiveInt = Field(
|
|
148
|
+
..., title='Number Of Qubits Available'
|
|
149
|
+
)
|
|
150
|
+
circuit_depth_limit: conint(ge=0) = Field(..., title='Circuit Depth Limit')
|
|
151
|
+
shot_limit: PositiveInt = Field(..., title='Shot Limit')
|
|
152
|
+
description: Optional[constr(min_length=0, max_length=512)] = Field(
|
|
153
|
+
..., title='Description'
|
|
154
|
+
)
|
|
155
|
+
time_limit: PositiveFloat = Field(..., title='Time Limit')
|
|
156
|
+
measurement_required: Optional[bool] = Field(..., title='Measurement Required')
|
|
157
|
+
qpu_id: int = Field(..., title='Qpu Id')
|
|
158
|
+
qpu_alias: str = Field(..., title='Qpu Alias')
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "hequate_common"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
|
|
5
|
+
[tool.poetry]
|
|
6
|
+
name = "hequate_common"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = ""
|
|
9
|
+
authors = ["Hequate Software Team"]
|
|
10
|
+
packages = [
|
|
11
|
+
{include = "hequate_common", from = ".."}
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[tool.poetry.dependencies]
|
|
15
|
+
python = "3.12.7"
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["poetry-core"]
|
|
19
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
target/
|
|
73
|
+
|
|
74
|
+
# Jupyter Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# IPython
|
|
78
|
+
profile_default/
|
|
79
|
+
ipython_config.py
|
|
80
|
+
|
|
81
|
+
# pyenv
|
|
82
|
+
.python-version
|
|
83
|
+
|
|
84
|
+
# pipenv
|
|
85
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
86
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
87
|
+
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
|
|
88
|
+
# install all needed dependencies.
|
|
89
|
+
#Pipfile.lock
|
|
90
|
+
|
|
91
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
92
|
+
**/__pypackages__/
|
|
93
|
+
|
|
94
|
+
# Celery stuff
|
|
95
|
+
celerybeat-schedule
|
|
96
|
+
celerybeat.pid
|
|
97
|
+
|
|
98
|
+
# SageMath parsed files
|
|
99
|
+
*.sage.py
|
|
100
|
+
|
|
101
|
+
# Environments
|
|
102
|
+
.env
|
|
103
|
+
.venv
|
|
104
|
+
env/
|
|
105
|
+
venv/
|
|
106
|
+
ENV/
|
|
107
|
+
env.bak/
|
|
108
|
+
venv.bak/
|
|
109
|
+
|
|
110
|
+
# Spyder project settings
|
|
111
|
+
.spyderproject
|
|
112
|
+
.spyproject
|
|
113
|
+
|
|
114
|
+
# Rope project settings
|
|
115
|
+
.ropeproject
|
|
116
|
+
|
|
117
|
+
# mkdocs documentation
|
|
118
|
+
/site
|
|
119
|
+
|
|
120
|
+
# mypy
|
|
121
|
+
.mypy_cache/
|
|
122
|
+
.dmypy.json
|
|
123
|
+
dmypy.json
|
|
124
|
+
|
|
125
|
+
# Pyre type checker
|
|
126
|
+
.pyre/
|
|
127
|
+
|
|
128
|
+
# profiling data
|
|
129
|
+
.prof
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# qciconnect_common
|
|
2
|
+
|
|
3
|
+
The qciconnect_common component contains packages or modules that can be shared and reused across all other components. The component is seperated into different sub-components based on their related technical background or functionality. The component can be included in other services by including
|
|
4
|
+
|
|
5
|
+
[tool.poetry.dependencies]
|
|
6
|
+
...
|
|
7
|
+
qciconnect_common = {path = "../commons/qciconnect_common/"}
|
|
8
|
+
...
|
|
9
|
+
|
|
10
|
+
in the respective pyproject.toml file. Don't forget to include the relevant packages also in your Dockerfiles (see Orchestrator Dockerfile).
|
|
11
|
+
|
|
12
|
+
Please be aware that the command `poetry install` is not necessary for this module, as there is no need to set up an independent Python environment and the component isn't designed to operate autonomously. The existing pyproject.toml file merely provides essential information about the module, and its purpose is to facilitate the module's integration into other services.
|
|
13
|
+
|
|
14
|
+
## qciconnect_logging
|
|
15
|
+
|
|
16
|
+
Within this qciconnect_common package, a logger is setup for universal application across all components of the platform. This logger is imbued with an array of formatting options specifically designed to streamline the debugging process. It allows users to seamlessly import and apply it to their individual services or modules, thereby ensuring uniformly formatted and consistent logging information across the complete platform. At this stage, log outputs are solely directed to the console. However, it is our future intention to accumulate these logs, particularly within a production environment setting.
|
|
17
|
+
|
|
18
|
+
## qciconnect_scheduler
|
|
19
|
+
|
|
20
|
+
Contains a celery app factory with default connection strings. To be used by all other services that require a Celery instance.
|
|
21
|
+
|
|
22
|
+
## qciconnect_settings
|
|
23
|
+
|
|
24
|
+
Holds environmental variable settings. Env variables defined in a .env file will automatically populate in a corresponding Python class `EnvironmentSettings`. The `get_settings` method can be used to access the variables in different services.
|
|
25
|
+
|
|
26
|
+
## qciconnect_conversion
|
|
27
|
+
|
|
28
|
+
Provides various helper classes with methods for conversion between data formats, for which no onboard tools exist, e.g., between JSON compatible strings and complex numbers, Numpy arrays, datetime, etc.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Init file for qciconnect_common module."""
|