Quantum Preference Query

Hao Liu,Xiaotian You,Raymond Chi-Wing Wong
2024-05-31
Abstract:Given a large dataset of many tuples, it is hard for users to pick out their preferred tuples. Thus, the preference query problem, which is to find the most preferred tuples from a dataset, is widely discussed in the database area. In this problem, a utility function is given by the user to evaluate to what extent the user prefers a tuple. However, considering a dataset consisting of N tuples, the existing algorithms need O(N) time to answer a query, or need O(N) time for a cold start to answer a query. The reason is that in a classical computer, a linear time is needed to evaluate the utilities by the utility function for N tuples. In this paper, we discuss the Quantum Preference Query (QPQ) problem, where the dataset is given in a quantum memory, and we use a quantum computer to return the answers. Due to quantum parallelism, the quantum algorithm can theoretically perform better than their classical competitors. We discuss this problem in different kinds of input and output. In the QPQ problem, the input can be a number k or a threshold theta. Given k, the problem is to return k tuples with the highest utilities. Given theta, the problem is to return all the tuples with utilities higher than theta. Also, in QPQ problem, the output can be classical (i.e., a list of tuples) or quantum (i.e., a superposition in quantum bits). We proposed four quantum algorithms to solve the problems in the above four scenarios. We analyze the number of memory accesses needed for each quantum algorithm, which shows that the proposed quantum algorithms are at least quadratically faster than their classical competitors. In our experiments, we show that to answer a QPQ problem, the quantum algorithms achieve up to 1000x improvement in number of memory accesses than their classical competitors, which proved that QPQ problem could be a future direction of the study of preference query problems.
Databases
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: efficiently finding the user's most - preferred tuples in large - scale datasets. Specifically, the traditional preference query problem requires linear time \(O(N)\) on a classical computer to calculate the utility values of all tuples and return the most - preferred tuples. However, when the dataset is very large, this linear - time complexity will lead to problems of efficiency and scalability. To solve this problem, the paper introduces the concept of Quantum Preference Query (QPQ). QPQ takes advantage of the strengths of quantum computers, especially quantum parallelism and amplitude amplification techniques, and can theoretically handle preference query problems more efficiently than classical algorithms. Specifically: 1. **Quantum parallelism**: A quantum computer can process multiple states simultaneously, so it can calculate the utility values of all tuples in a single step. 2. **Amplitude amplification**: Through the amplitude amplification technique in quantum algorithms, the tuple with the highest utility value can be found more quickly. The paper discusses two input types: - Given an integer \(k\), return the \(k\) tuples with the highest utility values (called QPQ\(_k\)). - Given a threshold \(\theta\), return all tuples with utility values higher than \(\theta\) (called QPQ\(_\theta\)). In addition, the paper also considers two output types: - **Classical output**: Return a classical list containing the most - preferred tuples. - **Quantum output**: Return a qubit superposition state representing all the most - preferred tuples. Based on the above settings, the paper proposes four quantum algorithms to solve the QPQ problem in different scenarios, and verifies through experiments the significant advantages of these quantum algorithms in terms of the number of memory accesses, which can be up to 1000 times faster than classical algorithms. In summary, this paper aims to use the advantages of quantum computing to significantly improve the efficiency of preference queries, thereby solving the efficiency bottleneck problem of classical algorithms on large - scale datasets.