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

Add a unit test of qubit-wise grouping of SparsePauliOp #10598

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

t-imamichi
Copy link
Member

@t-imamichi t-imamichi commented Aug 10, 2023

Summary

The unit test test_group_commuting of SparsePauliOp does not check SparsePauliOp.group_commuting(qubit_wise=True)
https://github.com/Qiskit/qiskit-terra/blob/df2ddcadf3c6d59b8bab8b0b1ceff14234fa82b5/test/python/quantum_info/operators/symplectic/test_sparse_pauli_op.py#L947-L947

On the other hand, the unit tests of PauliList cover grouping of qubit-wise commuting.
https://github.com/Qiskit/qiskit-terra/blob/966aab1bb624cb45f8de77d305f5407d94dbd82d/test/python/quantum_info/operators/symplectic/test_pauli_list.py#L2096

This PR adds a unit test of SparsePauliOp.group_commuting(qubit_wise=True).

Details and comments

@t-imamichi t-imamichi added mod: quantum info Related to the Quantum Info module (States & Operators) Changelog: None Do not include in changelog labels Aug 10, 2023
@t-imamichi t-imamichi requested review from ikkoham and a team as code owners August 10, 2023 04:06
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core
  • @ikkoham

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5816819492

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.238%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 90.38%
crates/qasm2/src/parse.rs 18 96.67%
Totals Coverage Status
Change from base Build 5812842422: -0.02%
Covered Lines: 74243
Relevant Lines: 85104

💛 - Coveralls

Copy link
Contributor

@ikkoham ikkoham left a comment

Choose a reason for hiding this comment

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

Thanks. Nice catch.

@ikkoham ikkoham added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Aug 10, 2023
@ikkoham ikkoham added this pull request to the merge queue Aug 10, 2023
Merged via the queue into Qiskit:main with commit 45e6f7f Aug 10, 2023
mergify bot pushed a commit that referenced this pull request Aug 10, 2023
@t-imamichi t-imamichi deleted the qw-commuting branch August 10, 2023 09:48
github-merge-queue bot pushed a commit that referenced this pull request Aug 10, 2023
(cherry picked from commit 45e6f7f)

Co-authored-by: Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
SamD-1998 pushed a commit to SamD-1998/qiskit-terra that referenced this pull request Sep 7, 2023
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 mod: quantum info Related to the Quantum Info module (States & Operators) stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants