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

Use Arc::ptr_eq over .is() in SparseObservable #13754

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Jan 29, 2025

Summary

Follow up on #13595: a commit got lost in the final merge, this PR adds it again 🙂

Details

We should compare the inner objects of PySparseObservable, not the observable itself, since in theory multiple PySparseObservables could point to the same inner SparseObservable.

@Cryoris Cryoris added Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository labels Jan 29, 2025
@Cryoris Cryoris requested a review from a team as a code owner January 29, 2025 10:04
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13028907689

Details

  • 20 of 20 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 88.952%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 93.23%
Totals Coverage Status
Change from base Build 13010967771: 0.02%
Covered Lines: 79694
Relevant Lines: 89592

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

I think this is right, and that it's just the missing bits from the merged I bust up on the main merge, thanks.

If there's anything else lurking with the new form, we'll catch/fix it when we add more use of these methods.

@jakelishman jakelishman added this pull request to the merge queue Feb 3, 2025
@jakelishman jakelishman added this to the 2.0.0 milestone Feb 3, 2025
Merged via the queue into Qiskit:main with commit 52ba2a9 Feb 3, 2025
17 of 18 checks passed
@Cryoris Cryoris deleted the eq-by-ptr branch February 3, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants