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.0a16.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.0a16-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jiuzhang_sdk-0.1.0a16.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.0a16.tar.gz
Algorithm Hash digest
SHA256 0bb61508fa43e3e3b45524821f790e2697b51be20e5b3becc920ec71ce3c8cbe
MD5 28b71b1dafc03b6877a4d19e5e15ec96
BLAKE2b-256 f84e2c2b30cf1d48be3e8c2195b0a7418ed9de52b932aa64cdff2adc32668280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jiuzhang_sdk-0.1.0a16-py3-none-any.whl
Algorithm Hash digest
SHA256 534521ad37fef1a1c13fa243a368ae569b4d0a1b85ce0c656d5d4f999f08ce6c
MD5 6b3e89ab3e4fbbb6b9a3f4abd3914a26
BLAKE2b-256 e76684e18c0e211e09787e686c340c30c5940df131147ac83ebbce2f68db8c08

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