# RFrac operation

Applies a rotation about the given Pauli axis by an angle specified as a dyadic fraction.

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

Warning

This operation uses the opposite sign convention from R.

operation RFrac (pauli : Pauli, numerator : Int, power : Int, qubit : Qubit) : Unit
Functors

## Input

pauli
Pauli

Pauli operator to be exponentiated to form the rotation.

numerator
Int

Numerator in the dyadic fraction representation of the angle by which the qubit is to be rotated.

power
Int

Power of two specifying the denominator of the angle by which the qubit is to be rotated.

qubit
Qubit

Qubit to which the gate should be applied.

Unit

## Remarks

Equivalent to:

// PI() is a Q# function that returns an approximation of π.
R(pauli, -PI() * IntAsDouble(numerator) / IntAsDouble(2 ^ (power - 1)), qubit);