Skip to content

docs(notebooks): add QNN tutorial#25

Open
MeltemTolunay wants to merge 9 commits intomainfrom
qnn
Open

docs(notebooks): add QNN tutorial#25
MeltemTolunay wants to merge 9 commits intomainfrom
qnn

Conversation

@MeltemTolunay
Copy link
Contributor

Summary

QNN training tutorial with QCNN ansatz

Details and comments

@coveralls
Copy link

coveralls commented Mar 27, 2024

Pull Request Test Coverage Report for Build 9346411820

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 remained the same at 100.0%

Totals Coverage Status
Change from base Build 8708380490: 0.0%
Covered Lines: 290
Relevant Lines: 290

💛 - Coveralls

@pedrorrivero pedrorrivero changed the title add QNN tutorial docs(notebooks): add QNN tutorial Mar 27, 2024
@pedrorrivero pedrorrivero added PL-3 Priority level 3/5 → Medium notebook Notebook improvements or additions labels Mar 27, 2024
@miamico
Copy link
Contributor

miamico commented Mar 27, 2024

Very quick comment, let's move the notebook to the docs/notebooks folder

@miamico
Copy link
Contributor

miamico commented Apr 4, 2024

Other comments to address to make this in shape for a PR:

  • Try adding SPSA instead of COBYLA. The vanilla implementation is quite contained so it could be included in the notebook
  • Recast the notebook into the Qiskit Patterns framework (1. specify the classical problem and the quantum way to solve it, 2. optimize it for the hardware 3. execute, 4.post-process)
  • Add more details explaining what is happening in each cell, right now the explanations are very bare-bone

@pedrorrivero pedrorrivero force-pushed the main branch 5 times, most recently from 1862cef to 9e192c7 Compare April 8, 2024 23:07
@pedrorrivero pedrorrivero force-pushed the main branch 2 times, most recently from 10f2ad2 to 5583a99 Compare April 16, 2024 15:30
@MeltemTolunay MeltemTolunay marked this pull request as ready for review April 29, 2024 03:27
@MeltemTolunay
Copy link
Contributor Author

I now added a gradient function with parameter shift rule, qiskit patterns formalism, code to run on hardware and more text explaining the code.

@MeltemTolunay
Copy link
Contributor Author

MeltemTolunay commented Jun 3, 2024

New changes include:

  • ParameterVectorElements are ordered alphabetically. FeatureMap parameters now have a new parameter_prefix='a' to ensure that input and weight parameters are assigned in correct order.
  • Parameter shift rule for computing the gradients are verified.
  • Added a new function to compute the gradient of the MSE loss with respect to weight parameters.
  • Added new optimizer options. We can now select from a collection of gradient-free optimizers, gradient-based optimizers and SPSA.

In addition, Mirko's previous comments regarding SPSA, Qiskit Patterns framework, and cell explanations are fully addressed.

@CLAassistant
Copy link

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.
0 out of 2 committers have signed the CLA.

❌ Meltem Tolunay
❌ MeltemTolunay


Meltem Tolunay 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notebook Notebook improvements or additions PL-3 Priority level 3/5 → Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants