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

Replace PauliSumOp with SparsePauliOp #1050

Merged
merged 4 commits into from
Feb 22, 2023

Conversation

manoelmarques
Copy link
Contributor

Summary

Fixes #1020

Details and comments

@mrossinek
Copy link
Member

It will be easiest to deal with this after #1044 is merged

@mrossinek mrossinek added the on hold Can not fix yet label Feb 3, 2023
@mrossinek mrossinek removed the on hold Can not fix yet label Feb 9, 2023
@mrossinek mrossinek force-pushed the pauli branch 5 times, most recently from a2233b9 to 5df155f Compare February 9, 2023 13:39
@coveralls
Copy link

coveralls commented Feb 9, 2023

Pull Request Test Coverage Report for Build 4244341662

  • 148 of 163 (90.8%) changed or added relevant lines in 24 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 85.948%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_nature/deprecation.py 15 16 93.75%
qiskit_nature/second_q/algorithms/excited_states_solvers/qeom.py 3 4 75.0%
qiskit_nature/second_q/mappers/tapered_qubit_mapper.py 13 14 92.86%
qiskit_nature/second_q/algorithms/excited_states_solvers/excited_states_eigensolver.py 2 4 50.0%
qiskit_nature/settings.py 13 17 76.47%
qiskit_nature/second_q/algorithms/excited_states_solvers/qeom_electronic_ops_builder.py 5 11 45.45%
Totals Coverage Status
Change from base Build 4244333195: 0.03%
Covered Lines: 18049
Relevant Lines: 21000

💛 - Coveralls

@mrossinek mrossinek marked this pull request as ready for review February 9, 2023 15:22
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 initial comments (I need to do a more thorough review later).
Also some observations:

  • we need to add a release note
  • we should check for any more usage of opflow in the unittests and replace it wherever possible

@mrossinek
Copy link
Member

I have applied the following updates to this PR:

  • removed the QubitOperator alias in favor of being explicit everywhere (in doing so I also removed the BaseOperator type hint which was inconsistently used and thus not really supported (and especially not tested; does this warrant mention in the release note?)
  • I updated type hints to the "future-style" in files touched by this PR
  • all usage of PauliSumOp is now explicitly findable by grepping for PauliSumOp. It is merely used for type hints and otherwise all "real logic" uses SparsePauliOp now
  • deprecation messages for PauliSumOp usage are in place thanks to @manoelmarques 👍

@mergify mergify bot merged commit ae78e2c into qiskit-community:main Feb 22, 2023
Anthony-Gandon pushed a commit to Anthony-Gandon/qiskit-nature that referenced this pull request May 25, 2023
* Replace PauliSumOp with SparsePauliOp

* Update releasenotes/notes/paulisumop-replace-d1ae54d1854b301b.yaml

Co-authored-by: Steve Wood <[email protected]>

* Adds warn_deprecated_type utility

---------

Co-authored-by: Max Rossmannek <[email protected]>
Co-authored-by: Steve Wood <[email protected]>
Co-authored-by: Max Rossmannek <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace PauliSumOp with SparsePauliOp
4 participants