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

Add "Get started" tutorial #10328

Closed
wants to merge 25 commits into from

Conversation

frankharkins
Copy link
Member

@frankharkins frankharkins commented Jun 23, 2023

Summary

Adds a new "Get started with Qiskit" tutorial to replace the three existing introduction tutorials.

Details and comments

Topics breakdown

Here's the topics I could see covered in the existing tutorials. Strikethough means I chose not to include it in the new tutorial.

  • General Qiskit workflow

    • Build circuit
    • Compile for device
    • Run
    • Analyze results (although I do show plot_histogram)
  • QuantumCircuit

    • h
    • cx
    • measure
    • draw
  • Simulating

    • Sampler
    • quantum_info.Statevector
    • Qiskit Aer
    • AerSimulator
    • state vector vs qasm vs other simulators
    • .result
    • .get_counts / .get_memory
  • Other important classes / functions

    • plot_histogram
    • shots parameter
    • transpile
    • BasicAer
  • Settings

    • Change default circuit drawer
  • General quantum computing

    • Default state of qubits
    • Qubit ordering
    • What a circuit is

⚠️ Note to reviewers

This notebook contains raw reST cells, which don't display in GitHub's built-in notebook viewer. For example this cell is hidden. This could be a downside of using notebooks with ReST cells.


Closes #10315, closes #10613

@coveralls
Copy link

coveralls commented Jun 23, 2023

Pull Request Test Coverage Report for Build 5869258713

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 20 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.244%

Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 93.75%
crates/qasm2/src/lex.rs 5 91.39%
crates/qasm2/src/parse.rs 12 96.67%
Totals Coverage Status
Change from base Build 5868812324: -0.02%
Covered Lines: 74286
Relevant Lines: 85147

💛 - Coveralls

Copy link
Contributor

@javabster javabster left a comment

Choose a reason for hiding this comment

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

Thanks for the speedy work on this @frankharkins!

The main general comment I have is that I think there could be a smidge more detail. Atm this feels more like a how to guide than a tutorial (not sure if anyone's showed you this yet but we have a docs guide here that breaks down the difference). I know we don't want to go too much down the rabbit hole of teaching quantum computing with these tutorials but I think we could give a bit more detail than whats currently here. One example of a tutorial that I think strikes the right balance is this one on QPE from the runtime docs. I think something similar here, giving some context on what the bell state actually is, would be good. Also would be good to add a pre-requisites section that links people to the installation page (see tutorial guidelines [here])(https://qiskit.github.io/qiskit_sphinx_theme/tutorials/tutorials_guidelines.html))

* More info for new learners
* Use rst for cross-references
Copy link
Member Author

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. I've added a bit more detail, plus some links out for further explanation.

docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@javabster javabster left a comment

Choose a reason for hiding this comment

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

making good progress!

docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
@javabster
Copy link
Contributor

javabster commented Jul 3, 2023

one additional point, the existing getting started tutorial gives a helpful tip about how the qubit ordering is reversed, I think it would be good to do something similar here, or possibly just mention it briefly and then share a link to the more detailed explanation (not deployed yet, also there is an open PR/discussion on this that you might like to take over or weigh in on)

@javabster javabster added the documentation Something is not clear or an error documentation label Jul 17, 2023
frankharkins and others added 3 commits July 24, 2023 12:50
* Mention Qiskit and IBM Qiskit Runtime
* Improve flow
* Mention little-endianess

Co-authored-by: Abby Mitchell <[email protected]>
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started.ipynb Outdated Show resolved Hide resolved
@frankharkins frankharkins marked this pull request as ready for review August 14, 2023 14:20
@frankharkins frankharkins requested a review from a team as a code owner August 14, 2023 14:20
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Looks good! As discussed, this either needs to live in the top level of tutorials/ and be added to index.rst, or move into a subfolder of tutorials/.

Also this PR should remove the now irrelevant tutorials.

docs/tutorials/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/tutorials/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
javabster
javabster previously approved these changes Aug 21, 2023
Copy link
Contributor

@javabster javabster left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

docs/installation.rst Outdated Show resolved Hide resolved
@Eric-Arellano Eric-Arellano added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: None Do not include in changelog labels Aug 21, 2023
Eric-Arellano
Eric-Arellano previously approved these changes Aug 25, 2023
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

This looks fine to me, I'm not super keen on using a notebook for this, it makes it a lot harder to review and interact with but that's not a strong objection. I left a few comments inline about the content but nothing major.

The other question is about the "Quantum computing in a nutshell" guide, that is being removed here, but this new document isn't a replacement for that information; it only replaces the intro tutorial (and moves to using the sampler). Is there a plan to replace that guide with some of the higher level background info about quantum computing?

docs/get_started_with_qiskit.ipynb Show resolved Hide resolved
docs/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
docs/get_started_with_qiskit.ipynb Outdated Show resolved Hide resolved
"tags": []
},
"source": [
"You can use the :func:`~.visualization.plot_histogram` function to plot your `Sampler` results. This function returns a MatPlotLib `Figure`, which displays nicely in Jupyter notebooks. For more ways to display results, see `Qiskit visualizations <https://qiskit.org/documentation/tutorials/circuits/2_plotting_data_in_qiskit.html>`__."
Copy link
Member

Choose a reason for hiding this comment

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

If we're in rst space can we use references instead of external links? If we can that'll be a bit more robust for different builds of the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this is possible until #10710 is merged

@frankharkins
Copy link
Member Author

@mtreinish thank you!

I'm not super keen on using a notebook for this, it makes it a lot harder to review and interact with but that's not a strong objection.

I also don't have a strong opinion; I did ask which format to use before writing and the answers were pretty evenly divided.

The other question is about the "Quantum computing in a nutshell" guide, [...] Is there a plan to replace that guide with some of the higher level background info about quantum computing?

I believe the plan is not to replace this, instead pointing people to the learning platform (source).

@frankharkins frankharkins deleted the fh-get-started-tutorial branch November 28, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog documentation Something is not clear or an error documentation stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Archived in project
Status: No status
Development

Successfully merging this pull request may close these issues.

Review and refactor docs intro pages write a "get started with Qiskit" tutorial
7 participants