Table of Contents
Fetching ...

First Tree-like Quantum Data Structure: Quantum B+ Tree

Hao Liu, Xiaotian You, Raymond Chi-Wing Wong

TL;DR

The paper proposes the first tree-like quantum data structure, the quantum B+ tree, to support quantum range queries that return results as superpositions. By storing a classical B+ tree in QRAM with a concise quantum replica, it enables a hybrid GCLQ algorithm that achieves $O\left(\log_B N\right)$ static range-query time, independent of the output size $k$, and extends to dynamic $O\left(\log_B^2 N\right)$ and $d$-dimensional $O\left(\log_B^d N\right)$ queries. The approach uses two QRAMs to separately store hierarchy and data, and couples a global classical search with a local quantum search plus post-selection to realize efficient queries. Experimental results on large real-world datasets indicate up to $1000\times$ memory-access improvements over classical structures, demonstrating significant practical potential for quantum-accelerated database queries.

Abstract

Quantum computing is a popular topic in computer science, which has recently attracted many studies in various areas such as machine learning and network. However, the topic of quantum data structures seems neglected. There is an open problem in the database area: Can we improve existing data structures by quantum techniques? Consider a dataset of key-record pairs. Given an interval as a query range, a classical B+ tree can report all the records with keys within this interval, which is called a range query, in O(log N + k) time, where N is the total number of records and k is the output size. It is asymptotically optimal in a classical computer but not efficient enough in a quantum computer, because it is expected that the execution time and the output size are linear in a quantum computer. In this paper, we propose the quantum range query problem. Different from the classical range queries, a quantum range query returns the results in quantum bits, which has broad potential applications due to the foreseeable advance of quantum computers and quantum algorithms. To the best of our knowledge, we design the first tree-like quantum data structure called the quantum B+ tree. Based on this data structure, we propose a hybrid quantum-classical algorithm to do the range search. It answers a static quantum range query in O(log_B N) time, which is asymptotically optimal in quantum computers. Since the execution time does not depend on the output size (i.e., k, which could be as large as O(N)), it is significantly faster than the classical data structure. Moreover, we extend our quantum B+ tree to answer the dynamic and d-dimensional quantum range queries efficiently in O(log^2_B N) and O(log^d_B N) time, respectively. Our experimental results show that our proposed quantum data structures achieve up to 1000x improvement in the number of memory accesses compared to their classical competitors.

First Tree-like Quantum Data Structure: Quantum B+ Tree

TL;DR

The paper proposes the first tree-like quantum data structure, the quantum B+ tree, to support quantum range queries that return results as superpositions. By storing a classical B+ tree in QRAM with a concise quantum replica, it enables a hybrid GCLQ algorithm that achieves static range-query time, independent of the output size , and extends to dynamic and -dimensional queries. The approach uses two QRAMs to separately store hierarchy and data, and couples a global classical search with a local quantum search plus post-selection to realize efficient queries. Experimental results on large real-world datasets indicate up to memory-access improvements over classical structures, demonstrating significant practical potential for quantum-accelerated database queries.

Abstract

Quantum computing is a popular topic in computer science, which has recently attracted many studies in various areas such as machine learning and network. However, the topic of quantum data structures seems neglected. There is an open problem in the database area: Can we improve existing data structures by quantum techniques? Consider a dataset of key-record pairs. Given an interval as a query range, a classical B+ tree can report all the records with keys within this interval, which is called a range query, in O(log N + k) time, where N is the total number of records and k is the output size. It is asymptotically optimal in a classical computer but not efficient enough in a quantum computer, because it is expected that the execution time and the output size are linear in a quantum computer. In this paper, we propose the quantum range query problem. Different from the classical range queries, a quantum range query returns the results in quantum bits, which has broad potential applications due to the foreseeable advance of quantum computers and quantum algorithms. To the best of our knowledge, we design the first tree-like quantum data structure called the quantum B+ tree. Based on this data structure, we propose a hybrid quantum-classical algorithm to do the range search. It answers a static quantum range query in O(log_B N) time, which is asymptotically optimal in quantum computers. Since the execution time does not depend on the output size (i.e., k, which could be as large as O(N)), it is significantly faster than the classical data structure. Moreover, we extend our quantum B+ tree to answer the dynamic and d-dimensional quantum range queries efficiently in O(log^2_B N) and O(log^d_B N) time, respectively. Our experimental results show that our proposed quantum data structures achieve up to 1000x improvement in the number of memory accesses compared to their classical competitors.
Paper Structure (18 sections, 6 theorems, 9 equations, 8 figures)

This paper contains 18 sections, 6 theorems, 9 equations, 8 figures.

Key Result

lemma 1

The time complexity to answer a quantum range query is $\Omega(\log N)$.

Figures (8)

  • Figure 1: An Example of a Quantum B+ Tree where $N=14$ and $B=4$
  • Figure 2: Examples of Deletions
  • Figure 3: The Effect of $N$ on (a) & (b) Quantum Range Queries, (c) Multi-dimensional Range Queries (d) Dynamic Range Queries and (e) Insertions and Deletions into the Dynamic Data Structures
  • Figure 4: Effect of Selectivity and $B$ of (a) & (b) Quantum Range Queries and (c) & (d) Dynamic Quantum Range Queries
  • Figure 5: Effect of Selectivity and $B$ of Multi-dimensional Quantum Range Queries
  • ...and 3 more figures

Theorems & Definitions (10)

  • definition 1: Quantum Range Query
  • definition 2: Dynamic Quantum Range Query
  • definition 3: Multi-dimensional Quantum Range Query
  • definition 4: Quantum Random Access Memory (QRAM)
  • lemma 1
  • lemma 2
  • theorem 1
  • lemma 3
  • theorem 2
  • theorem 3