You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we allow one to pass the backend name (string) when initializing Sampler/Estimator/Session/Batch, for example, you can do
sampler=SamplerV2(backend="ibm_osaka")
This would actually call QiskitRuntimeService() (i.e. use your default account setting) under the cover, which can be a surprise to people if the default channel or h/g/p is not what they want to use.
In the past this would cause confusion because it would actually use the default account instead of the account named foo. To address this, we added code to use the last-initialize account instead of the default one. But this was also inferring user's intent and contradicts with the docstring which says If a name is specified, the default account is used.
To make the account selection more explicit, we can 1) make both service and backend required or 2) disallow passing a string for backend.
With the ISA circuit requirement, people are more likely to initialize a backend object now to do transpilation, so (2) seems to be the better choice.
Acceptance criteria
Deprecate passing a string for backend when initializing Session, Batch, SamplerV2 and EstimatorV2.
The text was updated successfully, but these errors were encountered:
What is the expected feature or enhancement?
Related to #1681.
Today we allow one to pass the backend name (string) when initializing Sampler/Estimator/Session/Batch, for example, you can do
This would actually call QiskitRuntimeService() (i.e. use your default account setting) under the cover, which can be a surprise to people if the default channel or h/g/p is not what they want to use.
Furthermore, some people would do
In the past this would cause confusion because it would actually use the default account instead of the account named
foo
. To address this, we added code to use the last-initialize account instead of the default one. But this was also inferring user's intent and contradicts with the docstring which saysIf a name is specified, the default account is used
.To make the account selection more explicit, we can 1) make both
service
andbackend
required or 2) disallow passing a string forbackend
.With the ISA circuit requirement, people are more likely to initialize a backend object now to do transpilation, so (2) seems to be the better choice.
Acceptance criteria
backend
when initializingSession
,Batch
,SamplerV2
andEstimatorV2
.The text was updated successfully, but these errors were encountered: