RippleCarryAdderNoCarryTTK 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

Reversible, in-place ripple-carry addition of two integers without carry out.

operation RippleCarryAdderNoCarryTTK (xs : Microsoft.Quantum.Arithmetic.LittleEndian, ys : Microsoft.Quantum.Arithmetic.LittleEndian) : Unit is Adj + Ctl

Description

Given two $n$-bit integers encoded in LittleEndian registers xs and ys, the operation computes the sum of the two integers modulo $2^n$, where $n$ is the bit size of the inputs xs and ys. It does not compute the carry out bit.

Input

xs : LittleEndian

LittleEndian qubit register encoding the first integer summand.

ys : LittleEndian

LittleEndian qubit register encoding the second integer summand, is modified to hold the $n$ least significant bits of the sum.

Output : Unit

Remarks

This operation has the same functionality as RippleCarryAdderTTK but does not return the carry bit.

References

  • Yasuhiro Takahashi, Seiichiro Tani, Noboru Kunihiro: "Quantum Addition Circuits and Unbounded Fan-Out", Quantum Information and Computation, Vol. 10, 2010. https://arxiv.org/abs/0910.2530