R operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Intrinsic

Package: Microsoft.Quantum.Type2.Core

Applies a rotation about the given Pauli axis.

operation R (pauli : Pauli, theta : Double, qubit : Qubit) : Unit is Adj + Ctl

Description

\begin{align} R_{\mu}(\theta) \mathrel{:=} e^{-i \theta \sigma_{\mu} / 2}, \end{align} where $\mu \in {I, X, Y, Z}$.

Input

pauli : Pauli

Pauli operator ($\mu$) to be exponentiated to form the rotation.

theta : Double

Angle in radians about which the qubit is to be rotated.

qubit : Qubit

Qubit to which the gate should be applied.

Output : Unit

Remarks

When called with pauli = PauliI, this operation applies a global phase. This phase can be significant when used with the Controlled functor.