Skip to main content

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 result. Thus, our new situation becomes as follows.

In our next step, let's apply the QFT-1 gate to our first four qubits and we get the result as follows.

Now let's do our final measurements to reach the result. In our measurement results, we will see that except for 0 (0 does not give us any information about the prime factors, it makes a measurement again.) 4 and 12 give the full solution, while 8 gives a partial solution.



Comments

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

Statement of Bell's Inequality

 One of the most important applications of quantum mechanics is Bell's inequality. In 1965, John Stewart Bell actually thought that Einstein might be right and tried to prove it, but proved that quantum logic violated classical logic. It was a revolutionary discovery. Let's look at its mathematically simple explanation. To create the analogy, let's first write a classical inequality.   This inequality above is a classic expression. The quantum analogy of this expression represents the Bell inequality. With just one difference. Bell's inequality shows that the above equation is violated. Expressing Bell's inequality by skipping some complicated mathematical intermediates; While there is no such situation in the classical world that will violate the inequality we mentioned at the beginning, it is difficult to find a situation that does not violate this inequality in the quantum world. Reference https://www.youtube.com/watch?v=lMyWl6Pq904 https://slideplay...

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