Add Hamiltonian simulation with GQSP demo#1815
Open
Mostafa-Atallah2020 wants to merge 11 commits into
Open
Conversation
|
👋 Hey, looks like you've updated some demos! 🐘 Don't forget to update the Please hide this comment once the field(s) are updated. Thanks! |
Your preview is ready 🎉!You can view your changes here
|
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
nobese
reviewed
Jun 23, 2026
drdren
reviewed
Jul 14, 2026
drdren
reviewed
Jul 14, 2026
drdren
reviewed
Jul 14, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
reviewed
Jul 21, 2026
drdren
requested changes
Jul 21, 2026
drdren
left a comment
Contributor
There was a problem hiding this comment.
Hi @Mostafa-Atallah2020 , thanks for this great demo contribution! I completed my review in addition to @nobese 's. Overall, it reads very well and truly shows the reader how to do Hamiltonian simulation with GQSP well. I added a conclusion section, whose skeleton code may still be tweaked, but at least the conclusion mirrored the introduction. Thanks again!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Title:
Hamiltonian simulation with Generalized Quantum Signal Processing
Summary:
The demo implements the time-evolution operator
exp(-iHt)withqml.GQSPin three steps. First it block-encodesHas a qubitization walkW(qml.Qubitization) whose eigenphases are+/- arccos(E/lambda). Then it chooses the polynomial via the Jacobi-Anger expansion, so that a single complex polynomial ofWequalsexp(-iHt)on the walk's eigenphases. Finally it runsqml.GQSPwith angles fromqml.poly_to_angles(..., "GQSP"), undoes the Laurentz^Kshift, and readsexp(-iHt)off the top-left block, verified againstscipy.linalg.expm.Relevant references:
Possible Drawbacks:
The worked example is a small 2-qubit Heisenberg-type Hamiltonian, chosen so the full
exp(-iHt)matrix can be formed and compared directly. The method itself is general; the small size is purely for an exact, fast check. For the same reason the demo reads the evolution from the dense circuit matrix ondefault.qubit, rather than running it as a sampled circuit, which is appropriate for a correctness-focused demo at this scale.Related GitHub Issues:
Closes #1807.
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS: Why are we working on this now?
PennyLane ships
qml.GQSPand a GQSP resource-estimation demo, but there is no executable, end-to-end recipe takingqml.GQSPto its flagship application, Hamiltonian simulation. This demo fills that gap, showing the full runnable pipeline and verifying it against the exact evolution.AUDIENCE: Who is this for?
Graduate students and researchers comfortable with qubitization and QSP basics who want to run GQSP-based Hamiltonian simulation, not just estimate its cost.
KEYWORDS: What words should be included in the marketing post?
GQSP, Generalized Quantum Signal Processing, Hamiltonian simulation, qubitization, quantum signal processing, Jacobi-Anger, block encoding.
Which of the following types of documentation is most similar to your file?
(more details here)