Passing in a backend as a string is no longer valid
If a backend is passed to sampler/estimator from within an open session context manager, the job will now run from within that session. If the backend passed in is different from the session backend, an error will be raised.
Service is no longer a valid parameter in Session/Batch
Refactored Session.from_id() because it used to use service.
Removed QiskitRuntimeService.global_service because this was only necessary when backends could be given as strings.
Update tests to support all the above changes
I can also split this PR into multiple if that makes it easier to review
Summary
Changes in this PR:
Service
is no longer a valid parameter in Session/BatchSession.from_id()
because it used to useservice
.QiskitRuntimeService.global_service
because this was only necessary when backends could be given as strings.I can also split this PR into multiple if that makes it easier to review
Details and comments
Fixes #1681 Fixes #1727 Fixes #1886