What will the new logic of quantum computer programming look like?

Asked

Viewed 809 times

17

There is a lot of talk about quantum computers with high performance and processing capacity. Unlike bits, the qubits of quantum computers, working with superposition, can assume three different values: 0 or 1 or 0 and 1 simultaneously.

I know it is a long question, but I would just like a basic explanation on the subject. Since I read something about it, however, because it is a complex subject, it is not clear.

How will the new programming logic of these computers?

The classic codes will be re-used?

  • I THINK the codes we’ve already done will continue to work OK, but will have new framework updates that can run faster.

  • 1

    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.

  • 1

    The question and the answer (so far) are symptomatic that the site continues attracting high quality professionals. Thanks to the two!

  • 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.

  • 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

Show 1 more comment

2 answers

10


The difference will not occur (at least for a considerable amount of time) in the coding of deadly nodes programmers.

As we live in a physical and non-quantum world, our applications are most often made to solve physical problems. We currently use bit-based computing, and each bit can only have a physical state (0|1), called the classical state. We learn to transform these bits into representable elements with human meanings as numbers.

Quantum computing radically changes this concept, because since a qubit is in a quantum state and there are infinite quantum states, there is no way to represent these states in the classical model without making a measuring. Anyone who has read or studied quantum mechanics knows that by performing such a measure the state changes to the measured value with a probability margin of other states. It is on this margin that quantum computation works and it is on these that algorithms will be used.

With that in mind, we know that computers working with classical states will continue to be efficient for comparison and summation operations.

For probabilistic operations, quantum computing will be the key. A practical example of this is the weather forecast. Current algorithms (called mathematical models) make probabilistic calculations using the concept of neural network, dividing in steps and calculating the probability of each step, always opting for the most likely. To know other model results, you need to change the initial values indicating which path you want to follow. In the quantum model this would happen simultaneously, that is, all (assuming there are enough qubits) the probabilities would be calculated at the same time.

Only with that in mind do I believe that we will not radically change the way we program, but how we get the results, unless our mathematics changes (evolves) to the point where we need new concepts of thinking in code.

For those who are reading this without knowing anything about it, there is already a commercial quantum computer called D-Wave and just as it was with computers in the early computer age, it’s being used more for scientific purposes than for commercial ones, but soon that can change.

To learn more about indico quantum computing that reading.

2

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 :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.