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

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 al

Quantum Memories in Free Space

     In quantum technologies, the important point is to be able to transmit the information-carrying quantum bits (qubits) from the transmitter to the receiver without loss or damage. This is one of the main purposes. For this, physicists are developing quantum memories that allow us to store information-loaded photons for certain periods of time to be transmitted at any time. Quantum memories are essential components for applications such as quantum information processing, quantum networks, and quantum repeaters. There are quantum devices developed by various methods in order not to lose photons or disrupt their function during the storage process of qubits. In today's article, I will talk about an alternative approach besides the material quantum memories produced. Scientists from the University of Illinois Urbana-Champaign, Truman State University, and RightHand Robotics, Inc. have succeeded in producing a quantum memory in free space. Before describing quantum memories operatin

Density Matrix - Alternative to State Vector

    As you know, in quantum mechanics we operate with state vectors. However, it is very convenient to use the alternative notation to solve some problems. This alternative representation is expressed by the density matrix. A density matrix does not violate quantum postulates like state vectors and even postulates have equivalents just like state vectors. It is represented by the density matrix or density operator rho (ρ). The mathematical representation is as follows:, Let's take the density matrix as an example: As you can see, the density matrix is very practical and very easy to calculate. In particular, it is a pretty good alternative for computations in quantum mechanical systems that make up multiple qubits. You may have noticed another similarity right away. Yes, the trace of the density matrix is equal to 1. This means that we know that the state vector must be normalized. It means the same with the sum of all probabilities is equal to 1.