Skip to content

Conversation

DmitryVasilevsky
Copy link
Contributor

@DmitryVasilevsky DmitryVasilevsky commented Jul 10, 2025

This adds a function to remap Pauli axes MapPauliAxis to the new BlochSphere.qs file. It is based on the previously internal MapPauli and brings some updates and extensive doc comments. This is useful to apply operations in different Pauli bases.

For example, rotation around the X axis can be expressed as a rotation around the Z axis by remapping the Pauli axes so that X axis becomes Z axis. The following two operations are equivalent:

Rx(0.1, q)

and

within {
    MapPauliAxis(PauliZ, PauliX, q);
} apply {
    Rz(0.1, q);
}

This function is used internally in some rotations and state preparation.
Resolves part 2 of #1104

@DmitryVasilevsky DmitryVasilevsky changed the title Clifford transformations to remap Pauli axis making MapPauliAxis public with updates to functionality and comments Jul 10, 2025
@DmitryVasilevsky DmitryVasilevsky marked this pull request as ready for review July 11, 2025 01:12
@DmitryVasilevsky DmitryVasilevsky requested a review from msoeken July 11, 2025 01:13
Copy link

Change in memory usage detected by benchmark.

Memory Report for 076efd5

Test This Branch On Main Difference
compile core + standard lib 25201510 bytes 25210462 bytes -8952 bytes

@DmitryVasilevsky DmitryVasilevsky changed the title making MapPauliAxis public with updates to functionality and comments Making MapPauliAxis public with updates to functionality and comments Jul 11, 2025
Copy link

Change in memory usage detected by benchmark.

Memory Report for 3c5e70d

Test This Branch On Main Difference
compile core + standard lib 25201510 bytes 25210462 bytes -8952 bytes

@DmitryVasilevsky DmitryVasilevsky requested a review from billti July 11, 2025 01:17
Copy link

Change in memory usage detected by benchmark.

Memory Report for 2706c52

Test This Branch On Main Difference
compile core + standard lib 25361638 bytes 25374710 bytes -13072 bytes

@DmitryVasilevsky DmitryVasilevsky added this pull request to the merge queue Jul 14, 2025
Merged via the queue into main with commit 50bbed2 Jul 14, 2025
18 checks passed
@DmitryVasilevsky DmitryVasilevsky deleted the dmitryv/cliffords branch July 14, 2025 17:27
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.

2 participants