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

Fix for a bug inside of christiansen_integrals_dipole #6870

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

austingmhuang
Copy link
Contributor

@austingmhuang austingmhuang commented Jan 21, 2025

Context:
If there isn't a two/three-mode dipole, we shouldn't be computing the integral coefficients.

Description of the Change:
It should just check that the dipole_level is greater than the minimum needed. The localization is irrelevant.

Benefits:
Now you can compute one-mode/two-mode integral coefficients without a random error.

Possible Drawbacks:
None

Related Github Issues:
None

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@soranjh
Copy link
Contributor

soranjh commented Jan 21, 2025

Please add a test that catches the bug.

@austingmhuang austingmhuang requested review from ddhawan11, soranjh and obliviateandsurrender and removed request for ddhawan11 January 21, 2025 21:31
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (58d4f4f) to head (aeac90f).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6870      +/-   ##
==========================================
- Coverage   99.59%   99.59%   -0.01%     
==========================================
  Files         478      478              
  Lines       45295    45293       -2     
==========================================
- Hits        45113    45111       -2     
  Misses        182      182              

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

@@ -142,6 +142,9 @@
* `BasisState` now casts its input to integers.
[(#6844)](https://github.com/PennyLaneAI/pennylane/pull/6844)

* Fixed a bug in `qml.labs.vibrational.christiansen_integrals_dipole` that caused one-mode and two-mode dipole operators to be computed incorrectly.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to go into the labs changelog? Also maybe it is already known but the qml.labs.vibrational is not accessible.

Copy link
Contributor

Choose a reason for hiding this comment

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

There will be a PR to fix the labs vibrational docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me move it into the labs changelog. I forgot that this was not in qchem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @DSGuala where lab section 🐱

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's have the sections like this:

New features since last release

Labs 🧪

Improvements 🛠

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.

5 participants