-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Don't merge] Add Primitives tutorials #207
[Don't merge] Add Primitives tutorials #207
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Pull Request Test Coverage Report for Build 1982693347Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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
@@ -0,0 +1,238 @@ | |||
{ |
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.
@@ -0,0 +1,238 @@ | |||
{ |
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.
Perhaps some words on how the different indices match up, and that they need to have the same length. Also if I didn't already know how session works, it'd be unclear to me the indices refer to the circuits/observables passed in when entering the context manager.
Reply via ReviewNB
@@ -0,0 +1,211 @@ | |||
{ |
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.
@@ -0,0 +1,211 @@ | |||
{ |
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.
@@ -0,0 +1,211 @@ | |||
{ | |||
"cells": [ |
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.
Thinking about this more I'm a bit confused about the difference between this code and the existing tutorial code we used to invoke the sampler program
# Specify the program inputs here.
program_inputs = {"circuits": qc}
# Specify the backend name.
options = {"backend_name": "ibmq_qasm_simulator"}
job = service.run(
program_id="sampler",
options=options,
inputs=program_inputs,
)
Is there a conceptual difference between the sampler program and a sampler primitive? How do both approaches relate to each other?
@@ -0,0 +1,211 @@ | |||
{ |
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.
Line #8. print(bell.draw())
This will not work well if the drawing default option is set to mpl
. I suggest changing to print(bell.draw(output='text'))
or bell.draw()
Reply via ReviewNB
@@ -0,0 +1,238 @@ | |||
{ |
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.
Line #11. print(psi1.draw()) Line #12. print(psi2.draw())
Similar to the sampler tutorial, I suggest the following changes.
print(psi1.draw(output='text'))print(psi2.draw(output='text'))
Reply via ReviewNB
bac42ab
to
1d42f74
Compare
Summary
Add tutorials for Estimator and Sampler (IQX and Cloud)
(This PR is only for the reference of community team as they are writing nicer tutorials and shouldn't be merged as is)
Details and comments
Adds a new Primitives section under Tutorials with Estimator and Sampler.
![Screen Shot 2022-03-15 at 1 02 25 AM](https://user-images.githubusercontent.com/4089196/158310138-da7e57a0-5ab0-44c4-8c3f-e24cd24bc777.png)