IncrementByInteger operation
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
Submit and view feedback for