Skip to main content

Qiskit 2.0 adapter for GuoJi Quantum Cloud Platform

Project description

GJQ-Client

gjq-client is the Python SDK for CETC International Cornerstone Quantum Industry (Suzhou) Co., Ltd. (CETC-ICQ) Cloud Platform, providing Qiskit 2.0 integration with real quantum hardware.

Project Structure

src/gjq_client/
├── __init__.py                # Public API exports
├── _version.py                # Version info
├── gjq_runtime/               # Runtime service module
│   ├── gjq_runtime_service.py # Service entry
│   ├── sampler.py             # Sampler primitive
│   ├── estimator.py           # Estimator primitive
│   └── runtime_job.py         # Job status tracking
├── client/                    # Auth & communication module
│   ├── client_parameters.py   # JWT lifecycle & URL management
│   ├── backend_url_config.py  # URL decryption & config
│   ├── auth.py                # Auth header injection
│   ├── session.py             # HTTP retry session
│   ├── runtime.py             # REST API client
│   └── rest/                  # REST adapter layer
├── backend/                   # Backend models
│   ├── gjq_backend.py         # GJQBackend
│   ├── backend_configuration.py
│   └── backend_properties.py
└── utils/                     # Utilities
    ├── exceptions.py          # Exception classes
    ├── backend_converter.py   # Configuration → Target
    ├── backend_decoder.py     # Server data decoder
    └── generate_preset_pass_manager.py

📦 Installation

Requirements: Python >= 3.10, Qiskit >= 2.0.0

ONLY Qiskit 2.0+ SUPPORT NOW

# Install via PyPI
pip install gjq-client

# Or install from source
pip install .

🚀 Quick Start

from qiskit import QuantumCircuit
from gjq_client import GJQRuntimeService, Sampler, generate_preset_pass_manager

# 1. Authenticate and initialize RuntimeService
#    (API key required on first use, cached automatically afterwards.
#     Obtain your key from tiangongqs.com/cloud)
service = GJQRuntimeService(api_key="YOUR_API_KEY")

# 2. Select a quantum backend
backend = service.backend("target_quantum_machine")
# Or pick the least busy backend:
# backend = service.least_busy()

# 3. Build a quantum circuit
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()

# 4. Transpile the circuit for the target backend
pm = generate_preset_pass_manager(backend=backend, optimization_level=2)
transpiled_qc = pm.run(qc)

# 5. Submit the job and retrieve results
sampler = Sampler(backend=backend)
job = sampler.run(transpiled_qc, shots=1024)

result = job.result()
print("Measurement results:", result.get("counts"))

Changelog

See the full changelog in CHANGELOG.

📄 License

Apache License 2.0

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

gjq_client-0.1.2-cp310-abi3-win_arm64.whl (136.0 kB view details)

Uploaded CPython 3.10+Windows ARM64

gjq_client-0.1.2-cp310-abi3-win_amd64.whl (146.9 kB view details)

Uploaded CPython 3.10+Windows x86-64

gjq_client-0.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (524.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

gjq_client-0.1.2-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (523.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gjq_client-0.1.2-cp310-abi3-macosx_11_0_arm64.whl (155.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

gjq_client-0.1.2-cp310-abi3-macosx_10_9_x86_64.whl (150.9 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

gjq_client-0.1.2-cp310-abi3-macosx_10_9_universal2.whl (240.7 kB view details)

Uploaded CPython 3.10+macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file gjq_client-0.1.2-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: gjq_client-0.1.2-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 136.0 kB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e58b8c7af789bdcef8c1830a6bce545862bb4dd88a19e7f7c4300bdb324e9c9c
MD5 fcb2cf2a7c07ecd3d7599c8580509ea6
BLAKE2b-256 d99f6ecb095b75723d750e343f9c9540ce254de2485eca64d00c06cd1fa8dbc1

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: gjq_client-0.1.2-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 146.9 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d554a3c43385fd9eac5ae9e8fdfc9943ba89a48627452140dcb432c352268262
MD5 fbec28a9823b5d0905fc584a08a1dd69
BLAKE2b-256 7e8ec5aa036d7457a17d8df4bce31c62b4454c907874d687f125c9b87a8cba03

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2b9741c0c42593eabbb564eeb62ab2bcc3e0c7bbd9d98692c5a49705c4e681e4
MD5 e73d6f25a9a65204aa0f7947a3f1308a
BLAKE2b-256 ef63eae3b7e73858bd782139dfbd3f48d8555f465e54187fa6e981e90364ed87

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 131077aeddc40f826112f833753c7facef7987cf751d26dba25764a73fed5368
MD5 e8b2ebe1341c938bb29064fcac31c486
BLAKE2b-256 b3957fb908e9f60d6c06833ccd732870bc5a610de31d26904300dd4ddb4652ea

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdbb47077c2ce74c67e34661c0178c0102d70b70c601b2facac783fea3bf749d
MD5 4afa2a3970ce19a6fb4f5ab4fcd23540
BLAKE2b-256 c165cfa10e017d267f216244abdd618787695663cb75c953c63a446ffdc7ce8e

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8dc19d2db726040f3f36737800598703b10ef0067412965c0b2aab3d14d72491
MD5 d1a022ed4f305ec70bdae22e9058c06e
BLAKE2b-256 6af9a23bf2e89bb8683ee080271a66795330824d7c71104634302df748fb44aa

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.2-cp310-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.2-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e8674f0d14b1d65f735ee8185b535b924cece2d0cdfcaefcb2e80c2c9ea51a8d
MD5 85f70265837209f09257fb979019b0b2
BLAKE2b-256 c77322b4a99cedef2aa05345c4a89c3d6c720d8e97d5773d44f703d023c323f2

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