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

Python state dumps shown in arbitrary order #1119

Closed
swernli opened this issue Feb 5, 2024 · 0 comments · Fixed by #1122
Closed

Python state dumps shown in arbitrary order #1119

swernli opened this issue Feb 5, 2024 · 0 comments · Fixed by #1122
Assignees
Labels
bug Something isn't working

Comments

@swernli
Copy link
Collaborator

swernli commented Feb 5, 2024

Because we take the vector returned from the internal state dump code and turn it into a hashmap for easier access at the Python layer, we end up losing the sequential ordering for dumped states. We should allow hashmap access for the returned data structure but enforce an ordering on the display.

@swernli swernli added the bug Something isn't working label Feb 5, 2024
@swernli swernli self-assigned this Feb 5, 2024
swernli added a commit that referenced this issue Feb 5, 2024
This change uses the vector returned from the internals directly rather than converting into a hashmap so that the state ordering can be preserved for display.

Fixes #1119
github-merge-queue bot pushed a commit that referenced this issue Feb 6, 2024
This change uses the vector returned from the internals directly rather
than converting into a hashmap so that the state ordering can be
preserved for display.

Fixes #1119

Before:

![image](https://github.com/microsoft/qsharp/assets/10567287/4ff3d4d1-021b-4b27-b797-266312cc13cc)

After:

![image](https://github.com/microsoft/qsharp/assets/10567287/eff67e4e-a756-45e3-b246-16829f9befcf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant