Skip to content

Conversation

@RajdeepAher
Copy link

@RajdeepAher RajdeepAher commented Dec 9, 2025

@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Dec 9, 2025
@CLAassistant
Copy link

CLAassistant commented Dec 9, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

This approach looks good, thanks for the contribution @RajdeepAher. I left some comments below. Could you also add a test (e.g. based on the reported issue) and a release note documenting the fix?

@coveralls
Copy link

coveralls commented Dec 9, 2025

Pull Request Test Coverage Report for Build 20265992221

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1622 unchanged lines in 31 files lost coverage.
  • Overall coverage decreased (-0.05%) to 88.27%

Files with Coverage Reduction New Missed Lines %
crates/cext/src/transpiler/passes/unitary_synthesis.rs 1 89.08%
crates/circuit/src/parameter/symbol_expr.rs 1 72.9%
crates/transpiler/src/passes/unitary_synthesis.rs 1 93.32%
qiskit/qasm2/export.py 1 98.65%
crates/circuit/src/converters.rs 3 96.0%
crates/transpiler/src/transpiler.rs 3 93.39%
crates/qasm2/src/lex.rs 5 91.0%
qiskit/transpiler/preset_passmanagers/common.py 5 84.69%
crates/qasm2/src/parse.rs 6 95.68%
crates/circuit/src/lib.rs 7 94.62%
Totals Coverage Status
Change from base Build 20038976332: -0.05%
Covered Lines: 96604
Relevant Lines: 109442

💛 - Coveralls

@Cryoris Cryoris added Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable labels Dec 9, 2025
@RajdeepAher RajdeepAher marked this pull request as ready for review December 14, 2025 12:50
@RajdeepAher RajdeepAher requested a review from a team as a code owner December 14, 2025 12:50
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

Copy link
Collaborator

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

One small comment and then I think formatting is not quite right yet -- otherwise LGTM

@Cryoris Cryoris changed the title fix: from_sparse_list of SparsePauliOp Automatically determine coeffs type in SparsePauliOp.from_sparse_list Dec 15, 2025
Copy link
Member

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. As you have already mentioned somewhere, can you please check if we have the same problem with from_list and provide a similar fix (including tests). You should also add a release note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Bugfix Include in the "Fixed" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo 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.

SparsePauliOp.from_sparse_list should handle parameterized coefficients

6 participants