REVIEW 4 major objections 5 minor 36 references
QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction
T0 review · 4 major / 5 minor · reviewed 2026-08-04 · deepseek-v4-flash
Pith's one-line read A single variational quantum circuit can estimate and correct SQL join cardinalities using only n qubits for n tables, improving PostgreSQL's estimates by up to 8.66 times.
desk verdict Missing train/test split sinks the central quantitative claim, but the encoding and correction framework are worth a second look. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The compact query encoding: each table in the query is assigned one qubit, with the table id rotated around the x-axis and the combined selectivity rotated around the z-axis, producing 2n angles for n tables. The variational circuit uses 6 qubits and 16 layers of CY-gate encoding followed by parameterized RY and RZ gates. Several classical post-processing layers (linear, rational, threshold, place-value) translate the probability vector into a real cardinality or correction factor; for QCardCorr, the optimization target is the log ratio of true to estimated cardinality, making zero the neutral additive correction in log space.
What would settle it
Construct or select a benchmark where join cardinality is strongly driven by correlations between filter columns of different tables (e.g., two tables filtered on correlated attributes), run QCardEst/QCardCorr, and check whether the reported error reduction over PostgreSQL disappears or becomes worse than a simple product of single-table selectivities; this would show the 2n encoding is insufficient.
Extended reading notes
Core claim
The paper claims that a SQL query over n tables can be encoded into n qubits, with each table's id and its combined filter selectivity represented as rotation angles around different axes. A single variational quantum circuit processes this state, and a classical post-processing layer maps the measured probability vector to a cardinality value. In the correction mode, the circuit outputs a factor that multiplies an existing classical estimate; the paper shows this factor optimizes toward the ratio of true to estimated cardinality. Evaluated on JOB-light and STATS benchmarks, the best correction layer reduces mean logarithmic cardinality error by factors of 6.37 and 8.66 relative to PostgreSQ
Load-bearing premise
The approach's validity rests on the claim that every query can be reduced to one table id and one selectivity per table, with primary-foreign key join conditions ignored and all filters on a table collapsed into a single number — if a workload has correlated filters across tables, skewed join key distributions, or joins beyond PK-FK, the encoding loses information the model cannot recover.
Editorial extensions
If this is right
- Appending a variational-quantum-correction factor to an existing classical cardinality estimator (PostgreSQL) can reduce mean log-error by 6.37x on JOB-light and 8.66x on STATS.
- The n-qubit encoding makes it possible to process a complete multi-table query in a single circuit, potentially feasible on near-term quantum hardware.
- The correction approach is not tied to PostgreSQL; it can multiply the output of any classical cardinality estimator.
- On JOB-light, the corrected quantum estimator outperforms the learned classical estimator MSCN by 3.47x, suggesting quantum correction can beat dedicated learned models on some workloads.
- The classical post-processing layer plays a decisive role: only positive-valued layers (e.g., PlaceValue) can be used for correction without producing negative cardinalities, and the best layer differs between benchmarks.
Reading between the lines
- The paper does not isolate the quantum circuit's contribution: the same 2n-feature encoding fed to a classical neural network or regression model might achieve similar gains, so the improvement could be attributed to the feature representation rather than quantum computation (my inference).
- QCardCorr learns a multiplicative residual on top of a classical prior; if the classical estimator is already reasonable, the correction factor stays near 1, making the learning task simple — this may explain why the corrections appear large (my inference).
- A natural, testable extension is to add join-structure features (e.g., join key distributions or correlation flags) to the encoding, since the current encoding cannot capture correlated filter columns across tables or non-primary-foreign-key joins (my inference).
- The correction logic cannot fix a classical estimate of zero, since any multiplicative factor leaves zero at zero; an additive or hybrid correction could address this and remain a straightforward quantum-classical design (my inference).
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes two quantum machine learning approaches for cardinality estimation: QCardEst, which encodes a SQL query over n tables as 2n scalars into an n-qubit variational quantum circuit followed by a classical post-processing layer, and QCardCorr, which uses a VQC to output a multiplicative correction factor for a classical estimator (PostgreSQL). Nine classical output layers are compared. The authors report that QCardCorr improves over PostgreSQL by 6.37x on JOB-light and 8.66x on STATS, and outperforms MSCN by 3.47x on JOB-light. All experiments are performed with a quantum simulator (qiskit).
Significance. If the empirical claims held, the compact encoding and the correction framework would be a novel and potentially practical application of current quantum hardware to a core database problem. The paper usefully catalogs several classical post-processing layers and their value distributions, and it makes the code available. However, the evaluation protocol is underspecified, no held-out evaluation or error bars are reported, and the proposed encoding's information loss is unvalidated. As a result, the quantitative central claims are not currently supported.
major comments (4)
- [Section 5.1] No train/test split is described for either benchmark. The VQC is optimized for 8000 episodes over the workloads, and the reported mean error differences are then computed on the same queries. With 6 qubits, 16 layers, and learned classical scalars, the model has hundreds of parameters relative to only 70 (JOB-light) or 142 (STATS) queries, so the reported improvements may be in-sample memorization. The paper must specify how queries were partitioned, report metrics on held-out queries (e.g., via cross-validation), and ensure that PostgreSQL/MSCN baselines are evaluated on the same held-out queries. Without this, the abstract's strongest claims are unsupported.
- [Section 4.2] The correction target is t(q)/f(q), and the training objective is e(f(q)*g_x(q), t(q)), which is exactly e(t(q)/f(q), g_x(q)). The reported metric is the same error minimized during training. If all benchmark queries are used for training, the reported 6.37x/8.66x factors are measures of fitting quality, not predictive accuracy. A held-out evaluation is essential to distinguish the method from a lookup table on the training queries.
- [Section 4.1] The encoding reduces each query to n table ids and n scalar selectivities, explicitly ignoring join conditions and filter details. This representation is not injective for general SQL queries: two queries with the same (t_i, s_i) but different filter columns, filter constants, or join relationships can have very different cardinalities because scalar selectivities do not capture correlations within or across tables. No evidence is provided that the benchmark queries avoid such collisions or that the 2n-scalar reduction is sufficient. The paper should validate the encoding on the workloads (e.g., by checking whether distinct queries with identical encodings exist) or extend the representation.
- [Section 5.1] The reported results are single-run point estimates. No error bars, confidence intervals, or multiple seeds are given. Given the randomness of VQC initialization and optimization, the reported factors such as 6.37x and 8.66x may not be stable. The paper should report means and standard deviations over several runs and state the number of seeds.
minor comments (5)
- [Section 2.2] The text refers to 'QCardError' when describing the proposed correction; this should be 'QCardCorr'.
- [Section 4.3, Eq. (5)] The subscripts of the scalar parameters appear inconsistent (s_2^1 vs s_2^2). Please check and fix the equation.
- [Section 5.2] 'Mean error difference' is not defined precisely. Please state whether it is mean absolute error in log space, and clarify that lower values are better.
- [Abstract] The abstract says the approach runs 'on current hardware,' but all experiments use a simulator. Please qualify this claim or include hardware results.
- [References] Reference [26] is a PostgreSQL documentation page; please provide the standard citation for the PostgreSQL optimizer or the specific version used.
Circularity Check
The headline QCardCorr improvements are reported on the same benchmark queries used for training, with no held-out split; by the paper's own equations the correction target is t/f, so the numbers reduce to training-fit quality.
-
fitted input called prediction
[Section 4.2 (Quantum Cardinality Correction) and Section 5.2 (Results); Section 5.1 (Setup) gives no train/test split]
"The model g would be optimal, if g(q)= t(q)/f(q) as f(q)*g(q)= f(q)* t(q)/f(q) =t(q). Thus, the optimization goal is: min_x sum e(t(q)/f(q), g(q)) ... As an evaluation metric, we use the average difference between predicted cardinality and the corrected PostgreSQL cardinality."
By the paper's own equations, the correction model g is trained to reproduce t(q)/f(q) on the training set Q. Section 5.1 trains on the JOB-light and STATS benchmark queries (8000 episodes) and Section 5.2 reports the mean error on those same benchmarks without describing any held-out split. The reported 6.37x/8.66x improvements are therefore the minimized training objective (how well g fits t/f on the training queries), not predictive accuracy on unseen queries. The 'predicted cardinality' used in the evaluation is the fitted output, so the central performance claim reduces to a statement about fitting quality.
full rationale
The central empirical claim is the improvement of QCardCorr over PostgreSQL and MSCN. The paper defines the correction target as t(q)/f(q) and optimizes g to minimize the error between g(q) and that ratio. The evaluation then measures the average error of the corrected predictions. Crucially, Section 5.1 describes training for 8000 episodes on the JOB-light and STATS queries and does not state how queries are partitioned into training and test sets; Section 5.2 reports the average error on the same benchmarks. Consequently, the reported improvement is an in-sample training result unless a split is silently assumed. This is a fitted-input-called-prediction pattern: the 'predicted' cardinalities are the outputs of a model fitted to minimize exactly the reported error on exactly the evaluated queries. The encoding simplification in Section 4.1 (reducing each query to 2n table-id/selectivity scalars and ignoring join conditions) is an unvalidated modelling assumption, but it is not circular. The paper's self-citations in the introduction and related work are not load-bearing for the cardinality-correction claim. The decisive circular step is the absence of a held-out evaluation combined with the definitional correction target t/f, which makes the headline numbers equivalent to the training objective. Score 6 reflects a partial but central circularity; the approach itself is not logically forced by the equations, but the reported predictive improvement reduces by construction to fit quality without a train/test split.
Assumptions & free parameters
free parameters (3)
- VQC parameters theta (RY/RZ rotations in 16 layers) =
not reported
- Classical layer scale parameters s_i =
not reported
- Hand-chosen hyperparameters (layers=16, qubits=6, base b, threshold d, epsilon) =
as specified in Section 5.1 / 4.3
assumptions (4)
- standard math Unitary evolution and Born rule of quantum mechanics
- domain assumption A query joining n tables can be reduced to 2n values (table ids and per-table selectivities) without losing cardinality-relevant information
- domain assumption The Adam optimizer with decaying learning rate converges to good parameters within 8000 episodes
- domain assumption PostgreSQL's cardinality estimate f(q) is a meaningful positive base for multiplicative correction
Cite this review
Pith. "Pith review of QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction." pith.science (2026). https://pith.science/paper/TYYMCW5G
@misc{pith2026250908817,
author = {Pith},
title = {Pith review of: QCardEst/QCardCorr: Quantum Cardinality Estimation and Correction},
year = {2026},
howpublished = {\url{https://pith.science/paper/TYYMCW5G}},
note = {Machine review of arXiv:2509.08817}
}
read the original abstract
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.
Figures
Reference graph
Works this paper leans on
-
[1]
Abien Fred Agarap. 2019. Deep Learning using Rectified Linear Units (ReLU). arXiv:1803.08375 [cs.NE] https://arxiv.org/abs/1803.08375
arXiv 2019
-
[2]
Tim Bittner and Sven Groppe. 2020. Avoiding blocking by scheduling transac- tions using quantum annealing. InProceedings of the 24th International Database Engineering & Applications Symposium. ACM, 1–10. https://doi.org/10.1145/ 3410566.3410593
arXiv 2020
-
[3]
Tim Bittner and Sven Groppe. 2020. Hardware Accelerating the Optimization of Transaction Schedules via Quantum Annealing by Avoiding Blocking.Open Journal of Cloud Computing (OJCC)7, 1 (2020), 1–21. http://nbn-resolving.de/urn: nbn:de:101:1-2020112218332015343957
2020
-
[4]
Moses Charikar, Surajit Chaudhuri, Rajeev Motwani, and Vivek Narasayya. 2000. Towards estimation error guarantees for distinct values. InProceedings of the Nineteenth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems(Dallas, Texas, USA)(PODS ’00). Association for Computing Machinery, New York, NY, USA, 268–279. https://doi.org/10.1145/3...
arXiv 2000
-
[5]
Surajit Chaudhuri, Gautam Das, and Utkarsh Srivastava. 2004. Effective use of block-level sampling in statistics estimation. InProceedings of the 2004 ACM SIGMOD International Conference on Management of Data(Paris, France)(SIGMOD ’04). Association for Computing Machinery, New York, NY, USA, 287–298. https: //doi.org/10.1145/1007568.1007602
arXiv 2004
-
[6]
Anshuman Dutt, Chi Wang, Azade Nazi, Srikanth Kandula, Vivek Narasayya, and Surajit Chaudhuri. 2019. Selectivity estimation for range predicates using lightweight models.Proc. VLDB Endow.12, 9 (2019), 1044–1057. https://doi.org/ 10.14778/3329772.3329780
arXiv 2019
-
[7]
Maja Franz, Tobias Winker, Sven Groppe, and Wolfgang Mauerer. 2024. Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation. In2024 IEEE International Conference on Quantum Computing and Engineering (QCE). https://doi.org/10.1109/QCE60285.2024.00055
arXiv 2024
-
[8]
Sven Groppe and Jinghua Groppe. 2021. Optimizing Transaction Schedules on Universal Quantum Computers via Code Generation for Grover’s Search Algorithm. InProceedings of the 25th International Database Engineering & Ap- plications Symposium (IDEAS), Montreal, QC, Canada. https://doi.org/10.1145/ 3472163.3472164
arXiv 2021
Show all 36 references
-
[9]
Tobias Groth, Sven Groppe, Thilo Pionteck, Martin Koppehel, and Franz Valdiek
-
[10]
Tobias Groth, Sven Groppe, Thilo Pionteck, Franz Valdiek, and Martin Koppehel
-
[11]
Lov K Grover. 1996. A fast quantum mechanical algorithm for database search. Proceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC ’96)(1996), 212–219
1996
-
[12]
Le Gruenwald, Tobias Winker, Umut Çalıkyılmaz, Jinghua Groppe, and Sven Groppe. 2023. Index Tuning with Machine Learning on Quantum Computers for Large-Scale Database Applications. InJoint Proceedings of Workshops at the 49th International Conference on Very Large Data Bases (...
2023
-
[13]
Yuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu, Jingyi Yang, Liang Wei Tan, Kai Zeng, Gao Cong, Yanzhao Qin, Andreas Pfadler, et al. 2021. Cardinality estimation in dbms: A comprehensive benchmark evaluation.arXiv preprint arXiv:2109.05877 (2021)
2021 arXiv
-
[14]
Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina, Kristian Kersting, and Carsten Binnig. 2020. DeepDB: learn from data, not from queries! Proceedings of the VLDB Endowment13, 7 (March 2020), 992–1005. https://doi. org/10.14778/3384345.3384349
2020
-
[15]
Boncz, and Alfons Kemper
Andreas Kipf, Thomas Kipf, Bernhard Radke, Viktor Leis, Peter A. Boncz, and Alfons Kemper. 2019. Learned Cardinalities: Estimating Correlated Joins with Deep Learning. In9th Biennial Conference on Innovative Data Systems Research, CIDR, Asilomar, CA, USA. www.cidrdb.org. http:...
2019
-
[16]
Florian Kittelmann, Pavel Sulimov, and Kurt Stockinger. 2024. QardEst: Using Quantum Machine Learning for Cardinality Estimation of Join Queries. InQ-Data (SIGMOD/PODS ’24). ACM, 2–13. https://doi.org/10.1145/3665225.3665444
2024
-
[17]
Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2015. How good are query optimizers, really?Proc. VLDB Endow.9, 3 (Nov. 2015), 204–215. https://doi.org/10.14778/2850583.2850594
2015
-
[18]
Nitin Nayak, Alexandru Prisacaru, Umut Çalıkyılmaz, Jinghua Groppe, and Sven Groppe. 2025. Quantum-Enhanced Transaction Scheduling with Reduced Complexity via Solving QUBO Iteratively using a Locking Mechanism. In2nd International Workshop on Quantum Computing and Quantum-Insp...
2025
-
[19]
Nitin Nayak, Jan Rehfeld, Tobias Winker, Benjamin Warnke, Umut Çalikyilmaz, and Sven Groppe. 2023. Constructing Optimal Bushy Join Trees by Solving QUBO Problems on Quantum Hardware and Simulators. InProceedings of the International Workshop on Big Data in Emergent Distributed...
2023
-
[20]
Nitin Nayak, Manuel Schönberger, Valter Uotila, Zhengtong Yan, Sven Groppe, Jiaheng Lu, and Wolfgang Mauerer. 2024. QCE’24 Tutorial: Quantum Annealing - Emerging Exploration for Database Optimization.arXivarXiv:2411.04638 (2024). https://arxiv.org/abs/2411.04638
2024 arXiv
-
[21]
Nitin Nayak, Tobias Winker, Umut Çalıkyılmaz, Sven Groppe, and Jinghua Groppe. 2024. Quantum Join Ordering by Splitting the Search Space of QUBO Problems.Datenbank-Spektrum(2024), 1–12
2024
-
[22]
Ioannidis
Viswanath Poosala and Yannis E. Ioannidis. 1997. Selectivity Estimation With- out the Attribute Value Independence Assumption. InProceedings of the 23rd International Conference on Very Large Data Bases (VLDB ’97). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 486–495
1997
-
[23]
Manuel Schönberger, Stefanie Scherzinger, and Wolfgang Mauerer. 2023. Ready to leap (by co-design)? join order optimisation on quantum hardware.Proceedings of the ACM on Management of Data1, 1 (2023), 1–27
2023
-
[24]
Manuel Schönberger, Immanuel Trummer, and Wolfgang Mauerer. 2022. Quan- tum Optimisation of General Join Trees. (2022)
2022
-
[25]
Valter Uotila. 2023. SQL2Circuits: Estimating Metrics for SQL Queries with A Quantum Natural Language Processing Method. arXiv:2306.08529 [cs.DB]
2023
-
[26]
1996-2025
Martin Utesch. 1996-2025. Chapter 59. Genetic Query Optimizer, Documentation PostgreSQL. https://www.postgresql.org/docs/12/geqo.html
1996
-
[27]
Martin Vogrin, Rok Vogrin, Sven Groppe, and Jinghua Groppe. 2024. Supervised Learning on Relational Databases with Quantum Graph Neural Networks. In VLDB 2024 Workshop: The Second International Workshop on Quantum Data Science and Management (QDSM’24), Guangzhou, China. https:...
2024
-
[28]
Manuela Weigold, Johanna Barzen, Frank Leymann, and Marie Salm. 2021. En- coding patterns for quantum algorithms.IET Quantum Communication2, 4 (2021), 141–152. https://doi.org/10.1049/qtc2.12032
2021 doi
-
[29]
Stefan Werner, Sven Groppe, Volker Linnemann, and Thilo Pionteck. 2013. Hardware-accelerated join processing in large Semantic Web databases with FPGAs. InInternational Conference on High Performance Computing & Simulation (HPCS), Helsinki, Finland. https://doi.org/10.1109/HPC...
2013
-
[30]
Tobias Winker, Sven Groppe, Valter Uotila, Zhengtong Yan, Jiaheng Lu, Maja Franz, and Wolfgang Mauerer. 2023. Quantum Machine Learning: Foundation, New Techniques, and Opportunities for Database Research. InProceedings of ACM SIGMOD/PODS International Conference on Management ...
2023
-
[31]
Tobias Winker, Umut Çalıkyılmaz, Le Gruenwald, and Sven Groppe. 2023. Quan- tum Machine Learning for Join Order Optimization using Variational Quantum Circuits. InProceedings of the International Workshop on Big Data in Emergent Distributed Environments (BiDEDE), Seattle, W A,...
2023
-
[32]
Peizhi Wu and Gao Cong. 2021. A Unified Deep Model of Learning from both Data and Queries for Cardinality Estimation. InProceedings of the 2021 Inter- national Conference on Management of Data(Virtual Event, China)(SIGMOD ’21). Association for Computing Machinery, New York, NY...
2021
-
[33]
Hellerstein, Sanjay Krishnan, and Ion Stoica
Zongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu, Yan Duan, Xi Chen, Pieter Abbeel, Joseph M. Hellerstein, Sanjay Krishnan, and Ion Stoica. 2019. Deep unsupervised cardinality estimation.Proceedings of the VLDB Endowment13, 3 (Nov. 2019), 279–292. https://doi.org/10.1477...
2019
-
[34]
Rong Zhu, Ziniu Wu, Yuxing Han, Kai Zeng, Andreas Pfadler, Zhengping Qian, Jingren Zhou, and Bin Cui. 2021. FLAT: fast, lightweight and accurate method for cardinality estimation.Proceedings of the VLDB Endowment14, 9 (May 2021), 1489–1502. https://doi.org/10.14778/3461535.3461539
2021
-
[2022]
InThe 33rd International Conference on Database and Expert Systems Applications (DEXA), Vienna, Austria
Accelerated Parallel Hybrid GPU/CPU Hash Table Queries with String Keys. InThe 33rd International Conference on Database and Expert Systems Applications (DEXA), Vienna, Austria. https://doi.org/10.1007/978-3-031-12426-6_15 This paper received the ’Norman Revell Best Paper Award’
-
[2023]
https://doi.org/10.1007/s10115-023-01891-w
Hybrid CPU/GPU/APU accelerated query, insert, update and erase opera- tions in hash tables with string keys.Knowledge and Information Systems65, 10 (2023), 4359–4377. https://doi.org/10.1007/s10115-023-01891-w
2023 doi
Reviewed August 4, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.