-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use service defined by user as default (#955)
* Adding global service * Added tests for global service * Fixed failing tests * black * Syntax changes * Restored test * Fixed tests that were failing. mock_service.global_service must be initialized for it to work correctly * Fixed test and added another case to a test * Fix in test * Release note --------- Co-authored-by: Kevin Tian <[email protected]>
- Loading branch information
1 parent
3d8b9c9
commit ab01504
Showing
6 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
features: | ||
- | | ||
Added a ``global_service``, so that if the user defines a `QiskitRuntimeService`, it will | ||
be used by the primitives, even if the service is not passed to them explicitly. | ||
For example:: | ||
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler | ||
service = QiskitRuntimeService(channel="ibm_quantum") | ||
# Sampler._service field will be initialized to ``service`` | ||
sampler = Sampler(backend="ibmq_qasm_simulator") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters