Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 23 additions & 24 deletions docs/guides/debug-qiskit-runtime-jobs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
},
{
"cell_type": "code",
"execution_count": 2,
"id": "8a98c131",
"execution_count": null,
"id": "a45a6d9e-de39-4586-8395-a7f580f0e0dc",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -120,9 +120,8 @@
"backend = service.least_busy(operational=True, simulator=False)\n",
"\n",
"# Generate a preset pass manager\n",
"# This will be used to convert the abstract circuit to an equivalent\n",
"# Instruction Set Architecture (ISA) circuit.\n",
"\n",
"# This will be used to convert the abstract circuit to an\n",
"# equivalent Instruction Set Architecture (ISA) circuit.\n",
"pm = generate_preset_pass_manager(backend=backend, optimization_level=0)\n",
"\n",
"# Set the random seed\n",
Expand All @@ -144,8 +143,8 @@
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a9018f3a",
"execution_count": null,
"id": "df19af55-897d-4b1f-baf8-fac2641ae87d",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -220,8 +219,8 @@
},
{
"cell_type": "code",
"execution_count": 4,
"id": "edf0d8f7",
"execution_count": null,
"id": "830b1dcc-2669-46cc-bff8-01a96a05c6ab",
"metadata": {},
"outputs": [
{
Expand All @@ -240,8 +239,8 @@
"# Map the observables to the backend's layout\n",
"isa_obs = [SparsePauliOp(o).apply_layout(isa_qc.layout) for o in obs]\n",
"\n",
"# Initialize the PUBs, which consist of six-qubit circuits\n",
"# with `n_layers` 1, ..., 6\n",
"# Initialize the PUBs, which consist of six-qubit circuits with\n",
"# `n_layers` 1, ..., 6\n",
"all_n_layers = [1, 2, 3, 4, 5, 6]\n",
"\n",
"pubs = [(pm.run(generate_circuit(6, n)), isa_obs) for n in all_n_layers]"
Expand Down Expand Up @@ -335,8 +334,8 @@
},
{
"cell_type": "code",
"execution_count": 7,
"id": "e2f936c5",
"execution_count": null,
"id": "23859a99-2455-460e-98ea-17b36ea59c36",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -386,8 +385,8 @@
},
{
"cell_type": "code",
"execution_count": 8,
"id": "00fed421",
"execution_count": null,
"id": "cd61e437-bd2f-4349-a667-7edab51c4a6e",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -434,8 +433,8 @@
" # Print the mean absolute difference for the observables\n",
" mean_vals = np.round(np.mean(vals), 2)\n",
" print(\n",
" f\"Mean absolute difference between ideal and noisy results \"\n",
" f\"for circuits with {all_n_layers[idx]} layers:\\n {mean_vals}%\\n\"\n",
" f\"Mean absolute difference between ideal and noisy results\"\n",
" f\" for circuits with {all_n_layers[idx]} layers:\\n {mean_vals}%\\n\"\n",
" )"
]
},
Expand Down Expand Up @@ -463,8 +462,8 @@
},
{
"cell_type": "code",
"execution_count": 9,
"id": "baf16779",
"execution_count": null,
"id": "0835c562-55c9-4dbe-879e-7271f8bed280",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -518,7 +517,7 @@
" # Print the mean absolute difference for the observables\n",
" mean_values = np.round(np.mean(values), 2)\n",
" print(\n",
" f\"Mean absolute difference between ideal and noisy results \"\n",
" f\"Mean absolute difference between ideal and noisy results\"\n",
" f\"for circuits with {all_n_layers[idx]} layers:\\n {mean_values}%\\n\"\n",
" )"
]
Expand Down Expand Up @@ -624,8 +623,8 @@
},
{
"cell_type": "code",
"execution_count": 14,
"id": "d409906c",
"execution_count": null,
"id": "7db531a1-c417-4d5b-bdc3-7a4ad3385fd4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -656,8 +655,8 @@
"for factors, res in zip(noise_factors, results):\n",
" d = rdiff(ideal_results[0], res[0])\n",
" print(\n",
" f\"Mean absolute difference for factors \"\n",
" f\"{factors}:\\n {np.round(np.mean(d), 2)}%\\n\"\n",
" f\"Mean absolute difference for factors\"\n",
" f\" {factors}:\\n {np.round(np.mean(d), 2)}%\\n\"\n",
" )"
]
},
Expand Down
11 changes: 7 additions & 4 deletions docs/guides/function-template-chemistry-workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@
"Optionally, use `save_account()` to save your credentials in a local environment (see the [Set up your IBM Cloud account](/docs/guides/cloud-setup#cloud-save) guide). Note that this writes your credentials to the same file as [`QiskitRuntimeService.save_account()`](/docs/api/qiskit-ibm-runtime/qiskit-runtime-service#save_account):\n",
"\n",
"```python\n",
"QiskitServerless.save_account(token=\"YOUR_API_KEY\",\n",
" channel=\"ibm_quantum_platform\", instance=\"INSTANCE_CRN\")\n",
"QiskitServerless.save_account(\n",
" token=\"YOUR_API_KEY\",\n",
" channel=\"ibm_quantum_platform\",\n",
" instance=\"INSTANCE_CRN\")\n",
"```\n",
"\n",
"If the [account is saved](/docs/guides/save-credentials), there is no need to provide the token to authenticate:"
Expand Down Expand Up @@ -379,8 +381,9 @@
"}\n",
"\n",
"solvent_options = {\n",
" # See https://manual.q-chem.com/5.4/topic_pcm-em.html for all methods\n",
" \"method\": \"IEF-PCM\", # other available methods are COSMO, C-PCM, SS(V)PE\n",
" \"method\": \"IEF-PCM\",\n",
" # Other available methods are COSMO, C-PCM and SS(V)PE.\n",
" # see https://manual.q-chem.com/5.4/topic_pcm-em.html for more details\n",
" \"eps\": 78.3553, # value for water\n",
"}\n",
"\n",
Expand Down
Loading