IncrementPhaseByModularInteger 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.Arithmetic
Package: Microsoft.Quantum.Standard
Performs a modular increment of a qubit register by an integer constant.
operation IncrementPhaseByModularInteger (increment : Int, modulus : Int, target : Microsoft.Quantum.Arithmetic.PhaseLittleEndian) : Unit is Adj + Ctl
Description
Let us denote increment
by $a$, modulus
by $N$ and integer encoded in target
by $y$.
Then the operation performs the following transformation:
\begin{align}
\ket{y} \mapsto \ket{(y + a) \operatorname{mod} N}
\end{align}
Integers are encoded in little-endian format in QFT basis.
Input
increment : Int
Integer increment $a$ to be added to $y$.
modulus : Int
Integer $N$ that mods $y + a$.
target : PhaseLittleEndian
Integer $y$ in phase-encoded little-endian format that increment
$a$ is added to.
Output : Unit
Remarks
Assumes that target
has the highest bit set to 0.
Also assumes that the value of target is less than $N$.
For the circuit diagram and explanation see Figure 5 on Page 5 of arXiv:quant-ph/0205095v3.
See Also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for