Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| from azure.quantum.qiskit import AzureQuantumProvider | ||
|
|
||
|
|
||
| _DEFAULT_SHOTS_COUNT = 500 |
There was a problem hiding this comment.
Where did this number come from? I tried looking in the backend base and the default was None.
There was a problem hiding this comment.
All of the other backends use 500 as their default shot count, so it seemed appropriate to follow suit here.
| # Default to the most conservative QIR profile; users can override per-run via | ||
| # `target_profile=` in backend.run(...). |
There was a problem hiding this comment.
I believe you are referring to users' ability to set the target profile via target_profile= in backend.run(...). I believe we are currently working on improving our python API documentation, but since this is a preexisting option, I would expect our API documentation to include this.
There was a problem hiding this comment.
The difference is that the default profile for backends always matched is capabilities. In this case the opposite is true. We don't know its caps and they don't necessarily match.
There was a problem hiding this comment.
I see, you were asking about how users will know that the generic backends will default to the base profile. I'm not sure there is a specific way to do this, other than perhaps in the doc string for the generic backend class.
An idea is to dynamically set the target_profile in the options after Qiskit's initialization (done during our init) to a target_profile based on the target being wrapped.
There was a problem hiding this comment.
Though that idea would still have the target_profile here in this _default_options class method set to Base, as we can't use instance specific data here.
There was a problem hiding this comment.
I've updated to take the target profile from the wrapped target's status. It will set the target_profile in the backend's __init__() method, after Qiskit runs its constructor. _default_options() remains unchanged though. Let me know if you see an issue with this approach.
38a28d4 to
19c08a2
Compare
This PR adds a generic QIR backend for Qiskit submission to Azure. This backend will wrap around all available targets and make available all targets that do not otherwise have specifically defined Qiskit backends.
I also found that I needed to address an issue I was encountering where the job metadata being submitted was not fully stringified.