Hybrid Quantum-Classical Protocol for Storage and Retrieval of Discrete-Valued Information

In this paper we present a hybrid (i.e., quantum-classical) adaptive protocol for the storage and retrieval of discrete-valued information. The purpose of this paper is to introduce a procedure that exhibits how to store and retrieve unanticipated information values by using a quantum property, that of using different vector space bases for preparation and measurement of quantum states. This simple idea leads to an interesting old wish in Artificial Intelligence: the development of computer systems that can incorporate new knowledge on a real-time basis just by hardware manipulation.


Introduction
Theoretical computer science is a branch of modern mathematics that, in its canonical form, does not take into account the physical properties of those devices used for information processing.This characteristic could be perceived as a drawback because the behavior of any physical device used for computation must ultimately be predicted by the laws of physics.Consequently, several research approaches have concentrated on thinking of computation in a physical context (e.g., [1][2][3][4][5][6][7][8][9][10][11]), being the rationale behind this approach that the concepts of information and computation can and must be built upon physical principles.Quantum computation, one of the most recent joint ventures between physics and computer science, is a promising branch of science and technology devoted to the development of algorithms and experimental devices that allow us to exploit the quantum effects of physical systems, in order to perform simulations and calculations.Quantum computing promises great advances in the solution of some problems for which we know no efficient algorithms under the classical computer models and systems we currently have (e.g., [12][13][14][15][16].) Among the theoretical discoveries and promising conjectures that have positioned quantum computation as a key element in modern science, we find: (1) the development of novel and powerful methods of computation that may allow us to significantly increase our processing power for solving certain hard problems [12][13][14][15][17][18][19][20][21][22][23]; (2) the simulation of complex physical systems [5,24,25]; and (3) an increased interest of several applied scientific communities to cross-fertilize their own fields with techniques and ideas from this discipline (e.g., image processing and computational geometry [26][27][28][29][30][31][32][33][34][35][36], pattern recognition [37][38][39][40], quantum games [41], and warfare [42]).A detailed summary of scientific and technological applications of quantum computers can be found in [43,44].
The use of vector spaces for the description of quantum systems is a departure point to understand the power of quantum computation and quantum information [12,45].We have become interested in studying how to use the representation of vectors in several bases together with the projection of such vectors into disjoint subspaces for information processing purposes.In physical terms, we want to analyze how information can be stored and extracted by using several vector bases for multiple qubit state preparation and measurement.Our motivation comes from the following statements: (1) The preparation and measurement of quantum states are essential activities in quantum information processing.In this context, quantum state preparation depends on the characteristics of the information we want to store.Information retrieval from quantum states depends on what we want to learn from the quantum system, i.e., which physical properties of the quantum states used to store information we are prepared to measure.(2) The potential use of quantum mechanical systems in disciplines like machine learning and artificial intelligence is an exciting research field with open opportunities for scientists, engineers and society at large (an example of the flourish of this emergent blend of physics and computation can be found in [46].)In those two disciplines, the priority and importance of certain pieces of information is largely related to the context such pieces are released into.Also, it is usually the case in machine learning and artificial intelligence that new and unanticipated information values have to be processed.Examples of concrete problems in which processing unanticipated data is relevant are: • Natural language processing.Languages are living and vibrant entities.The cultural heritage of human language allows us not only to accurately describe our past and the world we live in, but also to create words in order to draft descriptions of new realities.Those new realities are highly diverse and depend on many factors.For example, slang used in a rough area in Mexico City makes little sense in terms of the formal use of the Spanish language; however, this slang makes perfect sense when analyzed in terms of creativity, local state of affairs, and the problems and challenges people from that area live on a daily basis.
A key challenge for natural language processing is to make computers able to understand both formal and vernacular uses of human language.Vernacular language is very difficult to tackle because it is usually ambiguous and also because new words are frequently created on-the-go, i.e., just a spontaneous result of human creativity [47].In order to make computers capable of processing vernacular expressions, we need to be able to store (and process, later on) new information and its context.• Robotics.Robot navigation in arbitrary environments.Robots are very useful machines when working on either dangerous activities or boring chores.In many dangerous situations, like exploring an explosive environment, identifying humans in natural disasters or performing specific activities in unstable nuclear sites, robots must be able to adapt themselves to the environment they are immersed into if they are to remain useful.In other words, robots must be able to learn quickly and, to do so, they need information storage hardware and software capable of incorporating new data into their information processing system.
A concrete example would be to identify survivors trapped in collapsed buildings after an earthquake.In this situation, a robot needs to quickly learn many new situations.In this case, a system capable of incorporating unanticipated data would be useful to rescue trapped humans [48].• Finance.Understanding the behavior and the nature of financial markets, like the stock market, remains a challenging task for contemporary scientists, mathematicians and engineers.In fact, our understanding of most complex systems is rather limited due to the lack of consistent and comprehensive mathematical models.Moreover, computer simulators of financial systems need to be constantly improved as new correlations and causal relationships are found during the analysis of such financial systems.
In all cases, having a protocol that incorporates new information in real time would be beneficial to the users.In addition to our protocol, using techniques and computational devices produced with quantum technology could provide key advantages, like computational speed-up, to researchers working on those areas mentioned above.
The qualitative notion of storing and reading unanticipated information in terms of the context such information belongs to has led us to the development of a hybrid (quantum-classical) adaptive protocol for information storage and retrieval.The protocol is hybrid because we use both quantum and classical computational resources.Moreover, the protocol is adaptive in the sense that it is possible to store and retrieve information values that were not expected by the users of this protocol.We have designed our protocol having in mind a readership composed not only of scientists working on quantum computation and quantum information, but also a wider audience composed of applied computer scientists as well as computer and software engineers interested in learning about new quantum-mechanical tools and strategies that may be useful in their field of expertise.Hence, in this paper we focus on new ways of using quantum systems for computational purposes, not on computational complexity issues.
In the following section we present the hybrid adaptive protocol we have designed, followed by pour conclusions.Moreover, in Appendix A, we present our protocol in practice, i.e., as an example, we run our protocol with concrete data.A full introduction to the mathematical structure of quantum mechanics amenable to computer scientists and computer/software engineers can be found in several sources, among them [12,19,23,[49][50][51].

Hybrid Quantum-Classical Protocol
Initially, our protocol is expected to store and retrieve values from a set composed of 2 n different input values.Moreover, as unexpected data may reach us, we may need to store and retrieve more input values in real time.Our strategy includes the use of several vector bases to store additional input values in quantum data registers |Φ .Those vector bases consist of rotations of the computational basis of the Hilbert space H 2 n .We use a classical list L to remember which rotation angles, i.e., which vector bases, have been used.
Let us begin by providing a list of components and corresponding initial conditions for our storage and retrieval algorithms.As a second step, we present two algorithms, one for information storage and another for information retrieval.In the following, we assume that the computer we work with is a hybrid machine, partly classical and partly quantum.
The components and initial conditions of our protocol are: • A = {a 0 , a 1 , . . ., a 2 n −1 } = {a i |i ∈ {0, 1, . . ., 2 n − 1}} is an ordered set (e.g., a list) that originally contains 2 n different classical data to be stored in our hybrid protocol.The original 2 n elements of A are known in advance by protocol users (for example, these data could be some color values used in a digital image processing system.)As unexpected information becomes available to protocol users, it will be added to A (details to be provided in the storage algorithm that follows.)Please note that the elements of A are ordered in terms of index i, i.e., the actual value of a i is independent from the order provided by index i.

• The canonical basis of H
B will be used to build the quantum data registers that will be employed to store the contents of A. • R = {θ 1 , θ 2 , . . ., θ r } = {θ β |β ∈ {1, 2, 3, . . ., r}} is a set of allowed rotation angles for basis vectors from B. These angles shall be used to store unanticipated data in our protocol.
Please note that we could either have a predefined list of angles or, alternatively, a dynamically generated list.The choice depends of the technology used to implement our protocol and/or on the preferences of protocol users.Our protocol would be invariant with respect to that choice.• m quantum data registers |Φ γ , where γ ∈ {0, 1, . . ., m − 1}, being each register of size p and initialized as |0 p , i.e., • A table (i.e., a classical data structure with several fields) L composed of the following fields: [data index (i.e., index i)|angle value|quantum data register (i.e., index γ)].Initial conditions are: data index runs from 0 to 2 n − 1 (i.e., the number of classical data originally stored in A), angle value is 0 (as B suffices to store 2 n values) and quantum data register index runs from 0 to 2 n − 1. • p ancilla qubits |ζ η , η ∈ {0, 1, 2, . . ., p − 1}.Ancilla qubits |ζ η will be used as intermediaries to store the binary representation of input values into the quantum data registers.• The following operators (also expressed in matrix form): The Ĉnot operator After some calculations, it can be seen that the set B θ = {|00 θ , |01 θ , |10 θ , |11 θ } is an orthonormal basis of H 2 n .Let us now introduce the operator Ĉnot θ : where |ij θ ij| is shorthand for |ij θ θ ij|, i.e., |ij θ ij| = |ij θ θ ij|.
Let us now define a rotated basis B θ for Hilbert space H 2 using the rotation operator Ry (θ): After some calculations, it can be seen that Ĉnot θ behaves as expected for qubits initialized using basis B θ :

Information Storage Algorithm
The purpose of this algorithm is to store input values by preparing quantum data registers in one of several possible vector bases.The algorithm allows new and unanticipated input values to be stored in a quantum data register by applying the rotation operator (Equation ( 4)) to the canonical vector basis B (Equation ( 1)), for a certain angle value θ β .
For each quantum register composed of p qubits, it can be easily seen that we have 2 p fully distinguishable p-qubit states and, therefore, one out of 2 p possible data values can be stored in the quantum register, each of those data values with retrieval probability equal to 1.For example, given the computational basis {|0 , |1 } of a 2-dimensional Hilbert space H 2 and a quantum register |Φ composed of p qubits, then we have 2 p fully distinguishable states for |Φ : |000...00 , . . ., |111...11 and, consequently, we can store any value a i from the set A = {a 0 , a 1 , ... . . ., a 2 p −1 }.Now, let us suppose that a new and unexpected value, not contained in the original set A, has reached our system and we need to store it in |Φ .Then, by performing a rotation of θ β degrees on the canonical basis, our protocol changes the basis for the Hilbert space in which the p-qubit quantum data register lives and uses the new basis to store the unexpected value.Convert d into a binary number using function F (Equation ( 5)): Initialize p ancillary qubits |ζ η , η ∈ {0, 1, 2, . . ., p − 1} using the following rule: Take a free quantum data register |Φ γ = p−1 δ=0 |ψ γ,δ = p−1 δ=0 |0 γ,δ (Equation ( 2)).Read the last value in A, let us denote it by a k . 12: Make a k+1 = d 13: Convert a k+1 into a binary number using function F (Equation ( 5)) Compute the following numbers:  Initialize p ancillary qubits |ζ η , η ∈ {0, 1, 2, . . ., p − 1} using the following rule: Take a free quantum data register |Φ γ = p−1 δ=0 |0 γ,δ (Equation ( 2)) and initialize each |ψ γ,δ using the following rule: 24: Store a k+1 in |Φ γ by repeatedly using the following gate: Let us now suppose that our protocol is fed with the following input data, in this precise order: 1, 2, 3, 4, 6: Step Finally, L is updated: Data Index Angle Quantum Data Register After some calculations, it can be seen that the probability of getting measurement outcome s 4 is equal to one, i.e., P (s 4 ) = 1 and, consequently, P (s k ) = 0 ∀k ∈ {0, 1, . . .15} − {4}.Moreover, postmeasurement state |Φ pm = |0100 .

15 :
Quo = integer quotient of #(A) divided by 2 n Quo from set R and make θ = θ Quo 19: