Skip to content

pyqpanda3 v0.3.4 fixes two cloud service issues that could affect production workloads running on Origin Quantum cloud.

Bug Fixes

Enhanced QCloud error reporting. 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.

QCloud result count mismatch. 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.

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.