quantum-loop 0.2.3__py3-none-any.whl → 0.2.5__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.
Potentially problematic release.
This version of quantum-loop might be problematic. Click here for more details.
- {quantum_loop-0.2.3.dist-info → quantum_loop-0.2.5.dist-info}/METADATA +54 -6
- {quantum_loop-0.2.3.dist-info → quantum_loop-0.2.5.dist-info}/RECORD +4 -4
- {quantum_loop-0.2.3.dist-info → quantum_loop-0.2.5.dist-info}/WHEEL +0 -0
- {quantum_loop-0.2.3.dist-info → quantum_loop-0.2.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantum-loop
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: A set of tools for quantum calculations.
|
|
5
5
|
Project-URL: Homepage, https://github.com/kebasyaty/quantum-loop
|
|
6
6
|
Project-URL: Repository, https://github.com/kebasyaty/quantum-loop
|
|
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
25
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
25
26
|
Classifier: Topic :: Software Development :: Libraries
|
|
26
27
|
Classifier: Typing :: Typed
|
|
@@ -94,12 +95,9 @@ uv add quantum-loop
|
|
|
94
95
|
## Usage
|
|
95
96
|
|
|
96
97
|
```python
|
|
97
|
-
|
|
98
|
+
"""Count qubits."""
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
def task(num: int) -> int | None:
|
|
101
|
-
"""Quantum."""
|
|
102
|
-
return num * num if num % 2 == 0 else None
|
|
100
|
+
from ql import count_qubits
|
|
103
101
|
|
|
104
102
|
|
|
105
103
|
def main() -> None:
|
|
@@ -107,6 +105,23 @@ def main() -> None:
|
|
|
107
105
|
num = count_qubits()
|
|
108
106
|
print(num) # => 16
|
|
109
107
|
|
|
108
|
+
|
|
109
|
+
if __name__ == "__main__":
|
|
110
|
+
main()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
"""QuantumLoop - LoopMode.PROCESS_POOL ."""
|
|
115
|
+
|
|
116
|
+
from ql import QuantumLoop
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def task(num: int) -> int | None:
|
|
120
|
+
"""Quantum."""
|
|
121
|
+
return num * num if num % 2 == 0 else None
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def main() -> None:
|
|
110
125
|
# Separation of the cycle into quantum algorithms for
|
|
111
126
|
# multiprocessing data processing.
|
|
112
127
|
data = range(1, 10)
|
|
@@ -114,6 +129,39 @@ def main() -> None:
|
|
|
114
129
|
print(results) # => [4, 16, 36, 64]
|
|
115
130
|
|
|
116
131
|
|
|
132
|
+
if __name__ == "__main__":
|
|
133
|
+
main()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
"""QuantumLoop - LoopMode.THREAD_POOL ."""
|
|
138
|
+
|
|
139
|
+
from pathlib import Path
|
|
140
|
+
from ql import LoopMode, QuantumLoop
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def task(path: str) -> str:
|
|
144
|
+
"""Quantum."""
|
|
145
|
+
with Path(path).open("r", encoding="utf-8") as f:
|
|
146
|
+
return f.readline().strip()
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def main() -> None:
|
|
150
|
+
# Separation of the cycle into quantum algorithms for
|
|
151
|
+
# multiprocessing data processing.
|
|
152
|
+
data = [
|
|
153
|
+
"assets/files/file_1.txt",
|
|
154
|
+
"assets/files/file_2.txt",
|
|
155
|
+
"assets/files/file_3.txt",
|
|
156
|
+
]
|
|
157
|
+
results = QuantumLoop(
|
|
158
|
+
task,
|
|
159
|
+
data,
|
|
160
|
+
mode=LoopMode.THREAD_POOL,
|
|
161
|
+
).run()
|
|
162
|
+
print(results) # => ["Hello World 1", "Hello World 2", "Hello World 3"]
|
|
163
|
+
|
|
164
|
+
|
|
117
165
|
if __name__ == "__main__":
|
|
118
166
|
main()
|
|
119
167
|
```
|
|
@@ -2,7 +2,7 @@ ql/__init__.py,sha256=NLJqDzx9z_phVVusAGUxDyKJhW35_1Ex0PoiZbvStsQ,607
|
|
|
2
2
|
ql/loop.py,sha256=93zLjIp2_ao7AcQYtYKcpNd5wtaNEs46KoPy4obP0ZY,3802
|
|
3
3
|
ql/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
ql/utils.py,sha256=7q9hj1Z3Yqmo2t4EpXDu5aQ8AaRpS984TsjHbiNaeCA,868
|
|
5
|
-
quantum_loop-0.2.
|
|
6
|
-
quantum_loop-0.2.
|
|
7
|
-
quantum_loop-0.2.
|
|
8
|
-
quantum_loop-0.2.
|
|
5
|
+
quantum_loop-0.2.5.dist-info/METADATA,sha256=PENdNcWI25TIWuB2Z1N4CUeyQPkedWAaOsEszqd6xmw,6907
|
|
6
|
+
quantum_loop-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
+
quantum_loop-0.2.5.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
|
|
8
|
+
quantum_loop-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|