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.9.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.9-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qubecore_client-1.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 ffd2df92b3f5dba3e856adb55a1ed858d248c0e783aaf81c11c3704a09af0035
MD5 61e8ee6009ef62227a5e3186877d8f28
BLAKE2b-256 fcca0fd9d5cc71da49978cf5bc854f2e29709e3d6b43afe169a081057975bf12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qubecore_client-1.0.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 17854db61500a61e7390a79b97d2da75549b1d98264a2ad93a97d27dd4d37ebe
MD5 7bda900972e21ec3110f7f13e06f8b9e
BLAKE2b-256 5228dbaa95b4ca829713fba4a43c61dad4afa8d6ade8d5a982261e561a82596e

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