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

Remove unneeded casts #1144

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

mrossinek
Copy link
Member

Summary

This removes some unneeded casts from the operator classes.

Details and comments

Complexity should not pose a real problem any longer because we do not do any explicit down- or up-conversions in the stack any longer. This can be seen since Tensor and PolynomialTensor explicitly allow complex values. I do not recall why I added these casts in the first place, but I think they can simply be removed.

@mrossinek
Copy link
Member Author

mrossinek commented Apr 26, 2023

If approved, should we backport this to stable, too?

EDIT: no, there is no need to do this

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4812686508

  • 4 of 6 (66.67%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 85.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_nature/second_q/operators/spin_op.py 1 2 50.0%
qiskit_nature/second_q/operators/vibrational_op.py 1 2 50.0%
Totals Coverage Status
Change from base Build 4809087501: 0.009%
Covered Lines: 18587
Relevant Lines: 21648

💛 - Coveralls

@mrossinek mrossinek merged commit 655cf65 into qiskit-community:main Apr 26, 2023
@mrossinek mrossinek deleted the remove-unneeded-cast branch April 26, 2023 20:31
Anthony-Gandon pushed a commit to Anthony-Gandon/qiskit-nature that referenced this pull request May 25, 2023
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