# How does using a superposition of 0 and 1 improve the processing capabilities of a quantum computer compared to classical computers? [closed]

Whenever I learn about quantum computing and qubits, it always talks about the superposition principle and that the qubits can be in both states 0 and 1 simultaneously, thus claiming that quantum computers have processing capability way more than modern conventional computers.

But here is what I don't understand:

1. How can a superposition of 0 and 1 represent any discrete information at all?
2. What about the logic gates?
3. How can a discrete decision be taken by leveraging this superposition principle?
4. Combination of 0 and 1 is basically important for computing. How can this third state of qubits be leveraged to give a boost in computing?
• Welcome to the site. There seems to be some overlap between yours and an older question, I recommend that you check which of your points (if any) it answers and focus the question on parts that it doesn't address. – Kiro Apr 25 '18 at 4:02
• Beyond the overlap issue (where I agree with @Kiro), please also consider splitting multiple questions into actual individual question when possible, as others have sucessfully done around here (one can always edit one's own question to remove stuff, and paste it into a new question). This facilitates writing good answers, and also is useful for the next person that comes. – agaitaarino Apr 25 '18 at 5:37
• Apart from asking multiple questions, points 1 to 3 are essentially of the form "I don't understand X". This is unfortunately too vague for our QA format, as we don't know why you don't understand it and hence don't know for sure what to tell you so that you do understand. Please edit your question to be specific about a single concept you don't understand. See also the help center on how to ask better questions. – Discrete lizard Apr 25 '18 at 10:06
• All the question are interrelated and if separated they won't make sense. It's all related aspect of single question - How superposition of 1 and 0 is work in Quantum computing – revittrk May 4 '18 at 5:38
• @revittrk Please try reducing your four questions to that one single question, and try to include exactly what you didn't understand from the standard sources like Wikipedia or textbooks. – Sanchayan Dutta May 8 '18 at 13:40

How can a superposition of 0 and 1 represent any discrete information at all?

The inputs to a quantum computer are always the same as the inputs to a classical computer; a definite sequence of 0s and 1s. This superposition thing is something that happens in the middle of the computation, and what you're quantum algorithm tries to do is make sure that your output is also a definite sequence of 0s and 1s. So, you're not using the superposition to represent any information in the sense of an input or an output.

In many ways, logic gates work just the same as in the classical case. For example, there are many gates which, given an input string of 0s and 1s output a different string of 0s and 1s. Examples include the not gate, controlled-not and Toffoli (controlled-controlled-not). For a quantum state, if you have it written out as a superposition of different strings of 0s and 1s, these gates act on each of these strings just as they would in the classical case. In this sense, you can do everything that a classical computer can (the Toffoli gate, in particular, is said to be 'universal' for classical reversible computation, i.e. arbitrary combinations have the full power of classical computation).

However, quantum computation has more logic gates. It has gates which can create and recombine superpositions, and gates which can change the complex argument on the coefficients of the superposition (the $\alpha$ and $\beta$ in a statement $\alpha|0\rangle+\beta|1\rangle$).

How can a discrete decision be taken by leveraging this superposition principle?

The trick, as mentioned above, is to make sure that there is a definite output, i.e.e that there is no (or almost no) superposition when the information is read out at the end. Where this superposition becomes useful is it gives these extra gates, over and above the classical stuff, some room to work. Without specifying exactly how they do it, you can easily imagine how having access to an additional set of abilities can sometimes be combined in new ways to give faster computations.

Combination of 0 and 1 is basically important for computing. How can this third state of qubits be leveraged to give a boost in computing?

The insight about how it works is to emphasise first that the superposition of a qubit is not only one extra state. It is an infinite number of them, because instead of either being a 0 or a 1, it can be any state $\alpha|0\rangle+\beta|1\rangle$ that satisfies the constraint $|\alpha|^2+|\beta|^2$. What's more, when you combine $N$ qubits together, you can get superpositions across all $2^N$ different sequences of 0s and 1s.

Now, how is this useful? So far, we only know that it's useful for a limited set of problems, and these problems often require knowledge of some global property of a function, i.e. I don't just want to evaluate some function $f(x)$ for a specific value of $x$, but I want to know some relation between many different values of $f(x)$. The superposition can simultaneously evaluate all the different values of $f(x)$, and then it just needs a bit of magic to work out if it's possible to recombine these superpositions in order to get out the answer we're interested in. The point is that this opens up a completely new possibility for the way an algorithm could work.

• “The superposition can simultaneously evaluate all the different values of $f(x)$, and then it just needs a bit of magic to work out if it's possible to recombine these superpositions in order to get out the answer we're interested in. The point is that this opens up a completely new possibility for the way an algorithm could work.” This might be the best intuitive explanation of the opportunity and the difficulty of quantum computing that I have yet read. – KRyan Jun 15 '18 at 15:10

How can a superposition of 0 and 1 represent any discrete information at all?

Any algorithm, classical or quantum, inputs 0's and 1's and outputs 0's and 1's. For a quantum algorithm 0 is $|0\rangle$ and 1 is $|1\rangle$. Quantum algorithms use superpositions $|\psi\rangle = \alpha|0\rangle+\beta|1\rangle$ on intermediate computation steps only.

Quantum computers use a different set of gates because they are built on different physics. For example, all quantum gates are reversible, while for example classical AND gate is not reversible.

Formally, a quantum gate is a unitary transformation applied to one or several qubits.

How can a discrete decision be taken by leveraging this superposition principle?

"Discrete decision" (whatever it means) is based on the output of a quantum algorithm which is nothing more than a bunch of zeros and ones, same as with classical algorithm.

Combination of 0 and 1 is basically important for computing. How can this third state of qubits be leveraged to give a boost in computing?

Actually quantum algorithms use not only single-qubit superposition states $|\psi\rangle = \alpha|0\rangle+\beta|1\rangle$ but also multi-qubit entangled states. Anyway, quantum algorithms have additional "degrees of freedom" that are unavailable to classical algorithms and indeed can leverage these degrees of freedom "to give a boost in computing". I doubt it is possible to explain how quantum algorithms do it without learning quantum algorithms themselves.

• You might want to specifically address the OP's apparent confusion about how many different single qubit states there are. You might also want to describe more about the quantum logic gates than the fact that they're reversible: you can realise all of classical computation reversibly in principle. – Niel de Beaudrap Apr 25 '18 at 11:41