QuantumRouter
Unified interface for quantum cloud providers. One API, any backend.
Quick start •
Examples •
Architecture •
Adding a vendor •
License
Quick start
import quantumrouter
provider = quantumrouter.create_provider(
backend="lingyun", # change this to switch vendors
url="http://xx.xxxx.xx:xxxx", # cloud / simulation server
token="...", # optional for the simulation server
)
backends = provider.backends(online=True)
backend = backends[0]
task_ids = backend.submit_job(["QINIT 4\nH 0"], shots=1024)
results = backend.query_job(task_ids)
config = backend.fetch_configuration()
PCIe-direct (same entry point, different URL scheme):
provider = quantumrouter.create_provider(
backend="lingyun",
url="pcie:///dev/quantum0",
)
Examples
examples/basic_usage.py— list backends, submit a job, query results.examples/multi_vendor.py— switch between LingYun and IBM Quantum with a single parameter.examples/pcie_transport.py— use a PCIe transport instead of HTTP.
Run with:
python examples/basic_usage.py
Architecture
quantumrouter/
├── transport/ # generic wire layer (HTTP, PCIe, …)
├── backend/ # generic backend contract
└── providers/ # one subdir per cloud vendor
├── base.py / registry.py # shared abstraction + registry
└── lingyun/ # LingYun (凌云), self-contained
Adding a vendor
Drop a quantumrouter/providers/<vendor>/ subpackage that self-registers
via ProviderRegistry.register(...). The transport and backend layers
stay untouched.
Vendor packages are imported lazily: import quantumrouter does not pull
in any vendor's third-party deps (qiskit, cqlib, ...). A provider is
loaded the first time it is referenced — explicitly via
from quantumrouter.providers import lingyun as _lingyun, or implicitly
through quantumrouter.create_provider("lingyun", ...). Use only the
vendors you have deps for; the others stay unloaded.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantumrouter-0.0.4-py3-none-any.whl.
File metadata
- Download URL: quantumrouter-0.0.4-py3-none-any.whl
- Upload date:
- Size: 64.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9839a6102c51783a554c97ebc9d9d6f2779e2356120fe6ba0d64a217c4301941
|
|
| MD5 |
ef376a32c42c4caffe01d37f801bc870
|
|
| BLAKE2b-256 |
6d37c367ddc3e66b0397297f0938320cfa79ace19b25b87c33420a94ea68496a
|