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

Combine impl CircuitData blocks #13336

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

mtreinish
Copy link
Member

Summary

The CircuitData struct had two impl CircuitData blocks, one before the pymethods and the other after. While there is nothing wrong with doing this it is a bit confusing because the difference between the blocks is not clear. I expect this was caused by the size of the file and people missed that it already existed and we ended up with duplicates. This commit recombines the two blocks, opting to use the one after the pymethods as it was larger.

Details and comments

@mtreinish mtreinish added Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository labels Oct 16, 2024
@mtreinish mtreinish requested a review from a team as a code owner October 16, 2024 17:31
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

The `CircuitData` struct had two `impl CircuitData` blocks, one before the
pymethods and the other after. While there is nothing wrong with doing
this it is a bit confusing because the difference between the blocks is
not clear. I expect this was caused by the size of the file and people
missed that it already existed and we ended up with duplicates. This
commit recombines the two blocks, opting to use the one after the
pymethods as it was larger.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11370831416

Details

  • 247 of 256 (96.48%) changed or added relevant lines in 1 file are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.003%) to 88.661%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/circuit/src/circuit_data.rs 247 256 96.48%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 3 92.23%
crates/qasm2/src/parse.rs 6 97.15%
Totals Coverage Status
Change from base Build 11361871212: 0.003%
Covered Lines: 73188
Relevant Lines: 82548

💛 - Coveralls

Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

This makes sense to me, I assume the multiple impl were more contextual to group similar functions together. This just feels a bit more organized, so thank you for this 🚀

@raynelfss raynelfss added this pull request to the merge queue Oct 16, 2024
Merged via the queue into Qiskit:main with commit 5517150 Oct 16, 2024
15 checks passed
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