Skip to content

feat: Add RQang operation to parametric qubit operations - #10257

Open
LestlinRobins wants to merge 3 commits into
PennyLaneAI:mainfrom
LestlinRobins:feat-qang-operation
Open

LestlinRobins wants to merge 3 commits into
PennyLaneAI:mainfrom
LestlinRobins:feat-qang-operation

Conversation

@LestlinRobins

Copy link
Copy Markdown

Closes #10171

Context

Single-qubit rotations in the XY plane are commonly used in quantum circuits and pulse-level control. While these rotations can already be constructed using combinations of existing gates, having a native operation makes them easier to work with, particularly when building and optimizing parametrized quantum circuits.

Description of the Change

This PR introduces RQang, a new parametric single-qubit operation in PennyLane for arbitrary rotations in the XY plane, parameterized by a rotation angle (\theta) and an azimuthal angle (\phi).

The implementation includes:

  • Matrix representation and eigenvalue computation.
  • Generator computation: G = 1/2 * (cos(phi) * X + sin(phi) * Y).
  • Adjoint and power rules.
  • Canonical decomposition: RZ(-phi) @ RX(theta) @ RZ(phi).
  • Parameter validation using assert_valid.

The operation is exported through PennyLane's public API, with the necessary updates to pennylane/__init__.py, pennylane/ops/qubit/__init__.py, and tach.toml.

Unit tests have also been added to tests/ops/qubit/test_parametric_ops.py, along with a changelog entry in doc/releases/changelog-dev.md.

Benefits

  • Provides a native operation for arbitrary XY-plane single-qubit rotations.
  • Simplifies circuit construction by avoiding the need to manually combine multiple elementary gates.
  • Supports differentiable parametrized quantum circuits and integrates with PennyLane's existing operator framework.

Possible Drawbacks

No specific drawbacks have been identified.

Related GitHub Issues

@github-actions github-actions Bot added the external PRs opened by contributors outside the PennyLaneAI organization label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PRs opened by contributors outside the PennyLaneAI organization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native qang unit/gate: qg_Z-parameterized rotation + calibration utilities

1 participant