Skip to main content

QubeCore Client SDK

Project description

QubeCore-Client

Python client SDK for QubeCore — Quantum Computing Operating System.

Overview

QubeCore Client provides a Python-friendly interface for communicating with QubeCore Server over gRPC. QubeCli, QubeLab, and QubeGate all depend on this package.

Requirements

  • Python 3.11+
  • QubeCore Server

Installation

pip install qubecore-client

Quick Start

from qubecore_client import QubeClient

client = QubeClient(address="localhost:50051")

# Submit a job
job_id = client.submit_gate_job(
    backend_name="backend1",
    gate_circuits=[
        "OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\nh q[0];\ncx q[0],q[1];\nmeasure q -> c;"
    ],
    shots=100,
)
print("job_id:", job_id)

# Check status
status = client.get_job_status(job_id)
print("status:", status["status"])

# Fetch result
result = client.get_job_result(job_id)
print("result:", result)

# Cancel job (only possible while status is PENDING)
message = client.cancel_job(job_id)
print("cancel:", message)

CLI

Version

qubecore -v
qubecore --version

Server Configuration

qubecore config set host 192.168.1.100:50051
qubecore config get

Commands

# Submit a job
qubecore submit --backend backend1 --circuit "OPENQASM 2.0;..." --shots 100

# Check status
qubecore status --job-id <job_id>

# Fetch result
qubecore result --job-id <job_id>

# Cancel job
qubecore cancel --job-id <job_id>

One-time server override:

qubecore --host 10.0.0.1:50051 submit --backend backend1 --circuit "..." --shots 100

API

Method Description
submit_gate_job() Submits a gate-circuit execution job and returns a job_id
get_job_status() Retrieves the current job status
get_job_result() Retrieves the job result
cancel_job() Cancels a job (only possible while status is PENDING)

submit_gate_job Parameters

Parameter Type Required Description
backend_name str Yes Backend name (backend1, backend2, kreo.sc-20)
gate_circuits list[str] Yes List of circuit strings (QASM2/QASM3/JSON)
shots int Yes Number of execution shots
priority int No Priority from 1 to 4 (default: 3 = NORMAL)
optimization_level int No Transpile optimization level from 0 to 3 (no default)

Compatibility

qubecore-client qubecore
1.x 1.x

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qubecore_client-1.0.10.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qubecore_client-1.0.10-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file qubecore_client-1.0.10.tar.gz.

File metadata

  • Download URL: qubecore_client-1.0.10.tar.gz
  • Upload date:
  • Size: 42.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qubecore_client-1.0.10.tar.gz
Algorithm Hash digest
SHA256 7392b0e2a4a9c190777431d248774e04a81a41bb58098995066542a8f1d9d78a
MD5 99afa4071f1c0d68274f7ace29ab847b
BLAKE2b-256 4e5b0ab3e4d6d7b8af9235eca031e8ce2edd45558740b14834054e10de668738

See more details on using hashes here.

File details

Details for the file qubecore_client-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: qubecore_client-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qubecore_client-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9470fbc57c9f1a80ada19040337c63c46b600d93b061e1fd87182eceeb9e9fd9
MD5 7a61da08bb79d150203e42346847791a
BLAKE2b-256 d4dddc31b67dc3b8da6b2c84a1021db047f03b0d19e0dbba97f3ed16ffb600a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page