zapatacomputing/benchq

AzureResourceEstimator uses incorrect error_budget param name

Closed this issue · 1 comments

Line 78 of /resource_estimation/azure.py is the following:
azure_error_budget["tstates"] = remaining_error / 2

However, the Azure QRE requires "tStates" to be used. Otherwise, the following error is thrown:

  File "ZZZ/benchq/src/benchq/resource_estimation/azure.py", line 119, in _estimate_resources_for_circuit
    job_results = job.result().data()
                  ^^^^^^^^^^^^
  File "ZZZ/anaconda3/envs/benchqenv/lib/python3.11/site-packages/azure/quantum/qiskit/job.py", line 100, in result
    return make_estimator_result(result_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ZZZ/anaconda3/envs/benchqenv/lib/python3.11/site-packages/azure/quantum/qiskit/results/resource_estimator.py", line 18, in make_estimator_result
    raise RuntimeError(message)
RuntimeError: Cannot retrieve results as job execution failed (IOError: cannot parse JSON: 'data did not match any variant of untagged enum ErrorBudgetSpecification at line 1 column 299')

Changing line 78 to azure_error_budget["tStates"] = remaining_error / 2 corrects the error.

To test this ex_3_packages_comparison.py can be used after properly setting the AZURE_RESOURCE_ID environment variable.

This was seen with the latest version of the code and Python 3.11.

I would be happy to fix this issue and submit a PR if you would like to assign it to me.