How to see that both are adder circuits in terms of conventional classical circuit logic ?

Strange, the first circuit uses QFT , while the second circuit is using ripple-carry architecture



2 Answers 2


2 very different methods for implementing adder are with QFT and with ripple carry adder.

You will prefer to choose which one according to your HW and your constraints.

To see that, you can go to platform.classiq.io and run an adder with different constraints.

In the model tab, choose some example with arithmetic, or paste this in the editor (available in the Git Repo too):

qfunc main(output z: qnum) {
  x: qnum;
  y: qnum;
  z = x+y;

And synthesize with different constraints.

When choosing depth optimization, you will get a CCX implementation. This is because it uses auxilarries to optimize the depth, and does not using QFT. Also it is more suitable to basis gates hardware that are using CP as a basis gate. The actual implementation is very simillar to classical one - add to qubits, and take the carry to the next one: enter image description here

QFT on the other hand, is converting the addition to the phase space using QFT, adding phases with controlled-phase gate, according to the original qubit, and convert back to the computational basis using inverse QFT. enter image description here


The first one uses Fourier basis to represent numbers, so that addition and subtraction can just be translated into rotations of respectively sized angles. Look at Qiskit Quantum Fourier Transform tutorial, it gives an intuitive view on the number representations.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.