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

History-preserving move from qiskit-tutorials/algorithms to qiskit_algorithms/tutorials #39

Conversation

robotAstray
Copy link

Summary

This PR aims to resolve part of the issue #14, to be specific the first step (i.e. history preserving migration of qiskit-tutorials 's ./tutorials/algorithms folder).

Details and comments

  • The git history preserving method was used to migrate the content of qiskit-tutorials\algorithms into qiskit-algorithms\docs\tutorials
  • Since the initial repo already had 01_introduction.ipynb I made sure that the file is included with the previous changes
  • Tutorial 09_IQPE.ipynb was removed since it does not contain any reference to qiskit-algorithms

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 <nonhermitian@gmail.com>
* 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 <manoel.marques@ibm.com>
Co-authored-by: Paul Nation <nonhermitian@gmail.com>
### Summary
Fix issue #1095 

### Details and comments
Delete the wrong and meaningless part of the sentence ". which it has to do the same thing".
* 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 (#1163)

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

* Fix math mode and list of Grover tutorial

Co-authored-by: SooluThomas <soolu.elto@gmail.com>
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
Co-authored-by: SooluThomas <soolu.elto@gmail.com>
qbuits -> qubits
inizialize -> initialize
quntum -> quantum
x-measurment -> x-measurement
Fix a few typos "previous", "need" (twice), "measurement" (twice)
Co-authored-by: SooluThomas <soolu.elto@gmail.com>
Co-authored-by: SooluThomas <soolu.elto@gmail.com>
* replace execute with transpile + backend.run

* Update tutorials/circuits_advanced/02_operators_overview.ipynb

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Update math expression in order for Sphinx correctly interprets it
complactly -> compactly
JGeipel and others added 13 commits July 11, 2023 14:57
<!--
⚠️ 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 #1410
Part of #1401

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Eric Arellano <ericarellano@me.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/06_grover](https://qiskit.org/documentation/tutorials/algorithms/06_grover.html)

### Details and comments
fixes #1407
Part of #1401

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@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 the tutorial
[02_vqe_advanced_options](https://qiskit.org/documentation/tutorials/algorithms/02_vqe_advanced_options.html)


### Details and comments
fixes #1403 
Part of #1401
### Summary
This PR will Improve
[03_vqe_simulation_with_noise](https://qiskit.org/documentation/tutorials/algorithms/03_vqe_simulation_with_noise.html)


### Details and comments
fixes #1404 
Part of #1401
### Summary
This PR will improve the tutorial
[01_algorithms_introduction](https://qiskit.org/documentation/tutorials/algorithms/01_algorithms_introduction.html)



### Details and comments
fixes #1402 
Part of #1401
…into history-preserving-algo-tutorials-feature
This tutorial does not contain any reference to qiskit-algorithm library
reverting to the existing file from fork ( upstream repo)
@CLAassistant
Copy link

CLAassistant commented Aug 7, 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.
18 out of 31 committers have signed the CLA.

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


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.

@robotAstray robotAstray marked this pull request as ready for review August 7, 2023 20:46
@robotAstray robotAstray marked this pull request as draft August 7, 2023 20:52
@woodsp-ibm
Copy link
Member

woodsp-ibm commented Aug 7, 2023

I might need to fix the last 3-5 commits

Having one or two extra commits is probably ok, but whatever they are will end up getting kept since we want the complete commit history. As far as the 01 tutorial I guess I was expecting to override what was already here so we got the history. Taking the original it would need fixing up again, but the others all need fixing too and it all could be done in a follow up. As I mentioned it was just quickly copied over here so we could have CI up an running with the docs.

@robotAstray
Copy link
Author

I might need to fix the last 3-5 commits

Having one or two extra commits is probably ok, but whatever they are will end up getting kept since we want the coomplete commit history. As far as the 01 tutorial I guess I was expecting to override what was already here so we got the history. Taking the original it would need fixing up again, but the others all need fixing too and it all could be done in a follow up. As I mentioned it was just quickly copied over here so we could have CI up an running with the docs.

Hello @woodsp-ibm, thank you for your feedback, it is really helpful.

I see now the mistake. Just to confirm, would you like me to leave it as it is for this time?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5789709778

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.994%

Totals Coverage Status
Change from base Build 5692627482: 0.0%
Covered Lines: 6395
Relevant Lines: 7106

💛 - Coveralls

@robotAstray robotAstray marked this pull request as ready for review August 8, 2023 09:39
@robotAstray
Copy link
Author

I can see the error is No module named 'qiskit_aer' I can add

qiskit-aer >= 0.12.2

in the requirements.txt file if you are happy with that, and I think that should resolve the matter.

@woodsp-ibm
Copy link
Member

qiskit_aer would be added to requirements-dev.txt (not requirements) That is extra installs needed for development, like building/running the tutorials. Requirements is just what is needed as dependents for when you install/run qiskit_algorithms and no code is dependent on that. As a user you may want to use it - e.g. like the tutorials do, but for the base code its not needed for it to run/work at all. Of course adding this here adds another commit...

For me there are a couple of things.

  1. As I explained the one tutorial was copied here with a view to fixing it correctly when the rest were brought over so what we had there was the version with history. Yes it would need fixing up again like all the rest will need fixing in terms of their imports etc. but that would be a next step,
  2. As I also mentioned the references to the issue/PR numbers all really need fixing up. If you look back at the history here of the main code you will see commits brought over point back to original repo where the issue/PR so you can click on it and get the information (compare that to the history you have where its unaltered).

@robotAstray robotAstray marked this pull request as draft August 8, 2023 14:04
@robotAstray robotAstray deleted the history-preserving-algo-tutorials-feature branch August 21, 2023 14:01
@woodsp-ibm
Copy link
Member

@robotAstray Thanks for giving this a shot though!

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