IncrementByInteger 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
Increments an unsigned quantum register by a classical integer, using phase rotations.
operation IncrementByInteger (increment : Int, target : Microsoft.Quantum.Arithmetic.LittleEndian) : Unit is Adj + Ctl
Description
Suppose that target
encodes an unsigned integer $x$ in a little-endian
encoding and that increment
is equal to $a$.
Then, this operation implements the unitary $\ket{x} \mapsto \ket{x + a}$,
where the addition is performed
modulo $2^n$, where $n = \texttt{Length(target!)}$.
Input
increment : Int
The integer by which the target
is incremented by.
target : LittleEndian
A quantum register encoding an unsigned integer using little-endian encoding.
Output : Unit
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