quantum-loop 0.1.2__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of quantum-loop might be problematic. Click here for more details.

@@ -17,4 +17,6 @@ __all__ = (
17
17
  "count_qubits",
18
18
  )
19
19
 
20
- from quantum_loop.loop import LoopMode, QuantumLoop, count_qubits
20
+
21
+ from ql.loop import LoopMode, QuantumLoop
22
+ from ql.utils import count_qubits
@@ -18,7 +18,6 @@ The module contains the following tools:
18
18
  from __future__ import annotations
19
19
 
20
20
  import concurrent.futures
21
- import multiprocessing
22
21
  from collections.abc import Callable, Iterable
23
22
  from enum import Enum
24
23
  from typing import Any, Never, assert_never
@@ -31,30 +30,11 @@ class LoopMode(Enum):
31
30
  THREAD_POOL = 2
32
31
 
33
32
 
34
- def count_qubits() -> int:
35
- """Counting the number of conceptual qubits of your computer.
36
-
37
- Conceptual qubit is quantum of algorithm (task) that is executed in
38
- iterations of a cycle in a separate processor thread.
39
-
40
- Quantum of algorithm is a function for data processing.
41
-
42
- Examples:
43
- >>> from xloft.quantum import count_qubits
44
- >>> count_qubits()
45
- 16
46
-
47
- Returns:
48
- The number of conceptual qubits.
49
- """
50
- return multiprocessing.cpu_count()
51
-
52
-
53
33
  class QuantumLoop:
54
34
  """Separation of the cycle into quantum algorithms for multiprocessing data processing.
55
35
 
56
36
  Examples:
57
- >>> from xloft.quantum import QuantumLoop
37
+ >>> from ql import QuantumLoop
58
38
  >>> def task(item):
59
39
  ... return item * item
60
40
  >>> data = range(10)
ql/utils.py ADDED
@@ -0,0 +1,24 @@
1
+ """Utils."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import multiprocessing
6
+
7
+
8
+ def count_qubits() -> int:
9
+ """Counting the number of conceptual qubits of your computer.
10
+
11
+ Conceptual qubit is quantum of algorithm (task) that is executed in
12
+ iterations of a cycle in a separate processor thread.
13
+
14
+ Quantum of algorithm is a function for data processing.
15
+
16
+ Examples:
17
+ >>> from ql import count_qubits
18
+ >>> count_qubits()
19
+ 16
20
+
21
+ Returns:
22
+ The number of conceptual qubits.
23
+ """
24
+ return multiprocessing.cpu_count()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantum-loop
3
- Version: 0.1.2
3
+ Version: 0.2.0
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
@@ -73,6 +73,10 @@ Description-Content-Type: text/markdown
73
73
  </p>
74
74
  </div>
75
75
 
76
+ ##
77
+
78
+ <br>
79
+
76
80
  ## Documentation
77
81
 
78
82
  Online browsable documentation is available at [https://kebasyaty.github.io/quantum-loop/](https://kebasyaty.github.io/quantum-loop/ "Documentation").
@@ -90,7 +94,7 @@ uv add quantum-loop
90
94
  ## Usage
91
95
 
92
96
  ```python
93
- from quantum_loop import LoopMode, QuantumLoop, count_qubits
97
+ from ql import LoopMode, QuantumLoop, count_qubits
94
98
 
95
99
  # Counting the number of conceptual qubits of your computer.
96
100
  num = count_qubits()
@@ -104,7 +108,7 @@ data = range(10)
104
108
 
105
109
  # Separation of the cycle into quantum algorithms for
106
110
  # multiprocessing data processing.
107
- results = quantum-loopLoop(task, data).run()
111
+ results = QuantumLoop(task, data).run()
108
112
  print(results) # => [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
109
113
  ```
110
114
 
@@ -0,0 +1,8 @@
1
+ ql/__init__.py,sha256=ZRQ0z14P0H_TEUnAspjNJuWxDul-S03U8iVa5Tg8SQc,607
2
+ ql/loop.py,sha256=Lcx_b_FQHOnf7HDJKAll8rzU_6f8EU4V5ozaLPj5kMI,4132
3
+ ql/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ ql/utils.py,sha256=MPRUYSlD8DN7Hb28X3ru9bBnsiQ39IPAQ0w23sikRZM,579
5
+ quantum_loop-0.2.0.dist-info/METADATA,sha256=rLcA5Xzn4paiSAmOn2cCjwaQDotIElojhYdqFUAU6mM,5883
6
+ quantum_loop-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ quantum_loop-0.2.0.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
8
+ quantum_loop-0.2.0.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- quantum_loop/__init__.py,sha256=CfmdL_nJ6QHGNRYmQ0qlPUVfBdZiUeBULMTHwOp9gvU,594
2
- quantum_loop/loop.py,sha256=ZkFqqFROC9j5JbwJmej3yL9VJcqElPrrimFTz0Pe3Mk,4679
3
- quantum_loop/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- quantum_loop-0.1.2.dist-info/METADATA,sha256=wI5bKiUxvvX_1ZHQPKZb6-G5pWBH0Px41cxOU3zCfIk,5888
5
- quantum_loop-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- quantum_loop-0.1.2.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
7
- quantum_loop-0.1.2.dist-info/RECORD,,
File without changes