Hasso-Plattner-Institut
Prof. Dr. Tilmann Rabl
 

Quantum Computing for Database Systems

Introduction

Prof. Dr. Stefanie Scherzinger from the University of Passau presented this lecture on quantum computing for database systems as part of the Database Research 2025 lecture series. Her research focuses on database systems, query optimization, and data integration, with recent work exploring the intersection of quantum computing and databases. She has worked on several papers and tool demonstrations that apply quantum approaches to classical database problems including join-order optimization, multi-query optimization, and schema matching. These works have appeared at major venues like SIGMOD, VLDB, PODS, and ICDE. The lecture provides an in-depth yet critical examination of quantum computing for database systems, combining practical research findings with honest expectation management about what is currently possible and what might be achievable in the future.
This summary is based on her lecture material and explores the potential of quantum computing for database systems as presented [1].

Motivation: Why Quantum Computing for Database Systems?

Database systems routinely solve computationally expensive optimization problems as part of their core functionality. Every time a query is submitted, the system must decide how to execute it: which join orders to consider, which indexes to exploit, and how to schedule operations to minimize latency and resource usage. These decisions are calculated under time constraints, yet they often correspond to complex combinatorial optimization problems whose search spaces grow exponentially with query size or workload complexity.

Quantum computing enters this landscape as a potential co-processor for the hardest combinatorial cores of these tasks. Quantum hardware is particularly well suited to exploring large discrete search spaces and solving certain classes of optimization problems. If such devices could be used to efficiently generate high-quality solutions, even for restricted problem instances, they could complement classical optimizers by expanding the set of plans that can be considered within practical time bounds.

Background and Technical Foundations

QUBO Formulation

QUBO (Quadratic unconstrained binary optimization) describes a mathematical formulation for expressing a variety of combinatorial optimization and decision problems. The objective is to minimize or maximize a quadratic polynomial. Therefore, three key characteristics must hold: All variables must be binary. QUBO has no explicit constraints. Instead, constraints are modeled as penalty terms added to the objective. Penalty weights must be chosen carefully, since, they should be large enough to discourage invalid solutions, but not so large that they falsify the optimization landscape.

Quantum Hardware Backends

Two main types of quantum hardware are relevant for database applications. Quantum annealers (e.g., from D-Wave) are special-purpose devices aimed at finding minima in energy landscapes and are often accessed through QUBO formulations. Gate-based Quantum Processing Units (so called QPUs, e.g., from IBM, Google, Rigetti) operate with quantum circuits and are universal. In principle, they can implement more general quantum algorithms and can emulate annealing-like behavior via algorithms such as QAOA (Quantum Approximate Optimization Algorithm).

The overarching objective is to identify which database problems might benefit from quantum hardware, to explain the software and modeling steps required to formulate such problems for quantum backends. Furthermore, early case studies are highlighted where quantum approaches have been explored.

While quantum hardware is becoming increasingly available, significant limitations persist: small numbers of qubits, high error rates, and substantial access latencies and high costs for cloud-based systems. The database community must therefore identify specific problem instances where quantum hardware can be meaningfully applied. Rather than expecting straightforward speedups, research focuses, among others, on the following three key questions:

  • Which database subproblems are suitable for QPUs?
  • How can these problems be mapped into quantum-ready models, notably QUBO?
  • Can quantum-assisted solutions provide qualitatively different trade-offs that justify the additional complexity?

Methodology: Hybrid Quantum-Classical Workflows

Central Concept: QPUs as Co-Processors

Rather than trying to run entire DBMS tasks on a QPU, the proposed pattern is to identify computationally hard subproblems (NP-hard or otherwise expensive) that:

  • can be compactly encoded as QUBOs
  • are small enough for today's QPUs
  • yield results that are cheap to verify classically

 

The 3-Stage Hybrid Workflow

The integration of QPUs into a hybrid workflow involves three main stages:

Figure adapted from Prof. Dr. Stefanie Scherzinger's lecture slide 16: 3-Stage Approach.

  1. Preprocessing on classical hardware:
    Translate the domain problem into a QUBO model. This step often includes variable encoding (binary vectors), computing penalty weights for constraints, and reducing or simplifying the problem to fit the device.
  2. Computation on QPU:
    Submit the QUBO problem to a quantum annealer or convert it into a gate-based formulation (for QAOA or other variational algorithms) and run multiple anneals or shots. In relation to the whole workflow, this is often the smallest step, as QPUs are used for quick explorations of the solution space rather than exhaustive searches.
  3. Postprocessing on classical hardware:
    Evaluate candidate solutions, perform verification, possibly apply greedy refinement, and select the best-feasible solution. QPUs tend to return approximate or noisy solutions, hence, postprocessing is often required to enforce feasibility and improve quality.

A concrete example of the 3-stage hybrid workflow using a quantum annealer is illustrated in the figure below.

Sample Workflow with Quantum Annealer

Figure adapted from Prof. Dr. Stefanie Scherzinger's lecture slide 18: Sample Workflow with Quantum Annealer.

To solve an optimization problem using a quantum annealer, the process begins with preprocessing and encoding the problem into QUBO format. After this step is completed, the QUBO model is submitted to the quantum annealer for processing it multiple times, if specified, to generate many candidate bitvector solutions. These results then are post-processed and verified classically to select the best fitting solution. Summarizing, the quantum annealer is most suitable for such small-to-encode optimization problems with high classical complexity, where the solutions can be efficiently verified.

Example: Encoding Graph 3-Coloring as a QUBO problem

As a concrete example, consider the graph 3-coloring problem: each node of a graph must be assigned exactly one of 3 colors (e.g., blue, green, yellow), such that adjacent nodes do not share the same color.

Binary variables xv,c ∈ {0,1} are introduced, where xv,c = 1 if node v is assigned color c. For the 3-coloring problem, two types of constraints must be enforced:

  • One color per node:
    Enforced by a penalty term P(xv,b + xv,g + xv,y − 1)2, which penalizes nodes with zero or multiple colors.
  • Different colors for neighbor nodes:
    For each edge (u,v) and color c, add P·xu,c·xv,c, which penalizes assigning the same color to both endpoints.

The resulting QUBO objective is the sum of all penalty terms. Minimizing this quadratic function yields a valid 3-coloring if one exists.

Main Results and Use Cases

Join Order Optimization

Join order optimization is a critical and difficult topic in database systems, as finding an ideal join order is NP-hard and slight changes in associativity can result in significantly different execution costs. Collaborative work reformulates this problem step by step: first as a mixed-integer linear program, then reduced to a binary integer program, and finally expressed as a QUBO model that can be run on a quantum annealer [2][3]. The approach focuses on left-deep join trees while supporting joins and cross-products.

Experiments using a D-Wave quantum annealer assess various query graph shapes with three to five relations. Although only a small percentage of annealing runs result in valid or optimal plans, the system consistently discovers at least one high-quality solution. Results also demonstrate that extended annealing durations enhance solution quality, though scaling to larger queries remains beyond current quantum hardware capabilities.

Multi-Query Optimization (MQO)

MQO addresses the problem of selecting one execution plan per query to minimize total cost while taking advantage of shared computation between queries. This NP-hard problem can be formulated as a QUBO problem by using one binary variable per candidate plan and encoding selection constraints, execution costs, and sharing benefits into a single objective. Research has shown that this approach works on both quantum annealers and gate-based systems [4][5]. Therefore, it is providing a practical example of how quantum methods can support query optimization tasks.

Data Integration and Schema Matching

Data integration through schema matching seeks to align attributes across heterogeneous data sources. This process typically includes local matching to calculate attribute similarities and global matching to identify a consistent overall correspondence, which is computationally complex and can be reduced to the stable marriage problem.

Research on global schema matching uses a QUBO formulation of the stable marriage problem, resulting in a proof-of-concept system demonstrated at VLDB [6][7]. The challenges of handcrafted QUBO models, their complexity and limited debuggability are discussed, and ongoing work extends the approach to more generic matching scenarios (1:N and N:1 mappings) and investigates QAOA-based solutions on gate-based quantum computers. These extensions address problem variants that are provably NP-complete.

From In Vitro Experiments to System Integration

Many early quantum database studies remain "in vitro" separated from real-world database management systems. Integrating quantum-optimized plans into production DBMSs represents a significant step forward. Recent work, including a VLDB demonstration by Ibrahim Sabek and colleagues, incorporates quantum-optimized join orders into PostgreSQL and directly compares them to native optimizer-generated plans [8][9]. This signals a shift from abstract optimization problems to system-level evaluation and indicates where future research can advance.

Summary and Open Challenges

Classical optimization for complex queries joins, and workloads operates often near its limits in current database systems. The lecture explored how quantum annealers and gate-based QPUs can act as co-processors for hard combinatorial subproblems through a 3-stage hybrid workflow using QUBO formulations. A practical workflow applicable to join-order optimization, MQO, and schema matching was presented, demonstrating how QUBO modeling techniques with penalty encodings can be applied to database problems. The graph 3-coloring example illustrated concrete encoding strategies that showcase how constraints are transformed into penalty terms. Proof-of-concept experiments on small instances show that quantum approaches can yield valid and diverse solutions. QUBO offers a uniform modeling framework for many NP-hard database problems and enables the access to both quantum annealers and gate-based QPUs that support algorithms such as QAOA.
Databases contain high-impact optimization tasks where even small quantum gains may provide meaningful value, and the hybrid approach allows classical preprocessing and postprocessing to complement quantum computation, making near-term applications more feasible.
However, significant research challenges remain. Integration questions persist about embedding QPUs into DBMS stacks, including APIs, scheduling, and cost models. Scalability remains critical, with open questions about co-design opportunities for larger problem instances. The nondeterministic nature of quantum optimizers presents management challenges—a concern shared with ML-based approaches—requiring new strategies for predictability and debuggability. Finally, meaningful benchmarking frameworks are needed to measure end-to-end benefits including latency, cost, and verification overhead.

Closing Note

Research into quantum computing for databases is still in its early stages. Most experiments remain small-scale and are conducted outside real systems, with significant challenges persisting in system integration, CPU-QPU scheduling, and handling nondeterministic optimizers. Nevertheless, cautious optimism is maintained, drawing parallels with early GPU and FPGA work for databases and arguing that the impact of a new technology can take years to become apparent. Even if quantum-accelerated databases are not yet practical, the research produces valuable insights, including improved classical formulations inspired by quantum models. With commercial QPU access expanding and database optimization needs growing, this intersection offers promising potential for impactful research and experimentation that may shape the next generation of database systems.

References

  • [1] Scherzinger, S. (2025). Quantum Computing for Database Systems. Lecture Series on Database Research, Winter Semester 2025/26.
  • [2] Trummer, I., & Koch, C. (2017). Solving the join ordering problem via mixed integer linear programming. In Proceedings of the 2017 ACM International Conference on Management of Data (SIGMOD '17).
  • [3] Schönberger, M., Scherzinger, S., & Mauerer, W. (2023). Ready to leap (by co-design)? Join order optimization on quantum hardware. In Proceedings of the 2023 ACM International Conference on Management of Data (SIGMOD '23).
  • [4] Schönberger, M., Scherzinger, S., & Mauerer, W. (2022, April). Applicability of quantum computing on database query optimization (Poster presentation). Frühjahrstreffen Fachgruppe Datenbanken, Potsdam, Germany.
  • [5] Fankhauser, T., Solèr, M. E., Füchslin, R. M., & Stockinger, K. (2023). Multiple query optimization using a gate-based quantum computer. IEEE Access, 11, 114031–114043. https://doi.org/10.1109/ACCESS.2023.3322819
  • [6] Gerlach, L., Köppl, T., Scherzinger, S., Schweikardt, N., & Zander, R. (2025). A quantum-leap into schema matching: Beyond 1-to-1 matchings. In Proceedings of the 44th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems (PODS '25).
  • [7] Fritsch, K., & Scherzinger, S. (2023). Solving hard variants of database schema matching on quantum computers. Proceedings of the VLDB Endowment, 16(12): Tool Demo.
  • [8] Liu, H., Kumar, A., Spedalieri, F. M., & Sabek, I. (2025). Hybrid quantum-classical optimization for bushy join trees. In Proceedings of the 2025 ACM SIGMOD Workshop on Quantum Data Management (Q-DATA@SIGMOD 2025).
  • [9] Liu, H., Spedalieri, F. M., & Sabek, I. (2025). A demonstration of Q2O: Quantum-augmented query optimizer. In Proceedings of the VLDB 2025 Conference (VLDB 2025 Demo).

Acknowledgments

Authors: Louis Dzidzor Agbedor and Leander Sömisch
Course: Lecture Series on Database Research, Winter Semester 2025/26
December 2025