Condividi tramite


Operazione IncByI

Nome completo: Std.Arithmetic.IncByI

operation IncByI(c : Int, ys : Qubit[]) : Unit is Adj + Ctl

Sommario

Incrementa un registro little-endian ys in base a un numero intero c

Descrizione

Calcola ys += c modulo 2ⁿ, dove ys è un registro little-endian, Length(ys) = n > 0, c è un numero Int, 0 ≤ c < 2ⁿ. NOTA: usare IncByIUsingIncByLE direttamente se la scelta dell'implementazione è importante.