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

Add molecular_dipole function #5764

Merged
merged 40 commits into from
Jun 7, 2024
Merged

Add molecular_dipole function #5764

merged 40 commits into from
Jun 7, 2024

Conversation

ddhawan11
Copy link
Contributor

Context:
Add molecular_dipole function to calculate dipole moment operator in Pauli basis.

Description of the Change:
molecular_dipole function is analogous to molecular_hamiltonian function to calculate dipole moment operator with openfermion and dhf backends

Benefits:

Possible Drawbacks:

Related GitHub Issues:

ddhawan11 and others added 11 commits May 3, 2024 09:32
**Context:**

**Description of the Change:**
Molecule is the central object for molecular_hamiltonian function

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: soranjh <soran.jahangiri@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
…function (#5694)

**Context:**
Support Angstrom units along with Bohr

**Description of the Change:**
Molecule class and molecular_hamiltonian function now works with both
Bohr and Angstrom units.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: soranjh <soran.jahangiri@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
**Context:**
Changes openshell warnings.

**Description of the Change:**
Changed openshell warnings to work with new molecular_hamiltonian
function

**Benefits:**
molecular_hamiltonian function works with openshell molecules when
method is pyscf

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: soranjh <soran.jahangiri@gmail.com>
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
**Context:**
added different mappings to molecular_hamiltonian function

**Description of the Change:**
molecular Hamiltonian can be mapped using different mapping schemes.

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**

---------

Co-authored-by: soranjh <soran.jahangiri@gmail.com>
@ddhawan11
Copy link
Contributor Author

[sc-62858]

@ddhawan11 ddhawan11 changed the title Add molecular_dipole function [WIP] Add molecular_dipole function May 29, 2024
@ddhawan11 ddhawan11 changed the title [WIP] Add molecular_dipole function Add molecular_dipole function May 30, 2024
@ddhawan11 ddhawan11 marked this pull request as ready for review May 30, 2024 13:35
@ddhawan11 ddhawan11 requested review from soranjh and obliviateandsurrender and removed request for soranjh May 30, 2024 13:36
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

Thanks @ddhawan11, leaving the first round of comments!

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
tests/qchem/of_tests/test_molecular_dipole.py Show resolved Hide resolved
ddhawan11 and others added 4 commits June 3, 2024 09:57
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
ddhawan11 and others added 3 commits June 3, 2024 10:04
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (7f0c9d6) to head (5b364d2).
Report is 248 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5764      +/-   ##
==========================================
- Coverage   99.66%   99.66%   -0.01%     
==========================================
  Files         415      415              
  Lines       39668    39407     -261     
==========================================
- Hits        39537    39274     -263     
- Misses        131      133       +2     

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

Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @ddhawan11, this looks great. Please address my minor comments/questions and I will approve.

pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
tests/qchem/of_tests/test_molecular_dipole.py Show resolved Hide resolved
tests/qchem/of_tests/test_molecular_dipole.py Show resolved Hide resolved
tests/qchem/of_tests/test_molecular_dipole.py Show resolved Hide resolved
pennylane/qchem/dipole.py Outdated Show resolved Hide resolved
pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @ddhawan11, looks good to go.

Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

Thanks @ddhawan11! Good to go once the final comment is resolved!

pennylane/qchem/openfermion_obs.py Outdated Show resolved Hide resolved
ddhawan11 and others added 2 commits June 6, 2024 10:02
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
doc/code/qml_qchem.rst Show resolved Hide resolved
doc/code/qml_qchem.rst Outdated Show resolved Hide resolved
@ddhawan11 ddhawan11 merged commit c787279 into master Jun 7, 2024
40 checks passed
@ddhawan11 ddhawan11 deleted the molecular_dipole branch June 7, 2024 11:18
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