The logic of a quantum computer is completely different!
First, every function used in a quantum computer must be reversible, i.e., with the output it must be possible to generate the input again. Most conventional computer algorithms already break this rule. For example, addition is not reversible! If you add 2+7 will give 9, but it is impossible to make a function that takes 9 and returns 2+7, because some of the information was lost in the process.
Thus conventional addition, subtraction, multiplication, and division operations are not possible in a quantum computer. With this restriction it is also possible that any quantum function must have the same number of input bits and output bits. This is not a limitation, as reversible methods exist for all computable functions, but requires a different way of thinking in solving a problem.
Another very different property is that in the middle of a quantum program no bit can be modified, copied or deleted. Such an operation would "spoil" the bits! Furthermore, in a quantum function there can be no loops, no ifs, no conventional flow control: one operation is executed after the other sequentially. And quantum operations change all bits at once in a way that would take many normal operations to do it, forming a new set of basic instructions that is much more efficient for some kinds of problems.
If the quantum computer starts to be viable, the most accepted idea is that programming will continue in the same way, but with quantum functions! A conventional computer will write the input bits into the memory of a quantum computer and give a signal for it to start the function. After the result is calculated just read the output values. I imagine that there will be a library of quantum functions to use in the code and this should be transparent for the programmer.
The quantum computer is extremely fast for making a discrete Fourier transform by solving it with complexity O(n 2). In a conventional computer this operation has O(n*2 n) complexity, much larger. Hence, in 1994 a mathematician named Peter Shor made a quantum algorithm with complexity O(n 3) to factor a number using the Fourier quantum transform. After that the interest in quantum computers grew a lot, because factoring a number with this speed would break many of the current cryptosystems.
I tried to say the most important thing, it is very difficult to explain this by trying to be as basic as possible! A more detailed discussion can easily arrive at deep existential philosophy and the strangeness of the universe, which would not help much to answer the question :)
I THINK the codes we’ve already done will continue to work OK, but will have new framework updates that can run faster.
– PauloHDSousa
From what I understood only problems of type NP (https://pt.wikipedia.org/wiki/NP_%28complexity%29) would be more efficient in QC , common problems would continue to use what we have today.
– Motta
The question and the answer (so far) are symptomatic that the site continues attracting high quality professionals. Thanks to the two!
– brasofilo
Related: "What are the main differences between a quantum computer and a conventional computer?"
– mgibsonbr
I believe that change will come with the adoption of neural computers, using the concept memristor, HP is already creating memories using this technology and the future is promising.
– lsalamon
For those who want to venture into this area, there are some very interesting links provided below: Bing - Quantum Computing Playground and IBM - Quantum Experience
– lsalamon