-
Notifications
You must be signed in to change notification settings - Fork 194
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
Demo about implementing Shor's algorithm with Catalyst #1010
Open
glassnotes
wants to merge
54
commits into
master
Choose a base branch
from
shortalyst
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
58be460
Outlining Shor x Catalyst demo
746b48b
fix some formatting
ca74504
Update first sections of demo
glassnotes cb22759
Start discussion about JIT compilation
glassnotes 8d870af
Merge branch 'master' into shortalyst
glassnotes 8cba49a
Merge branch 'master' into shortalyst
glassnotes acff510
Start restructing demo.
glassnotes b1b2dab
Start explaining circuits and add some diagrams.
glassnotes f9191f2
Added the bulk of the explanation about the quantum circuits plus ass…
glassnotes e4f5b71
Fix missing brackets on images. Revert unintended changes to Haar demo
glassnotes 6d8fd85
Merge branch 'master' into shortalyst
glassnotes acf8625
Fix typo. Shrink width of a few figures.
glassnotes d100a02
Expand on circuit implementation; new text and many diagrams (almost …
glassnotes 9611e27
Add figures for one-qubit QPE. Update some other figures and text.
glassnotes 328a309
Finish section about circuits, minus minor updates to graphics.
glassnotes cfaa568
Fix rendering issue
glassnotes 47f97c3
Update many graphics; add meta graphic.
glassnotes 07a3aed
Update demo text in circuit section.
glassnotes b9054f8
Finish circuits section.
glassnotes d0e6394
Merge branch 'master' into shortalyst
glassnotes d0578ac
Update graphics.
glassnotes ead6894
Update combined graphic
glassnotes 10859d1
Update combined graphic
glassnotes a329cc8
Start adding code into demo.
glassnotes f99ca41
Update some figures to remove superfluous QFTs
glassnotes 481fe11
Minor changes to demo text
glassnotes 7f8a0cd
Merge branch 'master' into shortalyst
glassnotes 109f595
Fix error in circuit diagram and description.
glassnotes 6452838
Update description with new optimizations
glassnotes a6456fd
Finish describing initial controlled bit-wise optimization.
glassnotes 8ff118c
Add additional classical-computed optimization for the doubly-control…
glassnotes b6bef7b
Fix condition in image
glassnotes a44625e
Merge branch 'master' into shortalyst
glassnotes 116216b
Merge branch 'master' into shortalyst
glassnotes 8ec784c
Add some code for helpers
glassnotes 704c0c4
Merge branch 'master' into shortalyst
glassnotes 4015a84
Finalizing figures and modifying text
glassnotes d214fbb
Add updated code
glassnotes 1140530
Run black and remove some comments from the code
glassnotes 18710e0
Add output to demo code so that we can build it.
glassnotes ed40c18
Update demonstrations/tutorial_shor_catalyst.py
josh146 cb3d9d1
Add JIT timing
glassnotes 61b7a9e
Merge branch 'shortalyst' of github.com:PennyLaneAI/qml into shortalyst
glassnotes e294f8a
Add metadata file
glassnotes 09a28a1
Fix plot for full build
glassnotes 08c02cf
Update code for plotting. Start restructuring the introduction about …
glassnotes a43ae4d
Run black
glassnotes e5202d4
Intermediate commit while switching computers; more restructuring.
glassnotes 554a8fe
Update main text. Conclusion to come
glassnotes 8b1dcc7
Initial conclusions
glassnotes 4f09930
Update metadata
glassnotes a90c1ff
First draft!
glassnotes b07d2d2
Update metadata file
glassnotes 937edb2
Revert unintentional changes to haar demo
glassnotes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3,585 changes: 3,585 additions & 0 deletions
3,585
_static/demonstration_assets/shor_catalyst/c-ua-basis-states-optimization.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,454 changes: 2,454 additions & 0 deletions
2,454
_static/demonstration_assets/shor_catalyst/c-ua.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,028 changes: 2,028 additions & 0 deletions
2,028
_static/demonstration_assets/shor_catalyst/compilation-stack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74.3 KB
_static/demonstration_assets/shor_catalyst/compilation_comparison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,037 changes: 3,037 additions & 0 deletions
3,037
...emonstration_assets/shor_catalyst/doubly-controlled-adder-simplified-states.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,683 changes: 2,683 additions & 0 deletions
2,683
_static/demonstration_assets/shor_catalyst/doubly-controlled-adder-simplified.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,740 changes: 2,740 additions & 0 deletions
2,740
...ration_assets/shor_catalyst/doubly-controlled-adder-with-control-not-on-qft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,680 changes: 2,680 additions & 0 deletions
2,680
...tic/demonstration_assets/shor_catalyst/doubly-controlled-adder-with-control.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,627 changes: 2,627 additions & 0 deletions
2,627
_static/demonstration_assets/shor_catalyst/doubly-controlled-adder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,694 changes: 2,694 additions & 0 deletions
2,694
_static/demonstration_assets/shor_catalyst/fourier_adder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,029 changes: 2,029 additions & 0 deletions
2,029
_static/demonstration_assets/shor_catalyst/fourier_adder_adjoint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4,291 changes: 4,291 additions & 0 deletions
4,291
_static/demonstration_assets/shor_catalyst/fourier_adder_explanation-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,885 changes: 5,885 additions & 0 deletions
5,885
_static/demonstration_assets/shor_catalyst/fourier_adder_explanation-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4,583 changes: 4,583 additions & 0 deletions
4,583
_static/demonstration_assets/shor_catalyst/fourier_adder_explanation-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,813 changes: 3,813 additions & 0 deletions
3,813
_static/demonstration_assets/shor_catalyst/fourier_adder_explanation-4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4,241 changes: 4,241 additions & 0 deletions
4,241
_static/demonstration_assets/shor_catalyst/fourier_adder_explanation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,739 changes: 3,739 additions & 0 deletions
3,739
_static/demonstration_assets/shor_catalyst/fourier_adder_modulo_n.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,003 changes: 3,003 additions & 0 deletions
3,003
_static/demonstration_assets/shor_catalyst/fourier_adder_modulo_n_mcm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,951 changes: 3,951 additions & 0 deletions
3,951
_static/demonstration_assets/shor_catalyst/fourier_adder_modulo_n_streamlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,029 changes: 1,029 additions & 0 deletions
1,029
_static/demonstration_assets/shor_catalyst/qpe_full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,318 changes: 5,318 additions & 0 deletions
5,318
_static/demonstration_assets/shor_catalyst/qpe_full_combined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,577 changes: 3,577 additions & 0 deletions
3,577
_static/demonstration_assets/shor_catalyst/qpe_full_combined_multi_est_wires.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,559 changes: 1,559 additions & 0 deletions
1,559
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,306 changes: 2,306 additions & 0 deletions
2,306
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,352 changes: 2,352 additions & 0 deletions
2,352
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,360 changes: 2,360 additions & 0 deletions
2,360
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-4.svg
Large diffs are not rendered by default.
Oops, something went wrong.
2,522 changes: 2,522 additions & 0 deletions
2,522
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-5.svg
Large diffs are not rendered by default.
Oops, something went wrong.
2,685 changes: 2,685 additions & 0 deletions
2,685
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-6.svg
Large diffs are not rendered by default.
Oops, something went wrong.
2,407 changes: 2,407 additions & 0 deletions
2,407
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft-7.svg
Large diffs are not rendered by default.
Oops, something went wrong.
2,250 changes: 2,250 additions & 0 deletions
2,250
_static/demonstration_assets/shor_catalyst/qpe_full_modified_power_with_qft.svg
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"title": "JIT compiling Shor's algorithm with PennyLane and Catalyst", | ||
"authors": [ | ||
{ | ||
"username": "glassnotes" | ||
} | ||
], | ||
"dateOfPublication": "2025-03-01T00:00:00+00:00", | ||
"dateOfLastModification": "2025-03-01T00:00:00+00:00", | ||
"categories": [ | ||
"Quantum Computing" | ||
], | ||
"tags": [], | ||
"previewImages": [ | ||
{ | ||
"type": "thumbnail", | ||
"uri": "/_static/demo_thumbnails/regular_demo_thumbnails/thumbnail_variationally_quantum_linear_solver.png" | ||
} | ||
], | ||
"seoDescription": "JIT compile Shor's algorithm from end-to-end with PennyLane and Catalyst.", | ||
"doi": "", | ||
"references": [ | ||
{ | ||
"id": "Shor1997", | ||
"type": "article", | ||
"title": "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer", | ||
"authors": "Peter W. Shor", | ||
"year": "1997", | ||
"journal": "SIAM Journal on Computing Vol. 26, Iss. 5", | ||
"doi": "10.1137/S0097539795293172", | ||
"url": "https://doi.org/10.1137/S0097539795293172" | ||
}, | ||
{ | ||
"id": "PurpleDragonBook", | ||
"type": "book", | ||
"title": "Compilers: Principles, Techniques, And Tools", | ||
"authors": "Alfred V Aho, Monica S Lam, Ravi Sethi, Jeffrey D Ullman", | ||
"year": "2007", | ||
"publisher": "Pearson", | ||
"url": "https://www.pearson.com/en-us/subject-catalog/p/compilers-principles-techniques-and-tools/P200000003472/9780133002140" | ||
}, | ||
{ | ||
"id": "Beauregard2003", | ||
"type": "article", | ||
"title": "Circuit for Shor's algorithm using 2n+3 qubits", | ||
"authors": "Stephane Beauregard", | ||
"year": "2003", | ||
"journal": "Quantum Info. Comput.", | ||
"doi": "10.5555/2011517.2011525", | ||
"url": "https://dl.acm.org/doi/10.5555/2011517.2011525" | ||
}, | ||
{ | ||
"id": "Draper2000", | ||
"type": "preprint", | ||
"title": "Addition on a Quantum Computer", | ||
"authors": "Thomas G. Draper", | ||
"year": "2000", | ||
"journal": "", | ||
"doi": "10.48550/arXiv.quant-ph/0008033", | ||
"url": "https://doi.org/10.48550/arXiv.quant-ph/0008033" | ||
} | ||
], | ||
"basedOnPapers": [ | ||
], | ||
"referencedByPapers": [], | ||
"relatedContent": [ | ||
{ | ||
"type": "demonstration", | ||
"id": "tutorial_jax_transformations", | ||
"weight": 1.0 | ||
}, | ||
{ | ||
"type": "demonstration", | ||
"id": "tutorial_qjit_compile_grovers_algorithm_with_catalyst", | ||
"weight": 1.0 | ||
}, | ||
{ | ||
"type": "demonstration", | ||
"id": "tutorial_how_to_quantum_just_in_time_compile_vqe_catalyst", | ||
"weight": 1.0 | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just grabbed the thumbnail of another demo for now; many we can use a picture of one of the circuits, or a stylized picture of "N = p q" and a circuit?