Skip to content
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

Closed

Conversation

rathishcholarajan
Copy link
Member

@rathishcholarajan rathishcholarajan commented Mar 14, 2022

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

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coveralls
Copy link

coveralls commented Mar 14, 2022

Pull Request Test Coverage Report for Build 1982693347

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 70.158%

Totals Coverage Status
Change from base Build 1981800402: 1.2%
Covered Lines: 2043
Relevant Lines: 2912

💛 - Coveralls

Copy link
Collaborator

@daka1510 daka1510 left a 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 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you mentioned "session" here, perhaps a few words about what it is?


Reply via ReviewNB

@@ -0,0 +1,238 @@
{
Copy link
Collaborator

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 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have error mitigation yet


Reply via ReviewNB

@@ -0,0 +1,211 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No example on using a parameterized circuit?


Reply via ReviewNB

@@ -0,0 +1,211 @@
{
"cells": [
Copy link
Collaborator

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 @@
{
Copy link
Contributor

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 @@
{
Copy link
Contributor

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

@rathishcholarajan rathishcholarajan changed the title Add Primitives tutorials + update existing tutorials [Don't merge] Add Primitives tutorials Mar 16, 2022
@rathishcholarajan rathishcholarajan deleted the primitives-tutorials branch April 8, 2022 18:27
blakejohnson pushed a commit to blakejohnson/qiskit-ibm-runtime that referenced this pull request May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants