Skip to content

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jan 2, 2025

This fixes a bug in the decomposition for Exp that would cause a runtime failure if an array of more than two qubits was used and a single PauliI was passed in the Pauli array. The decomposition ignores PauliI by calling the RemovePauliI helper function, but then incorrectly uses the original arrays when rather than the filtered arrays in the rest of the operation. This adds a test to confirm the fix (without the fix the test triggers a runtime failure in MapPauli).

This fixes a bug in the decomposition for `Exp` that would cause a runtime failure if an array of more than two qubits was used and a single `PauliI` was passed in the Pauli array. The decomposition ignores `PauliI` by calling the `RemovePauliI` helper function, but then incorrectly uses the original arrays when rather than the filtered arrays in the rest of the operation. This adds a test to confirm the fix (without the fix the test triggers a runtime failure in `MapPauli`).
Copy link

github-actions bot commented Jan 2, 2025

Change in memory usage detected by benchmark.

Memory Report for 737b02b

Test This Branch On Main Difference
compile core + standard lib 19600689 bytes 19600737 bytes -48 bytes

@DmitryVasilevsky
Copy link
Contributor

Wow! Thanks!

@swernli swernli added this pull request to the merge queue Jan 7, 2025
@swernli swernli removed this pull request from the merge queue due to a manual request Jan 7, 2025
@swernli swernli added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit a88fdbd Jan 7, 2025
18 checks passed
@swernli swernli deleted the swernli/exp-pauli-fix branch January 7, 2025 21:18
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.

3 participants