Qiskit job result missing attributes cause wrong exception when job fails in VQE
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, python
- Lĩnh vực
- backend, quantum-computing
Hướng nghiên cứu
Bắt đầu trong azure/quantum/qiskit/job.py, tại phần xây dựng result_dict được đề cập trong issue, và so sánh đầu ra của nó với các kỳ vọng của Qiskit Result. Tái hiện kịch bản một job VQE thất bại, sau đó xác minh rằng thông tin lỗi thu được có thể truy cập thông qua các thuộc tính kết quả được mong đợi mà không làm ảnh hưởng đến các job thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
If running the VQE sample and it fails to run on a quantum_instance (for instance, if Quantinuum is out of credits), then instead of printing the error code and message, it prints that an attribute "status" could not be found.

It looks like this is throwing from when it tries to read result.status from run_circuits.py.
Looking at the latest definition of Result object in qiskit, it looks like for the error_data message to be shown, we should encode the error_data into status field as well.
This is where we encode job result into Qiskit result as part of azure-quantum: https://github.com/microsoft/qdk-python/blob/944fac0ee64e962b65b73f29635a2c65abf332d7/azure-quantum/azure/quantum/qiskit/job.py#L93
Current:
result_dict = {
"results" : [results],
"job_id" : self._azure_job.details.id,
"backend_name" : self._backend.name(),
"backend_version" : self._backend.version,
"qobj_id" : self._azure_job.details.name,
"success" : success,
"error_data" : None if self._azure_job.details.error_data is None else self._azure_job.details.error_data.as_dict()
}
Proposed change:
error_msg = None if self._azure_job.details.error_data is None else self._azure_job.details.error_data.as_dict()
result_dict = {
"results" : [results],
"job_id" : self._azure_job.details.id,
"backend_name" : self._backend.name(),
"backend_version" : self._backend.version,
"qobj_id" : self._azure_job.details.name,
"success" : success,
"error_data" : error_msg,
"status": error_msg,
}
We may optionally want to add the other missing attributes on Qiskit result that are currently not populated, such as date, header, in case they also cause errors down the road.
- Ngôn ngữ chính
- Python
- Star
- 160
- Fork
- 113
- Merge trung bình
- 6 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/azure-quantum-python
-
Infinite recursion error on deep copy `AzureBackendConfig` due to __getattr__ implementation Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
Export types Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
microsoft/azure-quantum-python#650 · 1 bình luận ·
-
azure-quantum
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 20/100
Tất cả issue của microsoft/azure-quantum-python
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·