quantum loop
A set of tools for quantum calculations.
A Qubit in a regular computer is quantum of algorithm that is executed in
one iteration of a cycle in a separate processor thread.
Quantum is a function with an algorithm of task for data processing.
In this case, the Qubit is not a single information,
but it is a concept of the principle of operation of quantum calculations on a regular computer.
Installation
uv add quantum-loop
Usage
"""Count qubits."""
from ql import count_qubits
def main() -> None:
# Counting the number of conceptual qubits of your computer.
num = count_qubits()
print(num) # => 15
if __name__ == "__main__":
main()
"""QuantumLoop - LoopMode.PROCESS_POOL ."""
from ql import QuantumLoop
def task(num: int) -> int | None:
"""Quantum."""
return num * num if num % 2 == 0 else None
def main() -> None:
# Separation of the cycle into quantum algorithms for
# multiprocessing data processing.
data = range(1, 10)
results = QuantumLoop(task, data).run()
print(results) # => [4, 16, 36, 64]
if __name__ == "__main__":
main()
"""QuantumLoop - LoopMode.THREAD_POOL ."""
from pathlib import Path
from ql import LoopMode, QuantumLoop
def task(path: str) -> str:
"""Quantum."""
with Path(path).open("r", encoding="utf-8") as f:
return f.readline().strip()
def main() -> None:
# Separation of the cycle into quantum algorithms for
# multiprocessing data processing.
data = [
"assets/files/file_1.txt",
"assets/files/file_2.txt",
"assets/files/file_3.txt",
]
results = QuantumLoop(
task,
data,
mode=LoopMode.THREAD_POOL,
).run()
print(results) # => ["Hello World 1", "Hello World 2", "Hello World 3"]
if __name__ == "__main__":
main()
Metadata
Release files for quantum-loop 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quantum_loop-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / quantum_loop-1.0.1-py3-none-any.whl
| Download URL | quantum_loop-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec7da1c5b7951090f6ecc7783a9cf95a5e0e7b38104c300cfe00aeeec15b6631
|
|
BLAKE2b-256 checksum How to use checksums |
a47a02f1803fd9a59555424cb2ce7434841ace5e88a928250d893d604ae022ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for quantum-loop 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.