Skip to content

QuantumState.to_dict deimals - Correction to issue #14181 #14302

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sbuchholz2
Copy link

Summary

#14181
Corrects the issue whereby QuantumState.to_dict does not respect the decimals input value under some conditions

Details and comments

In essence, there was an issue of computing the rounded values and then not using them in the returned dictionary.

@sbuchholz2 sbuchholz2 requested a review from a team as a code owner May 5, 2025 21:45
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label May 5, 2025
@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

@CLAassistant
Copy link

CLAassistant commented May 5, 2025

CLA assistant check
All committers have signed the CLA.

@ShellyGarion ShellyGarion added mod: quantum info Related to the Quantum Info module (States & Operators) Changelog: Bugfix Include in the "Fixed" section of the changelog labels May 6, 2025
@ShellyGarion
Copy link
Member

@sbuchholz2 - thanks for opening a PR and fixing this bug. could you please add some test? as well as release notes?

@ShellyGarion ShellyGarion changed the title Correction to issue #14181 QuantumState.to_dict deimals - Correction to issue #14181 May 6, 2025
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 mod: quantum info Related to the Quantum Info module (States & Operators)
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

QuantumState.to_dict does not honor decimals input in all cases
4 participants