Skip to content

[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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

soranjh
Copy link
Contributor

@soranjh soranjh commented Jun 10, 2025

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 then
    run 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)

  • Tutorial
  • Demo
  • How-to

Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

Copy link
Contributor

@austingmhuang austingmhuang left a 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.

Comment on lines 11 to 12
"dateOfPublication": "2024-12-05T00:00:00+00:00",
"dateOfLastModification": "2024-12-06T00:00:00+00:00",
Copy link
Contributor

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

Comment on lines 36 to 37
# 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
Copy link
Contributor

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?

Comment on lines +14 to +16
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.
Copy link
Contributor

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.

Comment on lines +18 to +26
"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"
}
Copy link
Contributor

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.

Copy link
Contributor

@ddhawan11 ddhawan11 left a 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?

Comment on lines 61 to 63
# 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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

soranjh and others added 5 commits July 3, 2025 09:44
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
h_christiansen = qml.qchem.vibrational.christiansen_hamiltonian(pes,n_states=4)
h_christiansen = qml.qchem.vibrational.christiansen_hamiltonian(pes, n_states=4)

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.

3 participants