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