A Novel Efficient Quantum Random Access Memory

Owing to the significant progress in manufacturing desktop quantum computers, the quest to achieve efficient quantum random access memory (QRAM) became inevitable. In this paper, we propose a novel efficient random access memory for quantum computers. The proposed QRAM has a fixed structure and can be used efficiently to store both known and unknown classical/quantum data. The storage capacity of the proposed QRAM is more efficient than that of the classical RAMs and can be used to store both classical and quantum information. Furthermore, the proposed model can access an arbitrary location in O(1) compared with other state-of-the-art models.


I. INTRODUCTION
The unique properties of quantum mechanics, i.e. superposition and entanglement, have revolutionized the speed of quantum computing. Quantum teleportation is a novel technology that can be used for transferring unknown quantum states [1], [2]. Previous research has shown that quantum computers solve complex computing problems faster than classical computers [3]- [9]. Recently, it has been proved that quantum computers can solve novel types of problems that are impossible to solve using classical computers [10]. Thus, the quest to achieve efficient quantum random access memory became inevitable. Also, the power of computing devices is based on the capacity to store information in an array of memory cells. Random access memory (RAM) is classified as an architecture for a memory array [3]. RAM has three ingredient components: an array of memory cells, an address register and an output register. Each cell is addressed with a unique address from 2 n addresses. When the address register is loaded with an address, the corresponding cell content is retrieved via the output register.
RAM is the primary memory in classical computers. Quantum primary memory, QRAM, is the main infrastructure to build a powerful quantum computer. Quantum computer applications and quantum control systems require creating variables in QRAM. Each variable name is translated to a reserved address that points to a unique location, containing the variable value, in the QRAM. In this paper, we propose a novel QRAM model for storing classical data and quantum data in 2 n different states inside QRAM. The quest of implementing QRAM is essential for the implementation of quantum algorithms [3]- [9]. Moreover, QRAM would provide an exponential speed up for pattern recognition algorithms [11]- [17]. In [18], Giovanetti et al. proposed addressing a QRAM architecture called the "bucket brigade" [18] that needs O(n) to call a memory cell. The nodes of the routing binary tree are represented by three level quantum systems (qutrits) [18]. To study the efficiency of the bucket brigade scheme, Srinivasan et al. [19] showed the circuit model for the quantum bucket brigade architecture and investigated the quantum error correction for the circuit. This QRAM [18] needs a qutrit-based system to be implemented, i.e. it cannot be implemented on qubit-based quantum computers. Recently, D. K. Park et al. [20] proposed Flip-Flop Quantum Random Access Memory (FF-QRAM) based on the quantum circuit model. A main component of a FF-QRAM circuit is the controlled qubit rotation C n R y (θ l ) that must be used to VOLUME 4, 2016 store data item l [20]. This means that the structure of this QRAM [20] is data dependent. In this paper, we propose a novel efficient quantum random access memory for quantum computers. Unlike FF-QRAM [20], the proposed QRAM has a fixed structure. Also, unlike bucket brigade QRAM [18], the proposed QRAM can be implemented on qubitbased quantum computers. Moreover, the proposed QRAM can be used to efficiently write both known and unknown classical/quantum data. The storage capacity of the proposed QRAM is high compared to that of classical RAM. Furthermore, the proposed model can access arbitrary location in O(1) compared with other state-of-the-art models.
The remainder of this paper is organized as follows. In section 2, we present the proposed QRAM model and the proposed reading and writing algorithm. In section 3, we analyze performance of the new QRAM. Section 4 illustrates the experimental results of the simulation of the proposed QRAM. Finally, section 5 concludes the paper by accentuating its main findings. Fig.1 shows the circuit of the proposed Quantum Random Access Memory (QRAM). The register |A represents the address register used to address the locations of the register |D , so the register |A determines the locations of the variables in QRAM. The size of the register |A is n qubits to address 2n locations in the QRAM. Consequently, the size of |D is n qubits, which is used to represent 2n locations in the QRAM. Moreover, an extra qubit |dq is initialized at state |0 . |qy is a n + m qubit-sized bus register, which links the quantum processor/micro-controller and QRAM. The first n qubits of the bus register |qy are used to carry the address of the variable location provided by a quantum computer or a quantum microcontroller while the other m qubits are used to carry the value in the variable to transfer it to a specific location in the quantum RAM or are used to read the data from QRAM. Finally, an extra qubit |r is used to distinguish between reading and writing processes. In this model, the correlation between the memory cell and its address occurs via entanglement when the writing process is performed. This QRAM model has the potential to store classical data or a superposition of states into a single location. Hence, the capacity of the proposed model increases exponentially compared to that of classical RAM.

B. THE NEW QRAM READING AND WRITING ALGORITHM
In this section, we present the algorithm that handles reading and writing operations for the proposed QRAM model.

III. PERFORMANCE ANALYSIS OF THE NEW QRAM
1) Step1: The algorithm applies n Hadamard gates. Each of them is applied to a single qubit of the register |A to create a complete superposition of states in the register |A to address 2 n locations in the QRAM. 2) Step 2: When an address is loaded in the first n qubits of the bus register |qy , the QRAM needs to find the address location among 2 n addresses of the register |A , which is assigned by a quantum processor via the bus register |qy . To find this location, a set of n CN OT gates are applied between each qubit of the bus register |qy as a control qubit and the corresponding qubit in the register |A as a target qubit. Then, a set of n quantum-NOT gates are applied to the qubits of the register |A individually. The result of this operation transforms the required location in the register |A to be in the state |11...1 in the superposition.

3)
Step 3: The Toffoli gate is used to mark the address that matches the input address in the bus register |qy by entangling |dq with the QRAM. The Toffoli gate is defined as Step 4: The QRAM performs a reading or writing process from a given location provided by the quantum processor through the first nth qubits of register |qy based on the state of the qubit |r as follows: (i) If the qubit |r is loaded with state |1 by the quantum processor, then the CCN OT gate is run to copy the value of the variable to the last n th of register |qy . Furthermore, the controlled-controlled-swap gate is not working, so the reading process is complete.
(ii) However, if the quantum processor loads the state |0 to the qubit |r , then the controlledcontrolled-swap, C 0 CSW AP r dq yn+i Di , gate is applied to write the value stored in the last n qubits of the register |qy into the QRAM location specified by the first n th qubits. Furthermore, the CCN OT gate is not working, so the writing process is complete. C 0 CSW AP r dq yn+i Di is the swap gate controlled by qubit |r and qubit |dq . 5) Step 5: Remove the entanglement between qubit |dq and register |A by applying the Toffoli gate to disentangle it. 6) Step 6: Remove the effect of the first step by applying a set of n CN OT gates between each qubit of the bus register |qy as a control qubit and the corresponding qubit in the register |A as a target qubit. Then, a set of n quantum-NOT gates are applied on the qubits of register |A individually.

IV. EXPERIMENTAL REALIZATION OF THE PROPOSED QRAM
To verify the QRAM practically, we will conduct some experiments for writing and reading classical values in the proposed QRAM using the Javantum simulator. First, to simulate the writing process of the proposed QRAM, let us assume that there is an application that performs some tasks using four variables x, y, u, and z. Also, let us assume that this application requires assigning the value 7 (111 in binary) to variable x (that has the address 00). As the number of variables is four, then 2 qubits are needed to address register |A . The simulation results of writing the binary value 111 in the address label 00 are shown in Fig. 2. In this bar chart, the green bars represent the theoretical results, and the red bars represent the Javantum simulator results. Fig. 2 shows that the simulation results are consistent with the theoretical results. Second, to simulate the reading process of the pro-    posed QRAM, we need to read the value of variable x (that has the address "00") that was written as 111. The simulation results of reading the binary value 111 from address label "00" are shown in Fig. 3. Fig. 3 shows that the simulation results match the theoretical results. Next, we will conduct some experiments for writing and reading quantum states in the proposed QRAM using the Javantum simulator. Third, suppose that it is essential to save state 1 2 |00 + 1 2 |11 in address label "00". The simulation results of writing state 1 2 |00 + 1 2 |11 in address label "00" are shown in Fig.  4. In this bar chart, the green histograms represent the theoretical results, and the red histograms represent the Javantum simulator results. Fig. 4 illustrates that the simulation results match the theoretical results. In the final experiment, it is necessary to read the superposition state, 1 2 |00 + 1 2 |11 , from address label "00". The simulation results of reading the superposition from address label "00" are given in Fig. 5. The figure shows that the simulations results match the theoretical results. Additionally, the statistical fidelity of the simulation results via the Javantum simulator, which is 0.999971, verify the consistency with the theoretical results (since the optimal fidelity is F = 1). Consequently, the results of the four mentioned experiments demonstrate that the proposed QRAM is efficient as a primary memory for quantum computers and can be implemented via different quantum computer platforms. The abovementioned experiments indicate that the proposed QRAM is more efficient than FF-QRAM [20] because it has a fixed structure; uses well-known quantum gates, namely, NOT, CNOT, CCNOT, Toffoli and controlledcontrolled-swap gates; and is data independent. In addition, the proposed QRAM does not need qutrit, so it is more efficient to implement via different quantum computer platforms compared with bucket brigade QRAM [18]. Moreover, the complexity of the proposed QRAM calls is O(1) compared with bucket brigade QRAM [18] and FF-QRAM [20], which have O(n) calls and O(M n) calls, respectively. Hence, the proposed QRAM is faster than other state-of-the-art models. As a result, the superiority of the proposed QRAM is remarkable compared to the existing QRAMs [18], [20].

V. CONCLUSION
In this paper, we proposed a novel QRAM circuit with a fixed structure that can be used to handle reading and writing processes and access arbitrary locations among 2 n locations in O(1). Additionally, it can write data independently and can be used to store both known/unknown classical/quantum data. Moreover, it is proposed based on well-known quantum gates, such as NOT, CNOT, CCNOT, Toffoli, and controlledcontrolled-swap gates. In addition, it can be applied to a variety of quantum qubit-based platforms. Finally, the new QRAM is simulated in a quantum computer simulator with a statistical fidelity of 0.999971. MOHAMMED ZIDAN is an assistant professor with the Faculty of Computing and Artificial Intelligence in Hurghada, Egypt, and the Faculty of Engineering, King Salaman International University. He worked at Zewail University of Science and Technology from 2016-2020. Additionally, he joined the Photonic and Smart Materials Center at Zewail City as a postdoc researcher in 2020. Furthermore, he was a research consultant with the Faculty of Engineering, Abu Dhabi University, UAE. He has published many high impact papers in international peerreviewed journals. He is a reviewer for several international journals in quantum computing and applied mathematics. He is a member of the Egyptian Mathematical Society. His research interests are mainly quantum computing, quantum artificial intelligence, robots and quantum technologies. His Ph.D. study was supported by a scholarship from Universiti Teknologi Petronas. In 2015, he received the Sultana Nahar's Prize for the best Ph.D. thesis in Egypt. In 2017, he received a scholarship as a visiting researcher with the University of Oxford, U.K. In 2017, has been elected as a junior associate member at the African Academy of Science, Kenya. He is especially focused on theories of quantum measurement, nanomechanical modeling, highly nonclassical light, practical information security, and the optical implementations of quantum information tasks. His current research interests include quantum resources, optical and atomic implementations of quantum information tasks and protocols, quantum computing, mathematical modeling, computational intelligence, and machine learning. He has authored or coauthored more than 120 articles in ISI journals, four book chapters and ten papers in conference proceedings indexed by Scopus and ISI. He is acting as a managing editor of some journals, such as Information Sciences Letters (Scopus), Quantum Physics Letters, and the International Journal of New Horizons in Physics.
ASHRAF KHALIL is a professor at the College of Technological Innovation at Zayed University, United Arab Emirates. Prof. Khalil has a PhD in Computer Science from Indiana University, USA and has published notable research on ubiquitous computing, social and mobile computing, bioinformatics, persuasive computing, and human computer interaction. The results of his research have been published through the top conferences in the field such as CHI, CSCW, and INTERACT. He has authored over 50 publications in top journals and conferences and achieved numerous accolades including many research grants from ADEK, the Emirates Foundation, and Google. Previously, Prof. Khalil, served as a usability consultant for major companies such as Nokia, HSBC, Samsung and Microsoft. Prof. Khalil is interested in applying diverse technological innovations to address pertinent problems. VOLUME 4, 2016