Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

quapp-qiskit

Quapp qiskit library supporting Quapp Platform for Quantum Computing.

Overview

quapp-qiskit provides the providers, devices, factories, and tasks to run quantum circuits via Qiskit within the Quapp Platform. It integrates with IBM Quantum, IBM Cloud, OQC Cloud, and Qiskit simulators (Aer), with a strong focus on clean, consistent logging, robust error handling, and standardized header management using project/workspace context to improve maintainability and clarity.

Features

  • Provider and device factories for IBM Quantum, IBM Cloud, OQC Cloud, and Qiskit Aer simulators.
  • Circuit export and transpilation pipeline with asynchronous job submission.
  • Consistent, context-rich logging across provider/device creation, transpilation, job submission, and job fetching.
  • Standardized header handling using project and workspace headers for backend invocations.
  • Improved error handling and diagnostics in critical execution paths.

Installation

Install via pip:

pip install quapp-qiskit

Recently Changes Highlights

1.0.13.dev21

  • fix(log): 6 provider gọi job_logger('IbmQuantumProvider') — tham số đầu của job_logger()job_id, không phải tên component. Chúng đang đặt một job_id giả, và vì _inject_job_context của quapp-common chỉ điền key nào đang None, giá trị giả thắng job_id thật. Hệ quả: Grafana filter theo jobId mất toàn bộ dòng log của provider, và index có 6 giá trị jobId rác.

    Đã đổi sang logger.bind(context='IbmQuantumProvider')context là field dành cho tên component, và text sink đã hiển thị nó trong prefix.

    Đo trước/sau với một job thật:

    jobId trên dòng log của provider
    trước IbmQuantumProvider
    sau job_REAL_123
  • fix(log): QiskitHandlerFactory.create_handler() đọc job id bằng getattr(event.json(), 'jobId', None). event.json() trả về dict nên getattr luôn cho None — job_id không bao giờ được bind ở đây. Nay đọc bằng request_data.get('jobId').

  • test: Thêm tests/test_log_context_binding.py — khoá hồi quy ở hai mức: quét AST bắt job_logger() nhận chuỗi literal, và test hành vi khi chạy thật để đảm bảo dòng log của provider mang job_id của job đang chạy.

1.0.13.dev20

  • feat(error): Thêm quapp_qiskit/error_rules.py — 22 rule phân loại lỗi đặc thù Qiskit, đăng ký vào classifier của quapp-common khi package được import. Nhờ đó lỗi Qiskit có category / code / hướng xử lý cụ thể trong Job Log thay vì rơi về fallback chung theo phase (COMPILATION_FAILED, PROVIDER_INVOCATION_FAILED):

    Nhóm Mã tiêu biểu
    Authentication IBMQ_TOKEN_INVALID, IBMQ_ACCOUNT_INVALID, RIKEN_TOKEN_MISSING, IBMQ_LICENSE_NOT_ACCEPTED
    Device QISKIT_BACKEND_NOT_FOUND, QISKIT_DEVICE_UNSUPPORTED, IBMQ_JOB_FAILED, IBMQ_JOB_NOT_FOUND
    Input của user QISKIT_CIRCUIT_TOO_WIDE, QISKIT_QASM_INVALID, IBMQ_INPUT_INVALID, IBMQ_BACKEND_OPTION_INVALID
    Code của user QISKIT_INVALID_CIRCUIT_TYPE, QISKIT_CIRCUIT_INVALID
    SDK / device QISKIT_TRANSPILE_FAILED, QISKIT_AER_ERROR, QISKIT_BACKEND_CONFIG_ERROR, QISKIT_SDK_ERROR
    Retry được IBMQ_JOB_TIMEOUT (120s), IBMQ_API_UNAVAILABLE (120s), IBMQ_BACKEND_ERROR (180s)

    Rule match theo tên class dạng stringerror_rules.py không import qiskit, qiskit_ibm_runtime, qiskit_aer hay qcaas_client. Đây là ràng buộc cứng: image C/C++ native cài quapp-qiskit --no-deps và block các SDK đó, nên import quapp_qiskit không được đòi vendor SDK — xem tests/test_lazy_provider_imports.py.

    Vài điểm phân loại đáng chú ý:

    • CircuitTooWideForTargetINVALID_INPUT chứ không phải SDK_RUNTIME: circuit nhiều qubit hơn device là thứ user sửa được.
    • IBMBackendValueError tách theo message — not found là lỗi device, còn lại là sai option.
    • Lỗi HTTP của RIKEN (requests + raise_for_status(), bọc trong RuntimeError) vẫn ra PROVIDER_AUTH_FAILED nhờ classifier đi hết cause chain, nên không cần rule riêng.
  • test: Thêm tests/test_error_rules.py — 26 case, dựng exception thật từ qiskit==1.4.2 / qiskit-ibm-runtime==0.35.0 để test vỡ khi upstream đổi tên exception. Có một case quét AST của error_rules.py để chặn việc ai đó thêm import vendor SDK vào đó.

  • build: Bump version lên 1.0.13.dev20.

  • refactor: Remove unused timing logs and import from InvocationHandler.

  • refactor: Replace set/map usage with set comprehension and enhance logging for unsupported devices.

  • refactor: Add support for project and workspace headers in backend invocation.

  • refactor: Update logging to handle missing jobId gracefully.

  • refactor: Improve logging across device and provider classes, enhance error handling in key methods.

  • chore: Bump a library version and update quapp-common dependency to the latest development release.

For detailed usage and API references, please refer to the in-code documentation or contact the maintainers.

Download files

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

Source Distribution

quapp_qiskit-1.0.13.dev22.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

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

quapp_qiskit-1.0.13.dev22-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file quapp_qiskit-1.0.13.dev22.tar.gz.

File metadata

  • Download URL: quapp_qiskit-1.0.13.dev22.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for quapp_qiskit-1.0.13.dev22.tar.gz
Algorithm Hash digest
SHA256 9020d1dc2e4ce1044693941034e494f1842641ac4c41c48713ff1fd20e768c12
MD5 d21525f7ec92fe2ed271cdedb2ff5182
BLAKE2b-256 bb43c0de060605d9580c737e1b269b8b75896db3d9bc57b0f44655dd677cae92

See more details on using hashes here.

File details

Details for the file quapp_qiskit-1.0.13.dev22-py3-none-any.whl.

File metadata

File hashes

Hashes for quapp_qiskit-1.0.13.dev22-py3-none-any.whl
Algorithm Hash digest
SHA256 ba7298e68557f51b8ab1bb2514e47f1a062f4b855cff036e68ff1b83b8de0301
MD5 92a94c4d8c68890179209dc77c3144ac
BLAKE2b-256 e1bd2c27a2b115b2033e4501ffa80e5c197aa56db32b764199430224d0bb5865

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page