RippleCarryAdderCDKM 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.
operation RippleCarryAdderCDKM (xs : Microsoft.Quantum.Arithmetic.LittleEndian, ys : Microsoft.Quantum.Arithmetic.LittleEndian, carry : Qubit) : Unit is Adj + Ctl
Description
Given two $n$-bit integers encoded in LittleEndian registers xs
and ys
,
and a qubit carry, the operation computes the sum of the two integers
where the $n$ least significant bits of the result are held in ys
and
the carry out bit is xored to the qubit carry
.
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.
carry : Qubit
Carry qubit, is xored with the most significant bit of the sum.
Output : Unit
Remarks
This operation has the same functionality as RippleCarryAdderD, but only uses one auxiliary qubit instead of $n$.
References
- Steven A. Cuccaro, Thomas G. Draper, Samuel A. Kutin, David Petrie Moulton: "A new quantum ripple-carry addition circuit", 2004. https://arxiv.org/abs/quant-ph/0410184v1
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