pyquantumkit-run
A cross-platform executor for quantum circuits and programs written with PyQuantumKit, supporting mainstream quantum cloud platforms.
Write Once, Run Anywhere
pyquantumkit-run provides a unified run() method. At runtime, it reads command-line arguments such as -provider, -backend, and -shots, so you can switch between local simulators and quantum processing units (QPUs) without modifying your program:
import pyquantumkit as PQK
from pqk_run import run
circuit = PQK.CircuitIO(2, 2)
PQK.apply_gate(circuit, 'H', [0])
PQK.apply_gate(circuit, 'CX', [0, 1])
PQK.apply_measure(circuit, [0, 1], [0, 1])
result = run(circuit)
print(result.counts)
Run with the Qiskit or Quafu local simulator:
python test.py -provider qiskit -backend local -shots 1024
python test.py -provider quafu -backend local -shots 1024
To use the Origin Quantum or Quafu cloud platform, first set PK_API_KEY, then specify the provider and QPU name:
export PK_API_KEY=xxx
python test.py -provider originq -backend WK_C180
python test.py -provider quafu -backend Shenglian
You can also read the API key from a file using -api-key-file <path>. Before submitting a cloud job, the program calls the corresponding platform's API to query currently available devices. If the name specified by -backend does not exist, it reports an error and lists the available names without submitting the job.
Run python test.py -h to view all runtime arguments. You can also explicitly pass provider, backend, shots, api_key, and api_key_file in your code; explicit arguments take precedence over command-line arguments.
Metadata
Release files for pyquantumkit-run 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyquantumkit_run-0.1.0.tar.gz | 16.0 kB | Without provenance | Details for pyquantumkit_run-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyquantumkit_run-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyquantumkit_run-0.1.0-py3-none-any.whl |
Total release size: 36.6 kB
Release files / pyquantumkit_run-0.1.0.tar.gz
| Download URL | pyquantumkit_run-0.1.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30b89898f370e1f898ca741ad82869442a3ecf06c033a52e515271fffdfccc29
|
|
BLAKE2b-256 checksum How to use checksums |
e44071abe88f00b6b6d200ddf5d22cbf7e692c0826386b8a909918422052b77f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / pyquantumkit_run-0.1.0-py3-none-any.whl
| Download URL | pyquantumkit_run-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9870197c9d3e8bcb79de03a74225c2b940a4f1e4b76d0ad661531ebeb05cb276
|
|
BLAKE2b-256 checksum How to use checksums |
61342e5ddebea0492fd9d4fae651d81ee0f2147c08750db2461b8ed4ea839291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for pyquantumkit-run 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.