Skip to main content

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-2.0.0.tar.gz (36.0 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-2.0.0-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file quapp_qiskit-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for quapp_qiskit-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9b754ed984bf601a0b8bc7c01abe3065dc906a372725386be0e210fb43c9ffe0
MD5 ac700c779d67c21ba330cd4635067cf5
BLAKE2b-256 3c20acb60a57c8c576e731c5fda9056c2aecf60a50b839f38032987660e30d07

See more details on using hashes here.

File details

Details for the file quapp_qiskit-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: quapp_qiskit-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for quapp_qiskit-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 086a9cc6c1f19eaafcd082a604aba430e3b714fbe7f2a5bf9b65b3b0b1b54b20
MD5 6fe10b5f67b824f56ce613cb8479ccf3
BLAKE2b-256 d5dddc4c465086365da0eeab9f943d546e0e572654741adc2834561d2c3d2f6c

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