Skip to main content

Let's Define Quantum Programming

 

 

Along with the strange discoveries of quantum physics, one of these ideas for how we could use it is quantum computers. Work on quantum computers, which is a pretty good idea, started small and became what it is today. Now we had to take one more step and do quantum programming.

The first studies on this process were made in the early 2000s. However, these studies were more theoretical. This was because quantum computers were not yet technologically ready.

Finally, with the serious development of quantum computers (of course, we are still not at the desired point) we started to create our quantum algorithms.

Today, we can do these algorithms on IBM Quantum Experience, Microsoft Azure Quantum, DWave Leap Cloud, or with quantum development kits. With these platforms, most of which are open source, we can create our quantum algorithms with the Python language, which we use classically and which is the most common programming language.

The fact that such platforms are open source is also a good advantage for producing companies. Because in this way, open-source concrete algorithms that can be applied by physicists, mathematicians, computer engineers, and many curious people around the world will be produced.

The smallest structural unit of quantum computers is the quantum bit (qubit). Qubits consist of a binary system of 0 and 1 like the classical bits. However, unlike classical bits, electron spins take advantage of superposition or entanglement to have both bits 0 and 1 at the same time.

If we look at the Dirac notation (bra-ket) of the qubit, it is expressed as follows.

If we quantify the probability that a qubit will be measured using two numbers, 

| 𝛼|² is expressed as the probability that the qubit will be measured as 0, and 

| 𝛽 |² is the probability that the qubit will be measured as 1.

In the case of multiple qubits, we should write it as a tensor product.

Once we have defined our qubits, we must apply them in quantum logic gates as in classical programming. Quantum logic gates are quantum circuits that form the basic building blocks of quantum algorithms.

Unlike many classical logic gates, quantum logic gates are reversible. This is an important feature. Because the functions we use to create a quantum algorithm must be unitary, hermitian, and reversible.

You can see some of the quantum logic gates used below.


Stay with physics. :)

 

 

Reference

Peter Selinger. Towards a Quantum Programming Language. Mathematical Structures in Computer Science, 14(4):527–586, August 2004. 10.1017/​S0960129504004256.
https:/​/​doi.org/​10.1017/​S0960129504004256

https://qiskit.org/documentation/getting_started.html


Comments

  1. The future of algorithm will be awesome.

    ReplyDelete
  2. Quantum is a very interesting subject.

    ReplyDelete

Post a Comment

Popular posts from this blog

Bloch Sphere – Geometric Representation of Quantum State

    It is very difficult to visualize quantum states before our eyes. The Bloch sphere represents quantum state functions quite well. The Bloch sphere is named after physicist Felix Bloch. As you can see in the Bloch sphere figure below, it geometrically shows the pure states of two-level quantum mechanical systems. The poles of the Bloch sphere consist of bits |0⟩ and |1⟩. Classically, the point on the sphere indicates either 0 or 1. However, from a quantum mechanics point of view, quantum bits contain possibilities to be found on the entire surface of the sphere. Traditionally, the z-axis represents the |0⟩ qubit, and the z-axis the |1⟩ qubit. When the wave function in superposition is measured, the state function collapses to one of the two poles no matter where it is on the sphere. The probability of collapsing into either pole depends on which pole the vector representing the qubit is closest to. The angle θ that the vector makes with the z-axis determines this probabilit...

Bernstein–Vazirani Algorithm

  Quantum computers currently available are not sufficient to solve every existing classical problem due to their own characteristics. This does not mean that they are inferior to classical computers, or that, on the contrary, quantum computers should give all kinds of advantages over classical computers. Popular quantum algorithms solved in quantum computers are algorithms created by taking advantage of the superposition and entanglement properties of particles. So, they are algorithms created to show the prominent features of quantum properties. Today I will talk about an enjoyable algorithm that demonstrates the efficiency and speed of these quantum features. Known as the Bernstein - Vazirani algorithm is a quantum algorithm invented by Ethan Bernstein and Umesh Vazirani in 1992. The purpose of this algorithm, which is a game, is to find a desired number. To put it more clearly, let's keep in mind a string of binary numbers, for example, 1011001. Next, let's write an algori...

Shor's Protocol - Example Solution

    Finally, we have come to the famous Shor's definition of the algorithm in this article. Before applying this algorithm, we examined in detail the three mathematical operations required for our algorithm. These three necessary mathematical expressions were modular arithmetics, quantum Fourier transform , and quantum phase estimation . As you may remember, Shor's algorithm is an algorithm that gives prime factor values of large numbers. To show that this protocol works, we will write an algorithm that gives the prime factors of 15. The binary equivalent of the decimal number 15 consists of 1111 qubits. Now let's examine Shor's protocol in detail. If we write it in a regular way, we can write the state vector | ψ 3 > as follows. Now, let's measure the last four qubits. In this case, we would have measured the situations |1>, |2>, |4>, |8> with 25% probability. Suppose we have reached the state |8> with a probability of 25% in our measurement re...