Execution Metrics
Overview
Quantinuum QESEM exposes resource and result information at each stage of the job lifecycle. You can see the HQC cost of the resource estimation, the HQC required for the remaining mitigation, and the final execution metadata.
Resource Estimation
Resource estimation is a required stage of the QESEM workflow. It determines the HQC cost required to reach the target precision. When the stage completes, it returns:
- Preliminary mitigated results.
- Corresponding unmitigated results.
- The HQC required to complete the remaining mitigation.
You can use this information to select a suitable max_hqc budget before starting the full QESEM run.
Warning
max_hqc is a best effort budget, not a strict execution limit. A run may exceed it by several hundred HQC units. Setting max_hqc below the value returned by resource estimation may prevent QESEM from reaching the target precision.
Final Results Structure
For each observable, the final QESEM results include:
- The mitigated expectation value and error bar.
- The unmitigated expectation value and error bar.
In addition, the QESEM output includes:
- Breakdown of HQC consumed.
- Backend used.
- Job progress and status.
- Execution details, including total and mitigation shot counts when available.
- Warnings and errors when relevant.
The result structure looks like this:
for observable, result in job.results:
print("Observable:", observable)
print("Mitigated:", result.mitigated)
print("Unmitigated:", result.unmitigated)
print("QPU:", job.qpu_name)
print("Status:", job.status)
print("HQC required for resource estimation:", job.analytical_hqc_estimation)
print("HQC required for remaining mitigation:", job.empirical_hqc_estimation)
print("Resource estimation HQC consumed:", job.empirical_hqc)
print("Final execution HQC consumed:", job.hqc)
Job Statuses
The QESEM workflow exposes a status field so you can understand at which stage the job is:
INITIALIZING— The job was created and QESEM is preparing it for analytical estimation.ESTIMATING_ANALYTICAL— QESEM is calculating the HQC required to perform resource estimation.ESTIMATED_ANALYTICAL— Analytical estimation is complete, and the job is ready to begin resource estimation.ESTIMATING_EMPIRICAL— Resource estimation is running to determine the HQC required for the remaining mitigation.ESTIMATED_EMPIRICAL— Resource estimation is complete. The job can now be started withstart_job(..., max_hqc=...).RUNNING— The full QESEM run is in progress.SUCCEEDED— The job completed successfully, and its final results are available.FAILED— The job failed. Details are available injob.errors.CANCELLED— The job was cancelled by the user.
For Quantinuum jobs, these statuses indicate that user action is required: at ESTIMATED_ANALYTICAL, start resource estimation; at ESTIMATED_EMPIRICAL, review the required HQC and start the full QESEM run with an appropriate max_hqc budget.