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 tutorials (redo) #46

Merged
merged 78 commits into from
Aug 22, 2023
Merged

Add tutorials (redo) #46

merged 78 commits into from
Aug 22, 2023

Conversation

ElePT
Copy link
Collaborator

@ElePT ElePT commented Aug 21, 2023

Summary

Redo of #44 after accidentally squashing the commits (and thus, losing the history).

Details and comments

a-matsuo and others added 30 commits October 21, 2020 09:30
* added grover tutorial

* adding amplitude amplification

* added explanation of optional arguments

* changed the folder name

* finalized the tutorial

* change the file name

* finalize

Co-authored-by: Paul Nation <[email protected]>
* Add algorithm and ml tutorials for Aqua

* Number qgan and add advanced vqe

* Fix notebook link

* Change IBMQ to mock simulator

* Add folders to index.rst

* Fix warnings in grover notebook

Co-authored-by: Manoel Marques <[email protected]>
Co-authored-by: Paul Nation <[email protected]>
### Summary
Fix issue Qiskit/qiskit-tutorials#1095 

### Details and comments
Delete the wrong and meaningless part of the sentence ". which it has to do the same thing".
algorithms: fix typo on grover jupyter notebook
Fixed Broken Links in "01_algorithms_introduction" tutorial.
Updated Some Old Links in "03_vqe_simulation_with_noise"
Added a extra Link and Corrected a Link in some tutorials
…utorials#1152)

* fix math mode of tutorials/circuits_advanced/09_pulse_simulator_duffing_model.ipynb

* fix toc of tutorials of operator flow

* simplify

* remove toc of tutorials of circuits_advanced

* fix toc of 06_building_pulse_schedules

* fix math mode

* fix math mode and code style in a link

* fix sum, sin, and cos

* fix typos
…nd grover tutorials (Qiskit/qiskit-tutorials#1163)

* Fix spelling in simulator tutorials and math mode of opflow tutorial

* Fix math mode and list of Grover tutorial

Co-authored-by: SooluThomas <[email protected]>
Aqua imports replaced by QIskit Terra classes.

Chemistry, Finance, Machine Learning and Optimization were
removed as all those were converted and migrated to the new application repositories

* Remove Aqua references from notebooks

* Change algorithm/operator tutorials to use Aer

* compute gradients with fixed operator

* QAOA change weights to 1 and remove get_graph_solution

* Remove parallel disable statement & print oracle
qbuits -> qubits
inizialize -> initialize
quntum -> quantum
x-measurment -> x-measurement
Fix a few typos "previous", "need" (twice), "measurement" (twice)
Cryoris and others added 15 commits May 19, 2023 14:40
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

Add a tutorial on the p-VQD algorithm implemented in Qiskit as ``PVQD``.

Closes: Qiskit/qiskit-tutorials#1373
There were two issues preventing this:

1. nbsphinx changed how it does in-page URLs now for `#` anchors.
2. Grover Examples has had a bad thumbnail. I thought it would be fixed
by Qiskit/qiskit-tutorials#1466, but the error
still exists, so I think this has always been an issue.
…t-tutorials#1391) (Qiskit/qiskit-tutorials#1470)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

Unitary Hack submission. Fixes Qiskit/qiskit-tutorials#1391.

### Details and comments
In this tutorial, we
* introduce the variational quantum imaginary and real time evolution
based on McLachlan's variational principle.
* show how this can be leveraged using Qiskit classes.
* benchmark the default gradient/qgt methods with the new classically
efficient gradients introduced in the
qiskit.algorithms.gradients.reverse_gradient package.

This works is done by I-Chi (@ichen17), Kaixin (@huckstar), Wenxiang
(@wenxh0718) collaboratively. Special thanks to FinQ Tech
(http://finq.tech/) for their support and mentorship, which were
instrumental to the successful completion of this quantum computing
hackathon project.

---------

Co-authored-by: ichen17 <[email protected]>
Co-authored-by: Kaixin <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
…) (Qiskit/qiskit-tutorials#1463)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
Fixes Qiskit/qiskit-tutorials#1390, Unitary Hack contribution.


### Details and comments
- Updates the gradients tutorial from `opflow.gradients` to
`algorithms.gradients`
- Use of `BaseEstimator` and `BaseSampler` classes from Primitives for
gradient evaluation
- Demonstration of different methods for gradient evaluation
- Application example: VQE - Solved using Estimator, Sampler, and
classical optimizer (scipy.minimize)
- More details on SPSA gradient and Qiskit Primitives can be added

---------

Co-authored-by: Elena Peña Tapia <[email protected]>
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
Closes Qiskit/qiskit-tutorials#1405

Replaced deprecated Classes with supported Classes
SumPauliOP -> SparsePauliOp
eigen_solvers.eigen_solver.Eigensolver -> eigensolvers.Eigensolver

### Details and comments

-Deprecated qiskit.opflow.primitive_ops.pauli_sum_op.PauliSumOp Class
replaced with qiskit.quantum_info.SparsePauliOp Class
-Deprecated qiskit.algorithms.eigen_solvers.eigen_solver.Eigensolver
Class replaced with qiskit.algorithms.eigensolvers.Eigensolver Class

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…rials#1475)

<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

Quick change to Grover's Algorithm tutorial to clarify that
`optimal_num_iterations` is designed for the uniform superposition and
not general state preparations.

### Details and comments

Change was inspired by [this Quantum Computing StackExchange
question](https://quantumcomputing.stackexchange.com/questions/32951/find-the-number-of-iterations-for-amplitude-amplification-to-get-the-correct-sta).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
This PR will improve
[tutorials/algorithms/09_IQPE.ipynb](https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/algorithms/09_IQPE.ipynb)


### Details and comments
fixes Qiskit/qiskit-tutorials#1410
Part of Qiskit/qiskit-tutorials#1401

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…it/qiskit-tutorials#1322)

Closes Qiskit/qiskit-tutorials#1315. As
explained there, these `index.rst` pages result in our Tutorials home
page having extra entries that simply link to that section's other
entries.

This PR fixes it by mirroring `tutorials.rst` from `qiskit-metapackage`.
Our `index.html` now directly calls `nbgallery` with `glob`, rather than
referring to `index.rst` using normal Sphinx mechanisms. That results in
this tutorials repo rendering like this:

![Screenshot 2023-07-11 at 9 54 04
AM](https://github.com/Qiskit/qiskit-tutorials/assets/14852634/b12c151e-d2c2-4f5b-ad50-18703708046d)

The metapackage ignores this repo's `index.rst` and only copies over the
`tutorials/` folder. So, it will copy over the same content as before,
only now without the `index.rst` files in each subfolder.

---------

Co-authored-by: Eric Arellano <[email protected]>
Co-authored-by: Eric Arellano <[email protected]>
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
This PR will Improve
[tutorials/algorithms/06_grover](https://qiskit.org/documentation/tutorials/algorithms/06_grover.html)

### Details and comments
fixes Qiskit/qiskit-tutorials#1407
Part of Qiskit/qiskit-tutorials#1401

---------

Co-authored-by: Eric Arellano <[email protected]>
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary
This PR will improve the tutorial
[02_vqe_advanced_options](https://qiskit.org/documentation/tutorials/algorithms/02_vqe_advanced_options.html)


### Details and comments
fixes Qiskit/qiskit-tutorials#1403 
Part of Qiskit/qiskit-tutorials#1401
### Summary

This removes the now-unnecessary image file, which needed special
handling in downstream CI (e.g. the `binary.png` file was cloned into
the metapackage repo) to allow the tutorials to build correctly.
Instead, we can just draw the desired effects with LaTeX / MathJax.


### Details and comments

Appearance before:


![binary](https://github.com/Qiskit/qiskit-tutorials/assets/5968590/99b7fbfe-0777-4927-b554-0b95f9f887ca)

Appearance after:

<img width="438" alt="Screenshot 2023-08-08 at 14 41 55"
src="https://github.com/Qiskit/qiskit-tutorials/assets/5968590/e7b07f5e-b1ab-422c-a73a-94fb29d1efcd">
@CLAassistant
Copy link

CLAassistant commented Aug 21, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
17 out of 31 committers have signed the CLA.

✅ divshacker
✅ schulta
✅ a-matsuo
✅ woodsp-ibm
✅ HwajungKang
✅ q-inho
✅ t-imamichi
✅ epelaaez
✅ Eric-Arellano
✅ garrison
✅ 1ucian0
✅ clausia
✅ mtreinish
✅ HuangJunye
✅ Cryoris
✅ ElePT
✅ JGeipel
❌ Dongsin Kim
❌ ljmf00
❌ SooluThomas
❌ manoelmarques
❌ ajavadia
❌ jwoehr
❌ NG-Glen
❌ padraignix
❌ declanmillar
❌ Vanimiaou
❌ wenxh0718
❌ maxwell04-wq
❌ TannerTorrey3
❌ jakelishman


Dongsin Kim seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@woodsp-ibm
Copy link
Member

This ends up with a set of files that were not in #44

@mergify mergify bot mentioned this pull request Aug 22, 2023
@ElePT ElePT force-pushed the add-tutorials-2 branch 2 times, most recently from 8225649 to 41f4f56 Compare August 22, 2023 08:59
Update tutorials content

Quick update of content

Add aer to requirements-dev.txt

Add networkx to requirements-dev.txt

Fix spelling

Recover grover try

pin sphinx

Delete IQPE

Apply review comments

Use short urls

Apply comments from code review

Update tweedledum reqs

Add thumbnails to metadata

Add try-except

Fix gradients tag

Default thumbnail

Update docs/tutorials/02_vqe_advanced_options.ipynb

Co-authored-by: Steve Wood <[email protected]>

Update docs/tutorials/02_vqe_advanced_options.ipynb

Co-authored-by: Steve Wood <[email protected]>

Update docs/tutorials/05_qaoa.ipynb

Co-authored-by: Steve Wood <[email protected]>

Update docs/tutorials/10_pvqd.ipynb

Co-authored-by: Steve Wood <[email protected]>

Apply suggestions

Remove sphinx pin
@ElePT ElePT changed the title Add tutorials (again) Add tutorials (redo) Aug 22, 2023
@ElePT
Copy link
Collaborator Author

ElePT commented Aug 22, 2023

This ends up with a set of files that were not in #44

Should be fixed now

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5936691787

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

Totals Coverage Status
Change from base Build 5929349372: 0.03%
Covered Lines: 6453
Relevant Lines: 7172

💛 - Coveralls

@ElePT ElePT merged commit 9b88737 into qiskit-community:main Aug 22, 2023
13 checks passed
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.