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"))

📬 Contact

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.3-cp310-abi3-win_amd64.whl (144.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

gjq_client-0.1.3-cp310-abi3-win32.whl (133.5 kB view details)

Uploaded CPython 3.10+Windows x86

gjq_client-0.1.3-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (532.1 kB view details)

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

gjq_client-0.1.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (509.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

gjq_client-0.1.3-cp310-abi3-macosx_11_0_arm64.whl (156.1 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

gjq_client-0.1.3-cp310-abi3-macosx_10_9_x86_64.whl (149.6 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

gjq_client-0.1.3-cp310-abi3-macosx_10_9_universal2.whl (242.5 kB view details)

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

File details

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

File metadata

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

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 223b6fd202272418b6dd5f4e39230a3ca68c18ae8753e9b179eb3ef6934b2dbc
MD5 9f3e1ca6c769e26ac119ea307265f1b2
BLAKE2b-256 a502689bcf556f8626060bff2ea2086d67173bfc961b9117c9f7a1da50e3d2bd

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.3-cp310-abi3-win32.whl.

File metadata

  • Download URL: gjq_client-0.1.3-cp310-abi3-win32.whl
  • Upload date:
  • Size: 133.5 kB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 5725b91c5781c39e09f9bcca0b823e07aef93a5eed5c0e96b970563394d554ad
MD5 2cb6ce5d71faace796ca23e26a455ef7
BLAKE2b-256 0a11932e3f249cfc1ceba729b0c501871f68768261225b7b78a23bd32ed48ac6

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.3-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.3-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f819ebe0bfc29f9a5e8c6995ae67e487fb5d08a5f0071f16483f2ad1b3e378ec
MD5 ee7773e272a260aa9fe1c1333bae1a7e
BLAKE2b-256 7e420ca254429316ec726c079937020a1dd27fefa132be5c54095eeb9103a72f

See more details on using hashes here.

File details

Details for the file gjq_client-0.1.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 618e26fd7ee3476665cf41530bb4ecc41e8b496a567359bf0ee2db74c05281e7
MD5 b63eda092d3f6e1f4bac4803b6d4bb8d
BLAKE2b-256 176e39270ec85dd53283599353d9f8cb24a4bb43a5f7a6881cb7a8ff98d15142

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e862aad27114fd7734b4818e6e2312af28c05e87eff0218cb600be99794368ef
MD5 1caef728f346819b1744fcc9c56d9222
BLAKE2b-256 6107720016b386ff5b2207b8f88c0795f531595236689631ba84b65c10e74a05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 75f56ca5305182290febf4576e3114622fac286bb645ceeb0650c891d3c6f633
MD5 491bde8bcd737a0b95c40d8517631ab9
BLAKE2b-256 6a7b315feb16596469a6f7c2507b7fbbc930d8db89ce3bfee08d74a12d047e4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gjq_client-0.1.3-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0ad0daf679fd92ec7e68996ac374d674023fee7fdc8bc37a32aac8be5d190c6f
MD5 c1b006e47056b360dabaf2f5c3a2913c
BLAKE2b-256 a49952290bad4dea137ffe1923a70e456bfd288f18f2ea7cfb805e99a660460d

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