XQ Cloud
xq-cloud is a Python client for submitting quantum computing jobs to XQ Cloud
and retrieving their results. It integrates with Qiskit and supports pulse
programs on compatible backends.
Installation
Requires Python 3.10 or later.
pip install xq-cloud
Connect and choose a backend
You need XQ Cloud access credentials and permission to use a backend. Set the
environment variables XQ_CLOUD_CLIENT_ID and XQ_CLOUD_CLIENT_SECRET to the
Client ID and Client Secret provided with your account, then connect:
import os
from xq_cloud import XQCloudProvider
provider = XQCloudProvider(
cloudflare_client_id=os.environ["XQ_CLOUD_CLIENT_ID"],
cloudflare_client_secret=os.environ["XQ_CLOUD_CLIENT_SECRET"],
)
for backend in provider.backends():
print(backend.name)
Submit a job and get results
Replace YOUR_BACKEND_NAME with a name returned above. This example prepares a
single-qubit circuit, compiles it for the selected backend, and submits it for
population readout. Readout is handled by the backend; omit measurement
instructions from the circuit.
from qiskit import QuantumCircuit
from xq_cloud.transpiler import transpile
backend = provider.backends(name="YOUR_BACKEND_NAME")[0]
circuit = QuantumCircuit(1)
circuit.h(0)
compiled_circuit = transpile(circuit, target=backend.target)
job = backend.run(
compiled_circuit,
shots=1000,
name="first-experiment",
metadata={"description": "Single-qubit superposition"},
)
job.submit()
print("Job ID:", job.job_id()) # Save this ID to retrieve results later.
result = job.result(timeout_seconds=300)
print(result.results[0].data.expectation_values)
backend.run(...) prepares the job; job.submit() sends it to the queue.
job.result(...) waits for completion and returns a Qiskit Result.
The optional name and JSON-object metadata are stored with the job. Names
can be reused; every submission receives its own unique job ID.
Retrieve results later
After connecting again, use a saved job ID to wait for its result payload:
job_id = "YOUR_SAVED_JOB_ID"
results = provider.client.wait_for_result(job_id, timeout_seconds=300)
print(results)
To check once without waiting, use provider.client.get_result(job_id) and
inspect its status, result, and error fields. A waiting timeout raises
TimeoutError and leaves the job running or queued; you can request its results
again later. API errors and failed jobs raise XQCloudApiError when waiting.
You can also find your jobs by name:
for saved_job in provider.client.get_jobs(name="first-experiment"):
print(saved_job.job_id, saved_job.status, saved_job.metadata)
Name matching is exact. Add backend=... or status=... to narrow the list.
Metadata
Release files for xq-cloud 0.10.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 |
|---|---|---|---|---|
| xq_cloud-0.10.0.tar.gz | 25.7 kB | Without provenance | Details for xq_cloud-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xq_cloud-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for xq_cloud-0.10.0-py3-none-any.whl |
Total release size: 59.5 kB
Release files / xq_cloud-0.10.0.tar.gz
| Download URL | xq_cloud-0.10.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2557d495bb8b99fa0c21fc5d105966261741f56b8119d9b7ed4624dd3ac4df14
|
|
BLAKE2b-256 checksum How to use checksums |
92a35c3edbbaa7333a976c06aa0fc4cac86fe18899e134bda0f8a1663c429599
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / xq_cloud-0.10.0-py3-none-any.whl
| Download URL | xq_cloud-0.10.0-py3-none-any.whl |
|---|---|
| Size | 33.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12293f4a57854cc7c04e490208c8d43fddb51d2b638013b2fa490dcc1c119dad
|
|
BLAKE2b-256 checksum How to use checksums |
71fb8f0fe8af987a728683e397ac5dcbcf2de62bfb5b9bdf629aaa3df7d47b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for xq-cloud 0.10.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.