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ủajob_logger()là job_id, không phải tên component. Chúng đang đặt một job_id giả, và vì_inject_job_contextcủaquapp-commonchỉ điền key nào đangNone, giá trị giả thắng job_id thật. Hệ quả: Grafana filter theojobIdmất toàn bộ dòng log của provider, và index có 6 giá trịjobIdrác.Đã đổi sang
logger.bind(context='IbmQuantumProvider')—contextlà 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:
jobIdtrên dòng log của providertrước IbmQuantumProvidersau job_REAL_123 -
fix(log):
QiskitHandlerFactory.create_handler()đọc job id bằnggetattr(event.json(), 'jobId', None).event.json()trả về dict nêngetattrluôn choNone— job_id không bao giờ được bind ở đây. Nay đọc bằngrequest_data.get('jobId'). -
test: Thêm
tests/test_log_context_binding.py— khoá hồi quy ở hai mức: quét AST bắtjob_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ủaquapp-commonkhi 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_ACCEPTEDDevice QISKIT_BACKEND_NOT_FOUND,QISKIT_DEVICE_UNSUPPORTED,IBMQ_JOB_FAILED,IBMQ_JOB_NOT_FOUNDInput của user QISKIT_CIRCUIT_TOO_WIDE,QISKIT_QASM_INVALID,IBMQ_INPUT_INVALID,IBMQ_BACKEND_OPTION_INVALIDCode của user QISKIT_INVALID_CIRCUIT_TYPE,QISKIT_CIRCUIT_INVALIDSDK / device QISKIT_TRANSPILE_FAILED,QISKIT_AER_ERROR,QISKIT_BACKEND_CONFIG_ERROR,QISKIT_SDK_ERRORRetry được IBMQ_JOB_TIMEOUT(120s),IBMQ_API_UNAVAILABLE(120s),IBMQ_BACKEND_ERROR(180s)Rule match theo tên class dạng string và
error_rules.pykhông importqiskit,qiskit_ibm_runtime,qiskit_aerhayqcaas_client. Đây là ràng buộc cứng: image C/C++ native càiquapp-qiskit --no-depsvà block các SDK đó, nênimport quapp_qiskitkhông được đòi vendor SDK — xemtests/test_lazy_provider_imports.py.Vài điểm phân loại đáng chú ý:
CircuitTooWideForTarget→INVALID_INPUTchứ không phảiSDK_RUNTIME: circuit nhiều qubit hơn device là thứ user sửa được.IBMBackendValueErrortách theo message —not foundlà lỗi device, còn lại là sai option.- Lỗi HTTP của RIKEN (
requests+raise_for_status(), bọc trongRuntimeError) vẫn raPROVIDER_AUTH_FAILEDnhờ 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ủaerror_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
343e0258e42d5f493abc43059ae4fec2842835587b908488b408f5a91c4c805b
|
|
| MD5 |
550c34e5ce3d78f5e20b5e80d3e13fc6
|
|
| BLAKE2b-256 |
5bbf9d99e250b853720c7a2107014def067e90c818db49e5e5f1588c9f8ec717
|
File details
Details for the file quapp_qiskit-1.0.13.dev23-py3-none-any.whl.
File metadata
- Download URL: quapp_qiskit-1.0.13.dev23-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e58b405382ce3d26549afd296911a4f4acf30a7c5a75f006ff30246cbde4864f
|
|
| MD5 |
cbd539f0b4063ef7c91bb259835a0f43
|
|
| BLAKE2b-256 |
84de76088663c3086fb2d508ebd3b0ed94343f85bbd2eadfc29bb0356edfd73a
|