QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Winker, Tobias, Groppe, Jinghua, Groppe, Sven
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911148205408256
author Winker, Tobias
Groppe, Jinghua
Groppe, Sven
author_facet Winker, Tobias
Groppe, Jinghua
Groppe, Sven
contents Cardinality estimation is an important part of query optimization in DBMS. We develop a Quantum Cardinality Estimation (QCardEst) approach using Quantum Machine Learning with a Hybrid Quantum-Classical Network. We define a compact encoding for turning SQL queries into a quantum state, which requires only qubits equal to the number of tables in the query. This allows the processing of a complete query with a single variational quantum circuit (VQC) on current hardware. In addition, we compare multiple classical post-processing layers to turn the probability vector output of VQC into a cardinality value. We introduce Quantum Cardinality Correction QCardCorr, which improves classical cardinality estimators by multiplying the output with a factor generated by a VQC to improve the cardinality estimation. With QCardCorr, we have an improvement over the standard PostgreSQL optimizer of 6.37 times for JOB-light and 8.66 times for STATS. For JOB-light we even outperform MSCN by a factor of 3.47.
format Preprint
id arxiv_https___arxiv_org_abs_2509_08817
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction
Winker, Tobias
Groppe, Jinghua
Groppe, Sven
Quantum Physics
Artificial Intelligence
Databases
Machine Learning
Cardinality estimation is an important part of query optimization in DBMS. We develop a Quantum Cardinality Estimation (QCardEst) approach using Quantum Machine Learning with a Hybrid Quantum-Classical Network. We define a compact encoding for turning SQL queries into a quantum state, which requires only qubits equal to the number of tables in the query. This allows the processing of a complete query with a single variational quantum circuit (VQC) on current hardware. In addition, we compare multiple classical post-processing layers to turn the probability vector output of VQC into a cardinality value. We introduce Quantum Cardinality Correction QCardCorr, which improves classical cardinality estimators by multiplying the output with a factor generated by a VQC to improve the cardinality estimation. With QCardCorr, we have an improvement over the standard PostgreSQL optimizer of 6.37 times for JOB-light and 8.66 times for STATS. For JOB-light we even outperform MSCN by a factor of 3.47.
title QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction
topic Quantum Physics
Artificial Intelligence
Databases
Machine Learning
url https://arxiv.org/abs/2509.08817