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

Bosonic logarithmic mapper #1356

Merged
merged 38 commits into from
Apr 18, 2024
Merged

Conversation

ftroisi
Copy link
Collaborator

@ftroisi ftroisi commented Apr 10, 2024

Summary

This MR introduces the Bosonic Logarithmic Mapper, which allows to map the BosonicOp class to the qubit space using binary encoding.
It addresses Issue #1345

Details and comments

See the issue above for more details on the reference papers

@ftroisi ftroisi added the type: feature request New feature or request label Apr 10, 2024
@ftroisi ftroisi self-assigned this Apr 10, 2024
@coveralls
Copy link

coveralls commented Apr 11, 2024

Pull Request Test Coverage Report for Build 8735231706

Details

  • 59 of 64 (92.19%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 86.949%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_nature/second_q/mappers/bosonic_linear_mapper.py 0 1 0.0%
qiskit_nature/second_q/mappers/bosonic_logarithmic_mapper.py 58 62 93.55%
Totals Coverage Status
Change from base Build 8721629367: 0.04%
Covered Lines: 9027
Relevant Lines: 10382

💛 - Coveralls

Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

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

I focused on design and docs in this review and did not check the derivations or math.

I left some comments and once addressed this will fit nicely with the other mappers.

@mrossinek mrossinek linked an issue Apr 12, 2024 that may be closed by this pull request
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

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

Some phrasing and one more refactoring idea

@ftroisi ftroisi force-pushed the bosonic_log_mapper branch from 679f60e to 5004530 Compare April 17, 2024 11:50
@mrossinek mrossinek self-requested a review April 17, 2024 13:43
Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

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

Okay, last round. I took a look at the rendered docs and found some more things that need fixing. See comments below.

Finally, I found this one odd break statement which we should address. After that this is ready to go 👍

Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

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

Thanks! A minor detail to comment on but that's it 🙂

I was wondering whether we should highlight the new ValueError in the release note, but I honestly don't think it is necessary.

Copy link
Member

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @ftroisi! Great work 👍

@mrossinek mrossinek merged commit 3221b5c into qiskit-community:main Apr 18, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logarithmic mapper for BosonicOp
3 participants