Skip to content

[docs] Document argument order for controlled rotation gates#4605

Open
aryanputta wants to merge 1 commit into
NVIDIA:mainfrom
aryanputta:docs/controlled-rotation-arg-order
Open

[docs] Document argument order for controlled rotation gates#4605
aryanputta wants to merge 1 commit into
NVIDIA:mainfrom
aryanputta:docs/controlled-rotation-arg-order

Conversation

@aryanputta
Copy link
Copy Markdown

Summary

Clarifies the argument order for controlled parameterized gates (rx, ry, rz, r1, u3) in the Adjoint and Controlled Operations section of default_ops.rst. The convention (parameters first, then control qubits, then target) was not explicitly stated, which caused user confusion (see issue #2285).

Change

  • Adds a short paragraph explicitly stating the argument order.
  • Adds matching Python and C++ examples showing single-control and multi-control rotations, mirroring the tab structure already used in this section.

Docs-only change; no code paths affected.

Closes #2285

For parameterized gates (rx, ry, rz, r1, u3), the gate parameters
precede the control and target qubits when using .ctrl in Python or
<cudaq::ctrl> in C++. Adds matching Python and C++ examples showing
single- and multi-control rotations.

Closes NVIDIA#2285

Signed-off-by: Aryan Putta <aryansputta@gmail.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 25, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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.

Controlled rotation gate documentation

1 participant