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.dev23.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-1.0.13.dev23-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quapp_qiskit-1.0.13.dev23.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-1.0.13.dev23.tar.gz
Algorithm Hash digest
SHA256 343e0258e42d5f493abc43059ae4fec2842835587b908488b408f5a91c4c805b
MD5 550c34e5ce3d78f5e20b5e80d3e13fc6
BLAKE2b-256 5bbf9d99e250b853720c7a2107014def067e90c818db49e5e5f1588c9f8ec717

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quapp_qiskit-1.0.13.dev23-py3-none-any.whl
Algorithm Hash digest
SHA256 e58b405382ce3d26549afd296911a4f4acf30a7c5a75f006ff30246cbde4864f
MD5 cbd539f0b4063ef7c91bb259835a0f43
BLAKE2b-256 84de76088663c3086fb2d508ebd3b0ed94343f85bbd2eadfc29bb0356edfd73a

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