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

quantum principal component analysis notebook added #118

Merged
merged 7 commits into from
Nov 17, 2023

Conversation

mlaguna10
Copy link
Contributor

@mlaguna10 mlaguna10 commented Oct 17, 2023

Issue #, if available:

Description of changes:
I'm adding a new notebook under the advance_algorithms folder called 'Quantum Principal Component Analysis'. This notebook is not inteded to scale for a real case of PCA but to show (and teach) how PCA can be implemented for a specific case using quantum computing. I'm adding this PR on this repository following the suggestion made by @licedric (amazon-braket/amazon-braket-examples#402).

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kshyatt-aws
Copy link

Thanks for the PR! I'm not sure if it's just that ReviewNB can't render your LaTeX properly, or whether there are syntax issues in the notebook itself. I had a few copyediting concerns but overall I think this is well on the way there.

@mlaguna10
Copy link
Contributor Author

Hi Katharine! Thanks for your time and effort.

All your feedback was included in the notebook under the new commit (https://github.com/aws-samples/amazon-braket-algorithm-library/pull/118/commits/0161ace169bbe1a5aaf2abb0b131c254ce938e6f).

Apparently it's just that ReviewNB can't render the LaTeX properly, I saw the LaTex correctly on the notebook on Amazon Braket and also on my laptop using VSCode.

Have a great day!

@mlaguna10
Copy link
Contributor Author

mlaguna10 commented Nov 1, 2023

Feedback included. I agree with you about removing the DM1 use since there is not noise in this scenario. About the subroutines or loops inside the circuit I think it's not that easy because there are not exactly the same each pair of instructions because there are always some differential gates between some pair of instructions.

@mlaguna10
Copy link
Contributor Author

I forgot to update the conclusions final part to remove the DM1 use. Done.

@mbeach-aws
Copy link
Contributor

@mlaguna10 Overall, it's looking really good, thanks for this contribution! I left a few minor comments

@mlaguna10
Copy link
Contributor Author

All the new feedback was included. Let me know what you think! :)

mbeach-aws
mbeach-aws previously approved these changes Nov 16, 2023
@AbeCoull
Copy link
Contributor

Tests are failing as the returned results are mocked out.

For example, the grover results are mocked here.
These are used by the test setup mock here.

Let me know if there are any questions around this process!

@mlaguna10
Copy link
Contributor Author

Integ tests for the quantum pca and the results were added in the last commit. Thanks Abe!

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@70542a7). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff            @@
##             main      #118   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?        26           
  Lines           ?      1028           
  Branches        ?       181           
========================================
  Hits            ?      1028           
  Misses          ?         0           
  Partials        ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mbeach-aws mbeach-aws merged commit 7c1287b into amazon-braket:main Nov 17, 2023
11 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.

4 participants