-
Notifications
You must be signed in to change notification settings - Fork 211
[WIP] How to build a vibrational Hamiltonian #1402
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
base: master
Are you sure you want to change the base?
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! |
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
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.
Thanks @soranjh, it is in good shape. Please update the PR description and mark it ready for review (instead of WIP) so that the website can build as well.
"dateOfPublication": "2024-12-05T00:00:00+00:00", | ||
"dateOfLastModification": "2024-12-06T00:00:00+00:00", |
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.
Please update to current date
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
# operators, respectively. There are several ways to construct the potential energy operator which | ||
# lead to different representation of the vibrational Hamiltonian. Here we explain some of these |
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.
There are several ways to construct the potential energy operator which lead to different representation of the vibrational Hamiltonian.
I thought we always construct the PES the same way, just that the Christiansen form uses the PES as-is whereas the Taylor form uses the taylor expansion of the PES?
different representations of vibrational Hamiltonians. We also briefly discuss the implementation of | ||
the Hamiltonian in an interesting quantum algorithm for computing the vibrational dynamics of a | ||
molecule. |
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.
We also briefly discuss the implementation of
the Hamiltonian in an interesting quantum algorithm for computing the vibrational dynamics of a
molecule.
The demo simply constructs the Christiansen and Taylor hamiltonians, but doesn't actually use them in any quantum algorithm to compute the vibrational dynamics.
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.json
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.json
Outdated
Show resolved
Hide resolved
"previewImages": [ | ||
{ | ||
"type": "thumbnail", | ||
"uri": "/_static/demo_thumbnails/regular_demo_thumbnails/thumbnail_how_to_build_spin_hamiltonians.png" | ||
}, | ||
{ | ||
"type": "large_thumbnail", | ||
"uri": "/_static/demo_thumbnails/large_demo_thumbnails/thumbnail_large_how_to_build_spin_hamiltonians.png" | ||
} |
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.
Reminder to update this as well.
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
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.
Thanks @soranjh, Do we also want to add bosonic Hamiltonian here or leave it just at christiansen and Taylor forms?
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
# where :math:`M` represents the number of normal modes and :math:`N` is the number of modals. The | ||
# coefficients :math:`C` represent n-mode integrals which depend on the :math:`n`-mode contribution | ||
# of the potential energy, :math:`V_n`, defined above. |
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.
Should we mention here that for Christiansen Hamiltonian, we truncate the number of bosonic excitations to 2? As for the normal bosonic representation, we can set the number of modals to be higher.
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.
Yes, feel free to add it here and I will merge it.
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
demonstrations/tutorial_how_to_build_vibrational_hamiltonians.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Austin Huang <austin.huang@xanadu.ai> Co-authored-by: Diksha Dhawan <40900030+ddhawan11@users.noreply.github.com>
# that uses the :class:`~.pennylane.qchem.VibrationalPES` object directly and builds the | ||
# Christiansen Hamiltonian in qubit representation. | ||
|
||
h_christiansen = qml.qchem.vibrational.christiansen_hamiltonian(pes,n_states=4) |
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.
h_christiansen = qml.qchem.vibrational.christiansen_hamiltonian(pes,n_states=4) | |
h_christiansen = qml.qchem.vibrational.christiansen_hamiltonian(pes, n_states=4) |
Before submitting
Please complete the following checklist when submitting a PR:
Ensure that your tutorial executes correctly, and conforms to the
guidelines specified in the README.
Remember to do a grammar check of the content you include.
All tutorials conform to
PEP8 standards.
To auto format files, simply
pip install black
, and thenrun
black -l 100 path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Title:
Summary:
Relevant references:
Possible Drawbacks:
Related GitHub Issues:
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
Eg. Promote a new PL feature or show a PL implementation of a recent paper.
AUDIENCE — Who is this for?
Eg. Chemistry researchers, PL educators, beginners in quantum computing.
KEYWORDS — What words should be included in the marketing post?
Which of the following types of documentation is most similar to your file?
(more details here)