RFrac operation
Namespace: Microsoft.Quantum.Intrinsic
Package: Microsoft.Quantum.QSharp.Core
Applies a rotation about the given Pauli axis by an angle specified as a dyadic fraction.
operation RFrac (pauli : Pauli, numerator : Int, power : Int, qubit : Qubit) : Unit is Adj + Ctl
Description
\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 @"microsoft.quantum.intrinsic.r".
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.
Output : Unit
Remarks
Equivalent to:
// PI() is a Q# function that returns an approximation of π.
R(pauli, -PI() * IntAsDouble(numerator) / IntAsDouble(2 ^ (power - 1)), qubit);
反馈
提交和查看相关反馈