Skip to content

Add PauliRotation gate for dense Pauli string exponentials#8170

Open
anshjaiswal12 wants to merge 3 commits into
quantumlib:mainfrom
anshjaiswal12:feat/pauli-rotation-gate-6598
Open

Add PauliRotation gate for dense Pauli string exponentials#8170
anshjaiswal12 wants to merge 3 commits into
quantumlib:mainfrom
anshjaiswal12:feat/pauli-rotation-gate-6598

Conversation

@anshjaiswal12

@anshjaiswal12 anshjaiswal12 commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Adds PauliRotation / PauliRotationGate using DensePauliString so identity factors are preserved (e.g. XI stays two-qubit).

Implements U = cos(θ)I + i sin(θ)P and decomposes via PauliStringPhasor with explicit qubits.

Closes #6598

Tests

pytest cirq/ops/pauli_rotation_test.py — 15 tests.

AI disclosure: Cursor IDE was used only to read/search the codebase and help debug the issue. All code in this PR was written and reviewed by me.

PauliSumExponential uses sparse PauliString and drops identity factors,
so exp(i*theta*X⊗I) was incorrectly reduced to a single-qubit rotation.
Introduce PauliRotation/PauliRotationGate using DensePauliString with
U = cos(theta)I + i*sin(theta)P and unit tests for unitary, decomposition,
repr, and parameter resolution.

Closes quantumlib#6598
@anshjaiswal12 anshjaiswal12 requested a review from a team as a code owner June 30, 2026 07:09
@google-cla

google-cla Bot commented Jun 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the size: L 250< lines changed <1000 label Jun 30, 2026
Clarify identity-factor handling in _decompose_, expand PauliRotation
docstring, fix copyright year, and document the unitary test helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: L 250< lines changed <1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a gate to represent a PauliRotation

1 participant