Quantum Switching and Quantum Merge Sorting
Total Page:16
File Type:pdf, Size:1020Kb
TCAS-I 1923 1 Quantum Switching and Quantum Merge Sorting Sheng-Tzong Cheng and Chun-Yen Wang A quantum wires A Abstract—This paper proposes a quantum switching architect- ure that can dynamically permute each input quantum data to its destination port to avoid using the fully connected networks. In B C B C addition, in order to reduce the execution time of the quantum Quantum quantum switching, an efficient quantum merge sorting algorithm (QMS) switching nodes that provides a parallel quantum computation is also developed. The quantum switching utilizes the QMS algorithm as a subroutine so that the total running time can be reduced to D E D E polylogarithmic time. Furthermore, to evaluate the feasibility of the quantum switching, we also define three different kinds of (a) fully connected (b) quantum switching performance factors that can be used to estimate the complexity in implementation and the time delay in execution for quantum Fig. 1. The quantum network architecture instruments. From the evaluation results, it can be seen that the proposed quantum switching is feasible in practice. [8], quantum cryptography [9][10], quantum repeater [11], and quantum networks [12] have been raised. These results have Index Terms—Quantum circuits, quantum computation, quan- driven the QIS field further into the real- world applications. tum permutation, quantum sort, quantum switching. Many views of the future of QIS indicate that the need for basic quantum wire components would become more essential due to the explosive growth of quantum devices. As shown in I. INTRODUCTION Fig. 1(a), in order to ensure any two quantum devices can uantum computation and quantum information science communicate quantum data with each other, it is necessary to Q(QIS) [1][2] that study the exploration of quantum employ a quantum wire between them. However, this results in a mechanics provides us advanced tools to solve hard problems in fully-connected quantum network that would requires O(n2) traditional Turing machines. The fundamental element in the quantum wires to construct, where n is the total number of quantum field can be any particle with two states that coexist quantum nodes. In this paper, a novel quantum switching together such as a photon, atom, electron, or subatomic particle architecture is proposed to avoid the fully-connected quantum [3]. All of them are under the nano-scale. Thus, QIS is often networks. As shown in Fig. 1(b), with the aid of the quantum considered to be a basis for further research and innovations in switching, quantum nodes only need to deliver their quantum the future development of nanotechnology. data to the quantum switching and the quantum switching would In literature, many outstanding algorithms have been switch it to its destination port. Thus, each quantum node only developed to illustrate that quantum-based computers are more requires one quantum wire to connect with quantum switching, powerful than traditional computers. For example, Shor [4] so the number of the quantum wires can be reduced to O(n). presents a quantum algorithm that factors a composite integer The proposed quantum switching allows each input quantum exponentially faster than the best classical algorithms do. And data to be permuted to its corresponding destination port in Grover [5] presents a quantum algorithm that searches an item parallel dynamically. Moreover, to minimize the time delay in from an unstructured list polynomial speedup over classical executing the quantum switching, an efficient quantum merge algorithms [6]. Due to its potential impact and significance, QIS sorting (QMS) algorithm is developed in this paper. Although it has drawn more and more attentions in the recent decade. has been shown that quantum computers, in general, can not One of the most important applications in QIS is the quantum much outperform classical computers for the task of sorting [13], communication that is a mechanism for transferring quantum this paper makes use of the parallel computation technique [14] data from one location to another. Among them, quantum wire to reduce the running time of the QMS algorithm so that it only [7] is one of such mediums for transporting quantum informa- takes time complexity O(log2n) to sort n quantum elements. tion. At present, many remarkable research issues based upon Because the proposed quantum switching utilizes the the quantum wire configuration such as quantum teleportation efficient QMS algorithm, the total execution time can be reduced to polylogarithmic time. In addition, in order to assess Manuscript received December 10, 2004; revised May 26, 2005; accepted the feasibility of the quantum switching, we also define three July 16, 2005. different performance indexes to evaluate the effectiveness of The authors are with the Department of Computer Science and Information quantum instruments. According to the results, it can be seen Engineering, National Cheng Kung University, Tainan 701, Taiwan (e-mail: [email protected]; [email protected]). that the proposed quantum switching is feasible to put into TCAS-I 1923 2 |0+ |1 |0+ |1 |A |A |B |A |B |B |Bor |A (a) NOT gate |B |A |C |0 |1 (a) SWAP gate (b) Controlled-swap gate control qubit Fig. 3. Quantum SWAP gate and Controlled-swap gate |00+|01+|10+|11 |00+|01+|10+11 |q1 |q1 target qubit |q2 Comparison |q2 (b) CNOT gate ancillary |0if |q1|q2 Fig. 2. Quantum NOT gate and CNOT gate qubit |0 |1if |q1> |q2 Fig. 4 The Comparison gate practice. This paper represents one of the few attempts to solve the dynamic quantum switching in the literature. with some fundamental logic operators so as to complete a The rest of this paper is organized as follows. In Section II, specific task is called a logic gate, such as the classical NOT gate, the general concepts about quantum computation are introduced. AND gate, OR gate, XOR gate, and so on. Analogously, in the Related research is surveyed as well. In Section III, the QMS quantum realm, a set of operators that can manipulate a quantum algorithm that provides a parallel quantum computation is system to accomplish a specific computation is called a presented. In Section IV, the quantum switching architecture is quantum gate. In this section, we introduce four quantum gates proposed to switch quantum data to its corresponding port. that are in common use throughout this paper. Finally, conclusion remarks are drawn in Section V. Similar to the classical NOT gate, the quantum NOT gate applied on a single qubit can be used to flip its states |0and |1. II. BACKGROUND AND RELATED WORK As shown in Fig. 2(a), when we send a qubit |= |0+ |1 In this section, we introduce definitions and terminologies through the quantum NOT gate, then the corresponding output used in describing the proposed mechanism throughout this would be |output= |0+ |1. Besides, the quantum NOT gate paper. In-depth treatments of the notations can be found in is usually called as a Pauli-X gate. Fig. 2(b) shows the circuits of literature [1][15]. the Controlled-NOT (CNOT) gate for processing two qubits. It A. Quantum States can be seen from Fig. 2(b) that the quantum CNOT gate has two inputs. One is the control qubit and the other is the target qubit. Analogous to classical bits, the underlying unit in QIS is a When the control qubit is set to |0, the CNOT gate does nothing. quantum bit (qubit). However, unlike a classical bit that must be On the other hand, if the control qubit is set to |1, then it would inastateeither0 or1,aqubitcanbeinbothstate |0and state |1 apply the NOT gate to the target qubit. In other words, the at the same time. This special phenomenon in quantum CNOT gate can be used to exchange |10and |11. computing is called superposition. In general, a qubit state is Besides, one more important quantum operator is the quan- often represented as a linear combination of these two states, tum SWAP gate. SWAP gate applied on a two-qubit system can |= |0+ |1, (1) be used to do the transposition. More precisely, it changes a where and are complex numbers and ||||2 + ||||2 = 1. two-qubit system from |A|Bto |B|A. As drawn in Fig. Note that it is impossible for us to determine whether a qubit 3(a), SWAP gate can be implemented by three layers of CNOT is in state |0or |1by examining the values of and. However, gates. However, because of its importance to quantum com- when we measure a qubit in a superposition state, the entire munication, SWAP gate is often seen as a basic quantum gate. qubit system would collapse into one of its basis (e.g., |0or |1). The last quantum operator we introduce in this subsection is As for which state we would obtain, it is determined by the the controlled-swap gate (or the Fredkin gate). As depicted in absolute square of its coefficient. That is, we get the qubit in Fig. 3(b), the controlled-swap gate has three input qubits, |A, state |0with probability ||||2, or in state |1with probability ||||2. |Band |C. The qubit |Cis called a control qubit because it Thus, and are called probability amplitudes. controls what happens to the other two qubits. When the control Furthermore, a multiple-qubit system can be built up by qubit |Cis set to |0, it does nothing. On the other hand, if the composing multiple independent qubits. To compose two or control qubit |Cis set to |1, then the SWAP gate is applied to more qubit systems together, the tensor product operator is the target qubits (i.e., |Aand |Bare swapped). adopted. For example, consider a two-qubit system composed In quantum circuits, time evolution goes from left to right.