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 婧愮爜宸ョ▼銆係DK 鍙皟鐢ㄤ節绔犱簯骞冲彴 API锛?澶╄骞冲彴鐢变簯骞冲彴鍚庡彴杞彂銆?

Install / 瀹夎

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

Required Task Fields / 蹇呭~浠诲姟瀛楁

GBS submissions require project_id and quantum_computer_id.

GBS submissions use project_id and quantum_computer_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",
    quantum_computer_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_QUANTUM_COMPUTER_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.0a17.tar.gz (27.4 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.0a17-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jiuzhang_sdk-0.1.0a17.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for jiuzhang_sdk-0.1.0a17.tar.gz
Algorithm Hash digest
SHA256 b17b512304b9e23c49e6d02212b88976f953662004a72b823e42e920679354ca
MD5 bc086bd6fceba68f72c85947c07a1cfb
BLAKE2b-256 bca7c765e0a8ab25f22a73e95a49e4ce8bc35af28e848b64a5c901599dc59535

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jiuzhang_sdk-0.1.0a17-py3-none-any.whl
Algorithm Hash digest
SHA256 7b021134fd7f55fbcf6c1ef323c60a12d8d342f6e39130519b098881c788ac47
MD5 838fe88013668bea4bb2eafb8e127d7d
BLAKE2b-256 8e072d151645401581e0cd3f3c5ea997cc6d17ef12a380a80974c87f137c408c

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