Skip to content

Commit 3f8d09f

Browse files
beckykdabbycross
andauthored
Document how to find DC backends (#3997)
closes #3982 --------- Co-authored-by: abbycross <[email protected]>
1 parent 3927fd7 commit 3f8d09f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs/guides/classical-feedforward-and-control-flow.ipynb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,34 @@
285285
"qc.draw(output=\"mpl\", style=\"iqp\", idle_wires=False, fold=-1)"
286286
]
287287
},
288+
{
289+
"cell_type": "markdown",
290+
"id": "203cbeaa-3522-4ebd-8ac7-df7741f759f2",
291+
"metadata": {},
292+
"source": [
293+
"## Find backends that support dynamic circuits\n",
294+
"\n",
295+
"To find all backends that support dynamic circuits and that your account can access, run code like the following. This example assumes that you have [saved your login credentials.](/docs/guides/save-credentials) You could also [initialize your Qiskit Runtime service account](/docs/guides/initialize-account#explicit) with manually-specified credentials. In this case, you could view backends available on a specific instance or plan type, for example.\n",
296+
"\n",
297+
"<Admonition type=\"note\">\n",
298+
"The backends that are available to the account depend on the instance specified in the credentials.\n",
299+
"</Admonition>"
300+
]
301+
},
302+
{
303+
"cell_type": "code",
304+
"execution_count": null,
305+
"id": "2ddb1b97-4223-427b-a4cd-99e2f6ccbfe9",
306+
"metadata": {},
307+
"outputs": [],
308+
"source": [
309+
"from qiskit_ibm_runtime import QiskitRuntimeService\n",
310+
"\n",
311+
"service = QiskitRuntimeService()\n",
312+
"dc_backends = service.backends(dynamic_circuits=True)\n",
313+
"print(dc_backends)"
314+
]
315+
},
288316
{
289317
"cell_type": "markdown",
290318
"id": "0378a45f-7a28-48bc-993d-0e4308d38bfc",

docs/guides/save-credentials.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ QiskitRuntimeService.save_account(
103103
)
104104
```
105105

106+
## View saved credentials
107+
108+
To view all credentials that you have saved, run `service.saved_accounts()`. Note that if you saved default credentials and didn't name them, they are named `default-ibm-quantum-platform`. If you did name your default credentials, you will see `"is_default_account": true` in the output.
109+
106110
## Considerations
107111

108112
* If you are saving multiple accounts, use the `name` parameter to differentiate them.

0 commit comments

Comments
 (0)