microsoft / azure-quantum-python

The azure-quantum python package submits jobs to the Azure Quantum service.
https://learn.microsoft.com/azure/quantum/
MIT License
126 stars 92 forks source link

backend.run and backend.estimate_cost input argument names are not consistent between IonQ and Quantinuum backends #269

Closed guenp closed 2 years ago

guenp commented 2 years ago

backend.run and backend.estimate_cost should take shots as input argument; for the Honeywell backend, this is currently count.

Switching these around raises confusing warning messages:

count1

count2

We should change the interface such that usage is consistent between the two providers:

cost = ionq_backend.estimate_cost(circuit, shots=100)
job = ionq_backend.run(circuit, shots=100)

and

cost = quantinuum_backend.estimate_cost(circuit, shots=100)
job = quantinuum_backend.run(circuit, shots=100)

This is a breaking change. After the fix, only shots should be used to specify the number of shots, both for estimate_cost and run.

guenp commented 2 years ago

Fixed by #246