quantum-loop 0.1.3__py3-none-any.whl → 0.3.3__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.
- ql/__init__.py +37 -0
- {quantum_loop → ql}/loop.py +101 -132
- ql/utils.py +38 -0
- {quantum_loop-0.1.3.dist-info → quantum_loop-0.3.3.dist-info}/METADATA +73 -22
- quantum_loop-0.3.3.dist-info/RECORD +8 -0
- {quantum_loop-0.1.3.dist-info → quantum_loop-0.3.3.dist-info}/WHEEL +1 -1
- {quantum_loop-0.1.3.dist-info → quantum_loop-0.3.3.dist-info}/licenses/LICENSE +21 -21
- quantum_loop/__init__.py +0 -20
- quantum_loop-0.1.3.dist-info/RECORD +0 -7
- {quantum_loop → ql}/py.typed +0 -0
ql/__init__.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# .::::::. ... ::: :::. :::. :::.::::::::::::... :::. :
|
|
3
|
+
# ,;;'```';;, ;; ;;; ;;`;; `;;;;, `;;;;;;;;;;;'''';; ;;;;;,. ;;;
|
|
4
|
+
# [[[ [[[\[[' [[[ ,[[ '[[, [[[[[. '[[ [[ [[' [[[[[[[, ,[[[[,
|
|
5
|
+
# "$$c cc$$$"$$ $$$c$$$cc$$$c $$$ "Y$c$$ $$ $$ $$$$$$$$$$$"$$$
|
|
6
|
+
# "*8bo,Y88b,88 .d888 888 888,888 Y88 88, 88 .d888888 Y88" 888o
|
|
7
|
+
# "*YP" "M" "YmmMMMM"" YMM ""` MMM YM MMM "YmmMMMM""MMM M' "MMM
|
|
8
|
+
# ::: ... ... ::::::::::.
|
|
9
|
+
# ;;; .;;;;;;;. .;;;;;;;. `;;;```.;;;
|
|
10
|
+
# [[[ ,[[ \[[,,[[ \[[,`]]nnn]]'
|
|
11
|
+
# $$' $$$, $$$$$$, $$$ $$$""
|
|
12
|
+
# o88oo,.__"888,_ _,88P"888,_ _,88P 888o
|
|
13
|
+
# """"YUMMM "YMMMMMP" "YMMMMMP" YMMMb
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
"""A set of tools for quantum calculations.
|
|
17
|
+
|
|
18
|
+
A Qubit in a regular computer is quantum of algorithm that is executed in
|
|
19
|
+
one iteration of a cycle in a separate processor thread.
|
|
20
|
+
|
|
21
|
+
Quantum is a function with an algorithm of task for data processing.
|
|
22
|
+
|
|
23
|
+
In this case, the Qubit is not a single information,
|
|
24
|
+
but it is a concept of the principle of operation of quantum calculations on a regular computer.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
|
|
29
|
+
__all__ = (
|
|
30
|
+
"QuantumLoop",
|
|
31
|
+
"LoopMode",
|
|
32
|
+
"count_qubits",
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
from ql.loop import QuantumLoop
|
|
37
|
+
from ql.utils import LoopMode, count_qubits
|
{quantum_loop → ql}/loop.py
RENAMED
|
@@ -1,132 +1,101 @@
|
|
|
1
|
-
"""A set of tools for quantum calculations.
|
|
2
|
-
|
|
3
|
-
A Qubit in a regular computer is quantum of algorithm that is executed in
|
|
4
|
-
one iteration of a cycle in a separate processor thread.
|
|
5
|
-
|
|
6
|
-
Quantum is a function with an algorithm of task for data processing.
|
|
7
|
-
|
|
8
|
-
In this case, the Qubit is not a single information,
|
|
9
|
-
but it is a concept of the principle of operation of quantum calculations on a regular computer.
|
|
10
|
-
|
|
11
|
-
The module contains the following tools:
|
|
12
|
-
|
|
13
|
-
- `
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
from
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
max_workers
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
self
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
chunksize=self.chunksize,
|
|
103
|
-
),
|
|
104
|
-
)
|
|
105
|
-
return results # noqa: RET504
|
|
106
|
-
|
|
107
|
-
def thread_pool(self) -> list[Any]:
|
|
108
|
-
"""More suitable for tasks related to input-output
|
|
109
|
-
(for example, network queries, file operations),
|
|
110
|
-
where GIL is freed during input-output operations.""" # noqa: D205, D209
|
|
111
|
-
with concurrent.futures.ThreadPoolExecutor(self.max_workers) as executor:
|
|
112
|
-
results = list(
|
|
113
|
-
executor.map(
|
|
114
|
-
self.quantum,
|
|
115
|
-
self.data,
|
|
116
|
-
timeout=self.timeout,
|
|
117
|
-
chunksize=self.chunksize,
|
|
118
|
-
),
|
|
119
|
-
)
|
|
120
|
-
return results # noqa: RET504
|
|
121
|
-
|
|
122
|
-
def run(self) -> list[Any]:
|
|
123
|
-
"""Run the quantum loop."""
|
|
124
|
-
results: list[Any] = []
|
|
125
|
-
match self.mode.value:
|
|
126
|
-
case 1:
|
|
127
|
-
results = self.process_pool()
|
|
128
|
-
case 2:
|
|
129
|
-
results = self.thread_pool()
|
|
130
|
-
case _ as unreachable:
|
|
131
|
-
assert_never(Never(unreachable))
|
|
132
|
-
return results
|
|
1
|
+
"""A set of tools for quantum calculations.
|
|
2
|
+
|
|
3
|
+
A Qubit in a regular computer is quantum of algorithm that is executed in
|
|
4
|
+
one iteration of a cycle in a separate processor thread.
|
|
5
|
+
|
|
6
|
+
Quantum is a function with an algorithm of task for data processing.
|
|
7
|
+
|
|
8
|
+
In this case, the Qubit is not a single information,
|
|
9
|
+
but it is a concept of the principle of operation of quantum calculations on a regular computer.
|
|
10
|
+
|
|
11
|
+
The module contains the following tools:
|
|
12
|
+
|
|
13
|
+
- `QuantumLoop` - Separation of the cycle into quantum algorithms for multiprocessing data processing.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import concurrent.futures
|
|
19
|
+
from collections.abc import Callable, Iterable
|
|
20
|
+
from typing import Any, Never, assert_never
|
|
21
|
+
|
|
22
|
+
from ql.utils import LoopMode
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class QuantumLoop:
|
|
26
|
+
"""Separation of the cycle into quantum algorithms for multiprocessing data processing.
|
|
27
|
+
|
|
28
|
+
Examples:
|
|
29
|
+
>>> from ql import QuantumLoop
|
|
30
|
+
>>> def task(num: int) -> int | None:
|
|
31
|
+
... return num * num if num % 2 == 0 else None
|
|
32
|
+
>>> data = range(1, 10)
|
|
33
|
+
>>> QuantumLoop(task, data).run()
|
|
34
|
+
[4, 16, 36, 64]
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
task: Function with a task algorithm.
|
|
38
|
+
data: The data that needs to be processed.
|
|
39
|
+
max_workers: The maximum number of processes that can be used to
|
|
40
|
+
execute the given calls. If None or not given then as many
|
|
41
|
+
worker processes will be created as the machine has processors.
|
|
42
|
+
timeout: The number of seconds to wait for the result if the future isn't done.
|
|
43
|
+
If None, then there is no limit on the wait time.
|
|
44
|
+
mode: The operating mode for a quantum loop: LoopMode.PROCESS_POOL | LoopMode.THREAD_POOL.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__( # noqa: D107
|
|
48
|
+
self,
|
|
49
|
+
task: Callable,
|
|
50
|
+
data: Iterable[Any],
|
|
51
|
+
max_workers: int | None = None,
|
|
52
|
+
timeout: float | None = None,
|
|
53
|
+
mode: LoopMode = LoopMode.PROCESS_POOL,
|
|
54
|
+
) -> None:
|
|
55
|
+
self.task = task
|
|
56
|
+
self.data = data
|
|
57
|
+
self.max_workers = max_workers
|
|
58
|
+
self.timeout = timeout
|
|
59
|
+
self.mode = mode
|
|
60
|
+
|
|
61
|
+
def process_pool(self) -> list[Any]:
|
|
62
|
+
"""Better suitable for operations for which large processor resources are required."""
|
|
63
|
+
task = self.task
|
|
64
|
+
data = self.data
|
|
65
|
+
timeout = self.timeout
|
|
66
|
+
results: list[Any] = []
|
|
67
|
+
with concurrent.futures.ProcessPoolExecutor(self.max_workers) as executor:
|
|
68
|
+
for item in data:
|
|
69
|
+
future = executor.submit(task, item)
|
|
70
|
+
result = future.result(timeout)
|
|
71
|
+
if result is not None:
|
|
72
|
+
results.append(result)
|
|
73
|
+
return results
|
|
74
|
+
|
|
75
|
+
def thread_pool(self) -> list[Any]:
|
|
76
|
+
"""More suitable for tasks related to input-output
|
|
77
|
+
(for example, network queries, file operations),
|
|
78
|
+
where GIL is freed during input-output operations.""" # noqa: D205, D209
|
|
79
|
+
task = self.task
|
|
80
|
+
data = self.data
|
|
81
|
+
timeout = self.timeout
|
|
82
|
+
results: list[Any] = []
|
|
83
|
+
with concurrent.futures.ThreadPoolExecutor(self.max_workers) as executor:
|
|
84
|
+
for item in data:
|
|
85
|
+
future = executor.submit(task, item)
|
|
86
|
+
result = future.result(timeout)
|
|
87
|
+
if result is not None:
|
|
88
|
+
results.append(result)
|
|
89
|
+
return results
|
|
90
|
+
|
|
91
|
+
def run(self) -> list[Any]:
|
|
92
|
+
"""Run the quantum loop."""
|
|
93
|
+
results: list[Any] = []
|
|
94
|
+
match self.mode.value:
|
|
95
|
+
case 1:
|
|
96
|
+
results = self.process_pool()
|
|
97
|
+
case 2:
|
|
98
|
+
results = self.thread_pool()
|
|
99
|
+
case _ as unreachable:
|
|
100
|
+
assert_never(Never(unreachable))
|
|
101
|
+
return results
|
ql/utils.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Utils.
|
|
2
|
+
|
|
3
|
+
The module contains the following tools:
|
|
4
|
+
|
|
5
|
+
- `LoopMode` - Quantum loop mode.
|
|
6
|
+
- `count_qubits()` - Counting the number of conceptual qubits of your computer.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import multiprocessing
|
|
12
|
+
from enum import Enum
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class LoopMode(Enum):
|
|
16
|
+
"""Quantum loop mode."""
|
|
17
|
+
|
|
18
|
+
PROCESS_POOL = 1
|
|
19
|
+
THREAD_POOL = 2
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def count_qubits() -> int:
|
|
23
|
+
"""Counting the number of conceptual qubits of your computer.
|
|
24
|
+
|
|
25
|
+
Conceptual qubit is quantum of algorithm (task) that is executed in
|
|
26
|
+
iterations of a cycle in a separate processor thread.
|
|
27
|
+
|
|
28
|
+
Quantum of algorithm is a function for data processing.
|
|
29
|
+
|
|
30
|
+
Examples:
|
|
31
|
+
>>> from ql import count_qubits
|
|
32
|
+
>>> count_qubits()
|
|
33
|
+
16
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
The number of conceptual qubits.
|
|
37
|
+
"""
|
|
38
|
+
return multiprocessing.cpu_count()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantum-loop
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.3
|
|
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
|
|
@@ -31,7 +32,7 @@ Description-Content-Type: text/markdown
|
|
|
31
32
|
<p align="center">
|
|
32
33
|
<a href="https://github.com/kebasyaty/quantum-loop">
|
|
33
34
|
<img
|
|
34
|
-
height="
|
|
35
|
+
height="80"
|
|
35
36
|
alt="Logo"
|
|
36
37
|
src="https://raw.githubusercontent.com/kebasyaty/quantum-loop/main/assets/logo.svg">
|
|
37
38
|
</a>
|
|
@@ -46,18 +47,11 @@ Description-Content-Type: text/markdown
|
|
|
46
47
|
<a href="https://pypi.python.org/pypi/quantum-loop/" alt="PyPI status"><img src="https://img.shields.io/pypi/status/quantum-loop.svg" alt="PyPI status"></a>
|
|
47
48
|
<a href="https://pypi.python.org/pypi/quantum-loop/" alt="PyPI version fury.io"><img src="https://badge.fury.io/py/quantum-loop.svg" alt="PyPI version fury.io"></a>
|
|
48
49
|
<br>
|
|
49
|
-
<a href="https://github.com/kebasyaty/quantum-loop/issues"><img src="https://img.shields.io/github/issues/kebasyaty/quantum-loop.svg" alt="GitHub issues"></a>
|
|
50
|
-
<a href="https://pepy.tech/projects/quantum-loop"><img src="https://static.pepy.tech/badge/quantum-loop" alt="PyPI Downloads"></a>
|
|
51
|
-
<a href="https://github.com/kebasyaty/quantum-loop/blob/main/LICENSE" alt="GitHub license"><img src="https://img.shields.io/github/license/kebasyaty/quantum-loop" alt="GitHub license"></a>
|
|
52
50
|
<a href="https://mypy-lang.org/" alt="Types: Mypy"><img src="https://img.shields.io/badge/types-Mypy-202235.svg?color=0c7ebf" alt="Types: Mypy"></a>
|
|
53
51
|
<a href="https://docs.astral.sh/ruff/" alt="Code style: Ruff"><img src="https://img.shields.io/badge/code%20style-Ruff-FDD835.svg" alt="Code style: Ruff"></a>
|
|
54
|
-
<a href="https://github.com/kebasyaty/quantum-loop" alt="PyPI implementation"><img src="https://img.shields.io/pypi/implementation/quantum-loop" alt="PyPI implementation"></a>
|
|
55
|
-
<br>
|
|
56
52
|
<a href="https://pypi.org/project/quantum-loop"><img src="https://img.shields.io/pypi/format/quantum-loop" alt="Format"></a>
|
|
57
|
-
<a href="https://
|
|
58
|
-
<a href="https://github.com/kebasyaty/quantum-loop"><img src="https://img.shields.io/github/
|
|
59
|
-
<a href="https://github.com/kebasyaty/quantum-loop"><img src="https://img.shields.io/github/last-commit/kebasyaty/quantum-loop/main" alt="Last commit"></a>
|
|
60
|
-
<a href="https://github.com/kebasyaty/quantum-loop/releases/" alt="GitHub release"><img src="https://img.shields.io/github/release/kebasyaty/quantum-loop" alt="GitHub release"></a>
|
|
53
|
+
<a href="https://pepy.tech/projects/quantum-loop"><img src="https://static.pepy.tech/badge/quantum-loop" alt="PyPI Downloads"></a>
|
|
54
|
+
<a href="https://github.com/kebasyaty/quantum-loop/blob/main/LICENSE" alt="GitHub license"><img src="https://img.shields.io/github/license/kebasyaty/quantum-loop" alt="GitHub license"></a>
|
|
61
55
|
</p>
|
|
62
56
|
<p align="center">
|
|
63
57
|
A Qubit in a regular computer is quantum of algorithm that is executed in
|
|
@@ -73,6 +67,10 @@ Description-Content-Type: text/markdown
|
|
|
73
67
|
</p>
|
|
74
68
|
</div>
|
|
75
69
|
|
|
70
|
+
##
|
|
71
|
+
|
|
72
|
+
<br>
|
|
73
|
+
|
|
76
74
|
## Documentation
|
|
77
75
|
|
|
78
76
|
Online browsable documentation is available at [https://kebasyaty.github.io/quantum-loop/](https://kebasyaty.github.io/quantum-loop/ "Documentation").
|
|
@@ -90,22 +88,75 @@ uv add quantum-loop
|
|
|
90
88
|
## Usage
|
|
91
89
|
|
|
92
90
|
```python
|
|
93
|
-
|
|
91
|
+
"""Count qubits."""
|
|
94
92
|
|
|
95
|
-
|
|
96
|
-
num = count_qubits()
|
|
97
|
-
print(num) # => 16
|
|
93
|
+
from ql import count_qubits
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
|
|
96
|
+
def main() -> None:
|
|
97
|
+
# Counting the number of conceptual qubits of your computer.
|
|
98
|
+
num = count_qubits()
|
|
99
|
+
print(num) # => 16
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
if __name__ == "__main__":
|
|
103
|
+
main()
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
"""QuantumLoop - LoopMode.PROCESS_POOL ."""
|
|
108
|
+
|
|
109
|
+
from ql import QuantumLoop
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def task(num: int) -> int | None:
|
|
100
113
|
"""Quantum."""
|
|
101
|
-
return
|
|
114
|
+
return num * num if num % 2 == 0 else None
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def main() -> None:
|
|
118
|
+
# Separation of the cycle into quantum algorithms for
|
|
119
|
+
# multiprocessing data processing.
|
|
120
|
+
data = range(1, 10)
|
|
121
|
+
results = QuantumLoop(task, data).run()
|
|
122
|
+
print(results) # => [4, 16, 36, 64]
|
|
123
|
+
|
|
102
124
|
|
|
103
|
-
|
|
125
|
+
if __name__ == "__main__":
|
|
126
|
+
main()
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
"""QuantumLoop - LoopMode.THREAD_POOL ."""
|
|
104
131
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
132
|
+
from pathlib import Path
|
|
133
|
+
from ql import LoopMode, QuantumLoop
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def task(path: str) -> str:
|
|
137
|
+
"""Quantum."""
|
|
138
|
+
with Path(path).open("r", encoding="utf-8") as f:
|
|
139
|
+
return f.readline().strip()
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def main() -> None:
|
|
143
|
+
# Separation of the cycle into quantum algorithms for
|
|
144
|
+
# multiprocessing data processing.
|
|
145
|
+
data = [
|
|
146
|
+
"assets/files/file_1.txt",
|
|
147
|
+
"assets/files/file_2.txt",
|
|
148
|
+
"assets/files/file_3.txt",
|
|
149
|
+
]
|
|
150
|
+
results = QuantumLoop(
|
|
151
|
+
task,
|
|
152
|
+
data,
|
|
153
|
+
mode=LoopMode.THREAD_POOL,
|
|
154
|
+
).run()
|
|
155
|
+
print(results) # => ["Hello World 1", "Hello World 2", "Hello World 3"]
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
if __name__ == "__main__":
|
|
159
|
+
main()
|
|
109
160
|
```
|
|
110
161
|
|
|
111
162
|
## Changelog
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ql/__init__.py,sha256=Teh2FB4_4tdN-JxGJfLbdY66ibAOTwbynZiQd5K8Iho,1574
|
|
2
|
+
ql/loop.py,sha256=rGeZrrOncLgdNPCrf62Ua9m1I8rsuOOGErbZkk5AeF4,3701
|
|
3
|
+
ql/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
ql/utils.py,sha256=9dKWSBMAH5iEaf1SihL9LrDZWT1XoG5nljwQwugBejQ,830
|
|
5
|
+
quantum_loop-0.3.3.dist-info/METADATA,sha256=LVQ-Bw4ADNImTyTaGkLiFI2DBhoXcnBGN-V7hSs_ru4,5901
|
|
6
|
+
quantum_loop-0.3.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
+
quantum_loop-0.3.3.dist-info/licenses/LICENSE,sha256=mS0Wz0yGNB63gEcWEnuIb_lldDYV0sjRaO-o_GL6CWE,1074
|
|
8
|
+
quantum_loop-0.3.3.dist-info/RECORD,,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Gennady Kostyunin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Gennady Kostyunin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
quantum_loop/__init__.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""A set of tools for quantum calculations.
|
|
2
|
-
|
|
3
|
-
A Qubit in a regular computer is quantum of algorithm that is executed in
|
|
4
|
-
one iteration of a cycle in a separate processor thread.
|
|
5
|
-
|
|
6
|
-
Quantum is a function with an algorithm of task for data processing.
|
|
7
|
-
|
|
8
|
-
In this case, the Qubit is not a single information,
|
|
9
|
-
but it is a concept of the principle of operation of quantum calculations on a regular computer.
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
from __future__ import annotations
|
|
13
|
-
|
|
14
|
-
__all__ = (
|
|
15
|
-
"LoopMode",
|
|
16
|
-
"QuantumLoop",
|
|
17
|
-
"count_qubits",
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
from quantum_loop.loop import LoopMode, QuantumLoop, count_qubits
|
|
@@ -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.3.dist-info/METADATA,sha256=ZM72-rwf_LTJDqfCtAhSCcJIW85m-UoqWe9aoOF7qx0,5883
|
|
5
|
-
quantum_loop-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
-
quantum_loop-0.1.3.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
|
|
7
|
-
quantum_loop-0.1.3.dist-info/RECORD,,
|
{quantum_loop → ql}/py.typed
RENAMED
|
File without changes
|