Skip to content

0.3.4

Bug Fixes

1. Enhanced QCloud error reporting with task ID information.

When QCloud task result requests fail, the error message now includes the task ID for easier debugging and issue tracking. Improved error handling mechanisms provide more detailed error information.

2. Fixed QCloud result count mismatch for large bit systems (32+ qubits).

Fixed a bug where the number of results returned by QCloud for large bit systems (32 qubits or more) did not match the number of results after base conversion. Previously, for example, when QCloud returned 4000 results, only 2600 were available in the result object. This issue has been resolved.

python
from pyqpanda3.core import H, measure, QProg
from pyqpanda3.qcloud import QCloudService, QCloudOptions, QCloudJob

prog = QProg()
prog << H(0) << measure(0, 0) << measure(1, 1)

# Get your real API token from https://account.originqc.com.cn/
api_key = "your_api_key"
service = QCloudService(api_key=api_key)

job = QCloudJob("task_id")
result = job.result()

for result_list in result.get_probs_list():
    print(result_list)

Released under the MIT License.