Skip to content

Conversation

@jake-arkinstall
Copy link
Collaborator

Closes #109.

The original implementation filtered qubits by presence in the user_specified list, but neglected to use the ordering of that list to append qubits in the right order. This PR fixes that by finding the index in the list, and inserting the qubit ID into that position within the (now pre-allocated) permutation_rhs list.

Copy link

@PabloAndresCQ PabloAndresCQ left a comment

Choose a reason for hiding this comment

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

Thanks Jake, this makes sense!

You mentioned that CI is failing due to a known issue with guppy result array comprehension. I don't know what's the better way to go around that, so I'll leave it for someone else to hit approve.

@jake-arkinstall jake-arkinstall force-pushed the fix/state-result-qubit-ordering branch from 1f14338 to 0de0d33 Compare January 7, 2026 20:23
@jake-arkinstall
Copy link
Collaborator Author

I've rebased on main with the temporary fix (pinning guppylang) now, so CI should be green lights all the way

@jake-arkinstall jake-arkinstall marked this pull request as ready for review January 7, 2026 20:28
@jake-arkinstall jake-arkinstall merged commit 5c48d19 into main Jan 8, 2026
10 checks passed
@jake-arkinstall jake-arkinstall deleted the fix/state-result-qubit-ordering branch January 8, 2026 09:36
jake-arkinstall pushed a commit that referenced this pull request Jan 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.7](selene-sim-v0.2.6...selene-sim-v0.2.7)
(2026-01-08)


### Features

* Add event hook which records measurement results
([#104](#104))
([01300ee](01300ee)),
closes [#103](#103)
* Correct qubit ordering in QuEST state dumping
([#110](#110)), closes
[#109](#110)
* Support state-dump passthrough on quantum replay simulator
([#108](#108))
([1b01a01](1b01a01))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

State result ignores order of specified_qubits

4 participants