Skip to main content

九章光量子真机云接入软件包(jiuzhang SDK)

Project description

jiuzhang SDK · 九章光量子云平台 Python SDK

This code/ directory contains the Python package source for jiuzhang-sdk. The SDK talks to the JiuZhang cloud API only; Tianyan is reached by the cloud platform backend.

code/ 目录是 jiuzhang-sdk 的 Python 源码工程。SDK 只调用九章云平台 API; 天衍平台由云平台后台转发。

Install / 安装

pip install --pre jiuzhang-sdk
pip install jiuzhang-sdk==0.1.0a14
pip install -e ".[dev,jupyter]"

Required Task Fields / 必填任务字段

GBS submissions require project_id and device_id.

GBS 任务提交必须带 project_iddevice_id

from jiuzhang import CloudClient, GBSParams

client = CloudClient(
    base_url="http://127.0.0.1:18081/api/v1",
    api_key="PQ-3f2c2a3b0f7a4a2ab1cdb0b7d2f1a9c4",
)

params = GBSParams(
    project_id="EXP-local-demo",
    device_id="PH_QC_04",
    mt=64,
    pump_energy_nj=2.0,
    squeezing_param=0.35,
)

result = client.run_gbs(params)

API Paths / API 路径

base_url may include /api/v1.

base_url 可以包含 /api/v1

POST /estimate
POST /tasks/submit
GET  /tasks/{task_id}

Environment / 环境变量

$env:JIUZHANG_API_KEY="your_api_key"
$env:JIUZHANG_BASE_URL="http://127.0.0.1:18081/api/v1"
$env:JIUZHANG_PROJECT_ID="EXP-local-demo"
$env:JIUZHANG_DEVICE_ID="PH_QC_04"

Local Mock / 本地 Mock

python ..\local_test\mock_cloud_platform\mock_cloud_platform.py --port 18081 --mode standalone

Test / 测试

ruff format src tests
ruff check src tests
mypy src
pytest

License / 授权

Proprietary. Copyright © 2026 JiuZhang Quantum.

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

jiuzhang_sdk-0.1.0a14.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

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

jiuzhang_sdk-0.1.0a14-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file jiuzhang_sdk-0.1.0a14.tar.gz.

File metadata

  • Download URL: jiuzhang_sdk-0.1.0a14.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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}

File hashes

Hashes for jiuzhang_sdk-0.1.0a14.tar.gz
Algorithm Hash digest
SHA256 147a7ea75dc3d164f586d4c8cb2a90a5ef4914b395cb5f3965cff0c5eb791821
MD5 85920491d8e6458780a899e28d00ee3b
BLAKE2b-256 0f471ac74757e367db9dd2f7b063ad8eb6d5b1ebb3fff1c4abf7825b95cb2fc2

See more details on using hashes here.

File details

Details for the file jiuzhang_sdk-0.1.0a14-py3-none-any.whl.

File metadata

  • Download URL: jiuzhang_sdk-0.1.0a14-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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}

File hashes

Hashes for jiuzhang_sdk-0.1.0a14-py3-none-any.whl
Algorithm Hash digest
SHA256 900c94ee7688abc57ed47d7f16e256923225ec466f815721fd7f58c6bb8af8fc
MD5 88e204d771ebc5c29fdbbad15cff85cf
BLAKE2b-256 f58373c73bce7ceb613f5018179282ef5333a2212ccfc761393cf35aa5ae63bf

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