-
Notifications
You must be signed in to change notification settings - Fork 125
add noisy results #2842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add noisy results #2842
Conversation
Thanks for contributing to Qiskit documentation! Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌 One or more of the following people are relevant to this code: |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Hey @assafb, thanks! This looks good. There are some formatting issues that can be fixed by either running diff --git a/docs/guides/qedma-qesem.ipynb b/docs/guides/qedma-qesem.ipynb
index e00aa40984..ccb9587bdb 100644
--- a/docs/guides/qedma-qesem.ipynb
+++ b/docs/guides/qedma-qesem.ipynb
@@ -167,12 +167,12 @@
")\n",
"\n",
"job = qesem_function.run(\n",
- " pubs = [(circ, [avg_magnetization, other_observable])],\n",
- " options = {\n",
+ " pubs=[(circ, [avg_magnetization, other_observable])],\n",
+ " options={\n",
" \"estimate_time_only\": \"analytical\",\n",
" },\n",
- " instance = instance,\n",
- " backend_name = backend_name, # E.g. \"ibm_brisbane\"\n",
+ " instance=instance,\n",
+ " backend_name=backend_name, # E.g. \"ibm_brisbane\"\n",
")"
]
},
@@ -192,9 +192,9 @@
"outputs": [],
"source": [
"job = qesem_function.run(\n",
- " pubs = [(circ, [avg_magnetization, other_observable])],\n",
- " instance = instance,\n",
- " backend_name = backend_name, # E.g. \"ibm_brisbane\"\n",
+ " pubs=[(circ, [avg_magnetization, other_observable])],\n",
+ " instance=instance,\n",
+ " backend_name=backend_name, # E.g. \"ibm_brisbane\"\n",
")"
]
},
@@ -328,7 +328,9 @@
}
],
"source": [
- "print(f\"The estimated QPU time for this PUB is: \\n{result[0].metadata['time_estimation_sec']}\")"
+ "print(\n",
+ " f\"The estimated QPU time for this PUB is: \\n{result[0].metadata['time_estimation_sec']}\"\n",
+ ")"
]
},
{
@@ -363,9 +365,11 @@
],
"source": [
"print(f\"The result of the submitted job had {len(result)} PUB\")\n",
- "print(f\"The expectation values measured from this PUB are: \\n{result[0].data.evs}\")\n",
+ "print(\n",
+ " f\"The expectation values measured from this PUB are: \\n{result[0].data.evs}\"\n",
+ ")\n",
"print(f\"The error-bar values are: \\n{result[0].data.stds}\")\n",
- "noisy_results = result[0].metadata['noisy_results']\n",
+ "noisy_results = result[0].metadata[\"noisy_results\"]\n",
"print(f\"Noisy expectation values: \\n{noisy_results.evs}\")\n",
"print(f\"Noisy error-bar: \\n{noisy_results.stds}\")"
]
@@ -445,7 +449,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.11"
+ "version": "3"
},
"title": "QESEM - A Qiskit Function by Qedma"
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me too, provided that the formatting suggestion is applied, thanks! We might want to do a more general functions documentation content review in a follow-up, but I think it's best to merge this PR first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
No description provided.