betaFeedback

WorksComputer Science

QuarkDB: A Hybrid Database System for Quantum Data Management

Abstract

Emerging quantum applications like quantum communication generate large volumes of high-dimensional quantum data, requiring efficient data analysis and storage. However, classical database systems often struggle to meet requirements such as quantum processing or version management. This paper presents QuarkDB designed for efficient quantum data management. QuarkDB establishes a unified object model for relational and quantum data and defines the syntax of Quantum Structured Query Language. To support efficient quantum data management, QuarkDB integrates three key components: (1) a Hybrid Query Engine with cost-based hybrid plan selection over classical and quantum operators, (2) an Execution Engine with a three-level instructions intermediate representation, QuarkDB-IR, to support quantum execution and reduce quantum processing costs, and (3) a Storage Engine supporting quantum data version management, state reconstruction and data reuse. Compared with classical databases such as SQLite and PostgreSQL or quantum databases like Qute, our QuarkDB achieves query-latency speedups ranging from 2.14x to 25.86x speedup under extensive real-world workloads.

Introduction

Quantum computing has been applied to several research fields, including communication networks [1], cryptographic protocols [2], and combinatorial optimization [3], and offers performance advantages for specific computational tasks [4]–[6]. However, these applications also generate substantial quantum data, including circuit descriptions, measurement outcomes, run records and so on [7].

Compared to classical data, quantum data carries complex amplitudes and correlations across qubits. Storing quantum states as state vectors requires storage that grows exponentially with the number of qubits [7], posing complex challenges for relational databases. Meanwhile, it is also particularly difficult to analyze quantum data in a classical database. For example, Figure 1 illustrates the entanglement distribution through a repeater chain in quantum communication, where a common analysis is computing mean Bell-pair fidelity by protocol for runs completing within a time limit [1]. If the application uses the classical database to process it, it must load state files into a simulator and coordinate state versions with query results. Repeated loading adds the cost of encoding and decoding, while independently storing complete versions increases storage. For example, a dense 30-qubit state requires 16 GiB to store [8], which means retaining its 100 versions data requires approximately 1.56 TiB, imposing substantial storage requirements. These requirements motivate the development of quantum databases to manage quantum data and meet the needs of future quantum applications. The lower part of Figure 1 describes an ideal quantum database design, which integrates state evaluation with relational query processing and provides snapshot-consistent access to states and their associated records. Managing state versions within the database supports reuse across queries, reducing repeated state loading and redundant storage.

Figure 1. Entanglement-Fidelity Queries in Classical and Quantum Databases

Recent quantum database research often adopts the quantum augmented architecture of database system, using quantum solvers to accelerate database optimization [9]. QDBO, DEDALUS, and Q2^{2}O apply this design to join ordering and related optimization problems [9]–[11]. However, supporting quantum operations alongside relational queries introduces three additional challenges. (1) Complexity in selecting candidate plans. Existing studies usually explore quantum algorithms to improve database performance, with many focusing on optimization problems [12]–[16]. But the combination of quantum and classical operators additionally introduces the cost of selecting the proper operator for queries, multiplying the plan alternatives, so choosing operators independently can produce an expensive complete plan [17]. (2) Coordinated hybrid execution. Classical relational operators and quantum operations differ in data representations, instruction requirements, and result processing. Coordinating them within a database requires compatible execution interfaces, while repeated representation conversions and instruction compilation introduce additional overhead [18], [19]. Meanwhile redundant quantum backend instruction processing and circuit operations may further increase execution costs. (3) State version management and reuse. Quantum states depend on computational histories and the relational tuple versions used in their preparation, which conventional tuple versioning alone cannot capture [20], [21]. Storing every state version as a complete state vector introduces redundant storage, while independently reconstructing historical states repeats shared circuit computation.

To address these problems, we propose QuarkDB, which can manage relational data and quantum states on classical computers. With Structured Query Language (SQL) and Quantum Structured Query Language (QSQL), QuarkDB can process queries combining relational operations and quantum procedures, optimize the plan candidate space via dynamic programming and select execution strategies based on resource constraints. It can also manage quantum states remaining accessible with their corresponding relational records, allowing subsequent queries to reuse these states.

In summary, we make the following contributions.

  • We propose a new database system QuarkDB for quantum data management with a hybrid architecture. By designing a unified object model with five fields, our system enables the unified description of both quantum and classical data. Additionally, we design QSQL for processing the quantum data.

  • We design a Hybrid Query Engine that optimizes classical and quantum operators combination using dynamic programming. We propose a cost model based on candidate cardinality and output cardinality that estimates candidate preparation, quantum search, result readout, and backend switching. By reusing cardinality and incremental-cost estimates across subplans, the hybrid query engine prunes infeasible alternatives and generates the lowest cost executable plans.

  • We implement an Execution Engine with a three-level instructions intermediate representation, QuarkDB-IR. With these instructions, our system can efficiently compose database operations on various quantum circuits and translate optimized programs into executable operations for quantum backends. QuarkDB also introduces two execution optimization strategies, Instruction Rewriting and Circuit Reduction, to reduce the cost of instruction processing and circuit compilation.

  • We design a storage engine with strategies for version management, state reconstruction and quantum data reuse. Our version management strategy enables historical state reconstruction through replay from shared checkpoints or inverse execution from retained successors. Meanwhile, we propose a cost-based quantum data reuse strategy to reduce the cost of state preparation by selecting between state reconstruction and observable propagation.

The paper is organized as follows: Section II outlines the system architecture. The hybrid query engine, three-level execution engine, and storage engine are detailed in Sections III–V. We present the evaluation and related work in Sections VI–VII, followed by conclusions in Section VIII.

System Overview

We first define the unified object model in Section II-A, and then introduce the architecture of QuarkDB to show how quantum processing is seamlessly integrated into a classical database in Section II-B. Finally we introduce the native QSQL grammar for using QuarkDB in Section II-C.

Data Model

QuarkDB describes classical and quantum data using five fields: an identifier, an object type, version metadata, a payload, and references. Relations retain classical database schemas, column types, and constraints; relation versions and quantum objects share this description.

The identifier is a universally unique identifier (UUID) naming one object version. The object type distinguishes relation versions, states, circuits, and classical results, and determines the payload format. Version metadata records the initial version’s identifier, the current version number, the predecessor’s identifier, and creation time. The initial identifier groups related versions; predecessor links describe their derivation and branching.

The payload holds the content specified by the object type: relation identifiers and row counts, state amplitudes or reconstruction records, circuit gates and parameters, or observation values and sample counts. References record other object identifiers and their roles, linking an object to its inputs, circuit, and producing execution.

Applying a circuit creates a state with a new UUID and the same object type and initial version identifier as its input. Version metadata identifies the input as its predecessor. The payload describes the resulting state, while references identify the circuit and execution. Run tuples associate state identifiers with application metadata, as in Figure 1.

For a quantum state prepared from relational data, its qindex maps basis positions to logical row identifiers and the source tuple versions used during state preparation. QuarkDB multi-version concurrency control (MVCC) determines visible tuple and catalog versions. A quantum database snapshot retains references to selected quantum data versions and relational tuple versions, together with their required dependencies, to reduce the cost of quantum state reconstruction.

QuarkDB Architecture

QuarkDB extends a classical relational database with a Hybrid Query Engine, an Execution Engine based on the three-level instruction intermediate representation (IR), and a Storage Engine for quantum data management. Figure 2 shows their interaction. QuarkDB uses a classical database for classical data management and transaction services, and a quantum processing backend for quantum circuit simulation [8].

Figure 2. Architecture of QuarkDB

Hybrid Query Engine. The parser accepts QSQL through sessions; the analyzer resolves relations and expressions against the catalog. The optimizer uses cardinality estimates and a cost model accounting for quantum preparation, search, readout, and cross-backend transitions. It compares fully classical and quantum-containing plans. A mixed plan can filter tuples before preparing the reduced input for quantum processing. Section III describes query processing.

Execution Engine. Complete classical plans execute in the classical database backend. For plans containing Quantum operators, the compiler expands System Commands into Macro Instructions and then Execution Primitives. To reduce the cost of instruction execution and circuit compilation, QuarkDB designs Instruction Rewriting to reduce repeated computation and instruction dispatch, while Circuit Reduction simplifies gate sequences. The interpreter invokes the quantum process backend for circuit execution. Section IV describes the instruction hierarchy, compilation, and execution.

Storage Engine. The storage engine manages quantum data versions and persistent database snapshots. Operation records track computational dependencies between quantum states, while qindexes associate states with their source tuple versions. Shared checkpoints support historical reconstruction through forward replay or inverse execution from retained successors. For historical queries, cost-based reuse selects between inverse reconstruction and observable propagation. Section V describes these strategies.

QSQL Grammar

We design QSQL to combine relational queries with operations on quantum states and their histories. QSQL extends SQL with commands and options for quantum processing while retaining relational expressions. Expressions can apply stored circuits, reconstruct states retained in snapshots, and evaluate observables on their amplitudes. tbl:I summarizes QSQL statements. Brackets denote optional syntax, and braces list alternatives.

As summarized in tbl:I, QSQL retains the classical database query and modification clauses, adding PERMUTE to express updates as permutations of encoded values. AGGREGATE MODE defines the quantum procedure for aggregate evaluation, while CONFIDENCE defines the confidence level of aggregate intervals. SHOTS defines the sampling budget used by quantum operators to produce observations

OperationSyntax
QueryQSELECT [MEASURE] expressions [FROM relation expression] [WHERE predicate] [GROUP BY keys] [HAVING predicate] [ORDER BY order list] [LIMIT count] [OFFSET count] [quantum clauses]
InsertQINSERT INTO relation [(columns)] VALUES (values) [, …] [RETURNING expressions] [quantum clauses]
UpdateQUPDATE relation [PERMUTE] SET assignments [WHERE predicate] [RETURNING expressions] [quantum clauses]
DeleteQDELETE FROM relation [WHERE predicate] [RETURNING expressions] [quantum clauses]
AggregationAGGREGATE MODE {QUANTUM_COUNTING | AMPLITUDE_ESTIMATION | DURR_HOYER} [CONFIDENCE level]
ReadoutSHOTS budget RETURN MODE {RELATION | MEASUREMENT | BOTH}
ExecutionPLAN {AUTO | CLASSICAL | QUANTUM} BACKEND {QULACS | AER | WUKONG} [EXACT]
State expressionsqstore.apply_circuit(execution, state, circuit)
State expressionsqstore.snapshot_restore_state(snapshot, state)
State expressionsqstore.state_probability(state, mask, outcome)
State expressionsqstore.snapshot_expectation(*snapshot, state, observable)

Table 1. QSQL STATEMENTS AND QUANTUM OPERATIONS

and estimates. RETURN MODE defines whether query output contains tuples, measurement records, or both; QSELECT MEASURE requests both. PLAN defines whether operator selection is cost-based, restricted to classical processing, or required to include a Quantum operator. BACKEND selects the circuit simulator, and EXACT requires complete results and exact aggregation. State expressions access quantum objects by identifier. apply_circuit creates successor state versions, while snapshot_restore_state reconstructs saved amplitudes for historical reads. state_probability returns the probability of a specified qubit outcome, and snapshot_expectation returns an observable’s expectation value, sampling variance, and sample count.

The following QSQL expression describes the Snapshot state access steps in Figure 1. It accesses the saved quantum state of a selected run and evaluates bell_projector, the target Bell-state projector for endpoints A and B. The resulting fidelity FF provides this run’s contribution to the subsequent SQL AVG computation.

qstore.snapshot_expectation(
    snapshot_id, state_id, bell_projector)
PLAN QUANTUM BACKEND QULACS SHOTS 4096
RETURN MODE MEASUREMENT;

In this QSQL, snapshot_id selects the saved snapshot, and state_id identifies the retained quantum state. snapshot_expectation evaluates the Bell-state projector on this state to obtain its fidelity. PLAN QUANTUM requires a Quantum operator for this calculation, while BACKEND QULACS selects the simulator. SHOTS 4096 specifies the operation’s sampling budget. RETURN MODE MEASUREMENT returns the fidelity estimate, sampling variance, and sample count.

Hybrid Query Engine

Considering the difficulties of quantum operator planning and cost estimation, QuarkDB designs a Hybrid Query Engine to optimize classical and quantum operator combinations by total query cost, including quantum preparation and readout. Hybrid query processing comprises query analysis, hybrid optimization, and plan generation, as shown in Figure 3.

Image not extracted

Figure 3. Hybrid Query Processing

Query Analysis

The parser parses QSQL statements into a Quantum Abstract Syntax Tree (QAST), which associates relational expressions with quantum execution requirements for hybrid planning. In the procedure of query analysis, semantic analysis resolves expression types and bindings, and query rewriting normalizes the expressions and result requirements before the optimizer selects classical and quantum operators.

Semantic Analysis. The analyzer establishes expression types and bindings so that classical and quantum plans interpret QSQL consistently. The QAST extends a relational AST with quantum support annotations and execution requirements. Expression nodes record quantum support for functions and aggregates; query nodes separate execution policy from output form and result accuracy, so a query can require quantum execution with exact relational results. For approximate aggregation, the query node records the requested algorithm, measurement budget, and confidence level. For example, the following query requests amplitude estimation for the sum of runs.energy:

QSELECT SUM(energy) FROM runs
PLAN QUANTUM AGGREGATE MODE AMPLITUDE_ESTIMATION
SHOTS 1024 CONFIDENCE 0.95;

The analyzer binds energy to runs.energy and annotates AMPLITUDE_ESTIMATION with its return type and quantum support. It combines these expression annotations with the execution policy and result requirements to produce the following QAST:

Query
    relation: runs
    target: AMPLITUDE_ESTIMATION
    argument: runs.energy : DOUBLE PRECISION
    result type: DOUBLE PRECISION
    quantum support: supported
    execution policy:
        intent: quantum required
        aggregate algorithm: amplitude estimation
        measurement budget: 1024
        result requirements:
            form: aggregate estimate
            accuracy: approximate
            confidence level: 0.95

Query Rewriting. The rewriter normalizes predicates in the QAST. The rewriter expands range predicates into lower and upper comparisons and simplifies Boolean expressions in the QAST, preserving SQL types and semantics. The rewritten QAST retains the execution policy, measurement budget, and result requirements and serves as input to the logical planner.

Initial Logical Plan Construction. The Logical Planner converts the rewritten QAST into a logical operator tree that connects relational processing with quantum state access and result readout. Each node records its inputs and references the QAST for expression types and bindings. Quantum state access specifies the inputs available to quantum operators. Measurement nodes describe observations of quantum states, and decoding nodes map measurement outcomes to relational tuples. For exact relational queries, the Logical Planner adds a completion node to require the recovery of all qualifying tuples. The logical planner associates the execution policy and result requirements with this operator tree to form the initial logical plan, then passes the plan and rewritten QAST to the optimizer.

Hybrid Optimization

QuarkDB adopts hybrid query optimization to support QSQL’s classical and quantum execution plan selection. It applies dynamic programming to enumerate and prune plans combining classical and quantum operators using cardinality estimates and a quantum cost model, then selects the lowest-cost candidate satisfying the execution requirements.

To estimate costs for plans combining classical and quantum operators, QuarkDB introduces candidate cardinality. For an inner equijoin, the candidate cardinality N^c\widehat{N}_c counts tuple pairs satisfying the non-null join-key equalities, and the output cardinality N^o\widehat{N}_o counts pairs satisfying all join predicates. Together, they characterize the quantum search space and its qualifying fraction for quantum operator costing. The output cardinality also determines the input size of subsequent operators.

Our estimator derives the equality selectivity seqs_{\mathrm{eq}} from join-key statistics, including distinct-value counts, NULL fractions, and most-common-value frequencies. The residual selectivity sress_{\mathrm{res}} estimates the fraction of candidate pairs satisfying the remaining join predicates. Given estimated input cardinalities N^L\widehat{N}_L and N^R\widehat{N}_R, the estimator computes

N^c=N^LN^Rseq,N^o=N^csres.(1)\widehat{N}_c = \widehat{N}_L\widehat{N}_R s_{\mathrm{eq}}, \qquad\widehat{N}_o = \widehat{N}_c s_{\mathrm{res}}. \tag*{(1)}

The optimizer uses each subplan’s estimated output cardinality as the input cardinality of its parent operator, allowing the cost model to account for intermediate result sizes when evaluating combinations of classical and quantum operators.

Cost Estimation. To assess plans combining classical and quantum operators, QuarkDB extends its cost model with quantum preparation, search, readout, and operator transition costs. The model considers the cost of intermediate-result materialization using estimated cardinalities and tuple widths. For input subplans LL and RR, the total join cost is

C(L⋈dR)=C(L)+C(R)+ΔCd(L,R),(2)C(L \bowtie_{d} R) = C(L) + C(R) + \Delta C_{d}(L, R), \tag*{(2)}

where d∈{c,q}d \in\{c, q\} denotes the classical or quantum join implementation. C(L)C(L) and C(R)C(R) include the costs of producing and materializing the inputs, while ΔCd\Delta C_{d} denotes the incremental join cost. For a quantum join,

ΔCq(L,R)=Cprepare+Csearch+Creadout+Cswitch.(3)\Delta C_{q}(L, R) = C_{\mathrm{prepare}} + C_{\mathrm{search}} + C_{\mathrm{readout}} + C_{\mathrm{switch}}. \tag*{(3)}

CprepareC_{\mathrm{prepare}} estimates join-key processing and quantum input preparation from the input cardinalities, join-key count, and candidate cardinality N^c\widehat{N}_{c}. CsearchC_{\mathrm{search}} estimates quantum search work using the candidate cardinality N^c\widehat{N}_{c}, the qualifying output cardinality N^o\widehat{N}_{o}, and the specified sampling and failure budgets. CreadoutC_{\mathrm{readout}} accounts for the required measurement, exact-result completion, and output construction using the measurement budget, N^c\widehat{N}_{c}, output cardinality N^o\widehat{N}_{o}, and output tuple width. CswitchC_{\mathrm{switch}} refers to the cost of transitions between classical and quantum operators using a fixed transition cost. Each component converts its estimated work into cost using the corresponding unit cost.

Plan Enumeration. QuarkDB uses dynamic programming to enumerate join orders and classical/quantum operator combinations under the cost model. For each relation subset SS in the search space, it retains the cheapest classical subplan Pc(S)P_{c}(S) and the cheapest feasible subplan Pq(S)P_{q}(S) containing at least one quantum join.

The optimizer processes relation subsets in increasing order of size. For each eligible partition of SS into disjoint subsets LL and RR, it combines retained child subplans with a classical or quantum join. It uses the cardinality estimates to evaluate the incremental join cost and adds the child costs according to (2). A candidate containing a quantum join at the root or in either child competes for Pq(S)P_{q}(S), allowing classical and quantum joins at different positions in the same plan. The optimizer excludes candidates exceeding backend resource limits and updates Pc(S)P_{c}(S) or Pq(S)P_{q}(S) whenever it finds a cheaper feasible candidate in the corresponding category. For the complete query, automatic planning compares the classical and quantum-containing candidates and selects the feasible plan with the lowest estimated total cost.

Plan Generation

The plan generator resolves the state inputs and relational outputs of quantum computation, and converts the optimizer’s selected classical and quantum operators into an executable plan with explicit state dependencies, quantum resource requirements, and readout operations.

Physical Plan Construction. The generator retains the selected join order when instantiating classical and quantum operators. A classical selection evaluates tuples directly, whereas a quantum selection searches candidate identifiers through an oracle derived from the query predicate. Value access supplies the oracle’s inputs, and state preparation establishes the candidate state on which search operates. The generator connects these operations within the quantum subtree. When a classical parent consumes its output, decoding recovers the tuples identified by the selected candidates.

Execution Binding. The compiler associates the quantum subtree with the selected search procedure and binds its state and predicate inputs. Each candidate identifier denotes one tuple occurrence in the bound input, and the decoder uses this correspondence to retrieve SQL values while preserving duplicate rows. The procedure receives a register layout for the candidate address space and temporary predicate values, together with a sampling budget that bounds search trials. For approximate aggregation, the estimator also receives the confidence level used to compute the interval accompanying its result.

Plan Finalization. The compiler validates the generated program against the bound physical plan. Since quantum search may discover only part of the qualifying set, the verifier follows the search output to the enumeration or completion that produces an exact relational result. For approximate aggregation, the corresponding check follows the estimate through error computation. The bound register layout supplies the quantum workspace requirements checked against backend capacity before the program is passed to execution.

Execution Engine

QuarkDB’s execution engine integrates database operations with quantum computation through a three-level instruction hierarchy. It compiles physical plans into executable instructions for the quantum backend. We also design two optimization strategies for the execution engine: Instruction Rewriting and Circuit Reduction, which reduce repeated computation and instruction dispatch and simplify quantum gate sequences, respectively.

QuarkDB-IR

Although existing studies propose the intermediate representation (IR) at different abstraction levels, including three-tier LLVM-style IR [17] or QIR [22], to represent quantum operations through runtime interfaces, these IRs pay less attention to coordinating the quantum operations with database execution procedure. To compose database and quantum operations into complete execution programs and enable adaptation to various quantum backends through instruction interfaces, QuarkDB introduces a novel three-level intermediate representation QuarkDB-IR to its execution engine. Figure 4 shows its structure.

Figure 4 shows the three levels of QuarkDB-IR: System Commands, Macro Instructions, and Execution Primitives. A system command specifies a database operation, such as aggregation or circuit execution. The compiler identifies the operation represented by the physical plan and constructs the system command from the plan’s physical operators. For a Macro Instruction, it defines the execution procedure of database or quantum operations, and describes the computations required by physical or quantum operators. It implements the selected execution strategy by composing execution primitives, such as quantum search or aggregate estimation. Through Macro Instructions, System Commands can combine database processing with quantum computation and reuse these procedures across different database operations.

Figure 4. Three-Level Instruction Hierarchy of QuarkDB-IR

Execution Primitives define the basic operations of an execution procedure and specify the input data and results of each operation with the calling interface. The compiler translates these primitives into executable instructions for database and quantum processing backends, and each backend implements the corresponding operations through its own execution routines. The interpreter passes instruction inputs to these routines and supplies their results to subsequent instructions, combining database operations and quantum computation to complete QSQL processing.

The following QSQL statement illustrates our QuarkDB-IR. It estimates the mean of the values in oracle_values using maximum-likelihood amplitude estimation [23]:

QSELECT AVG(value) AS estimate
FROM oracle_values
AGGREGATE MODE AMPLITUDE_ESTIMATION
PLAN QUANTUM BACKEND QULACS
SHOTS 4096 CONFIDENCE 0.95
RETURN MODE BOTH;

QuarkDB compiles this statement into the System Command Aggregate and expands it according to the physical plan into the following Macro Instructions:

RelationAccess
CoherentDataAccess
PredicateEvaluation
Aggregation
ResultDelivery

The macro instruction RelationAccess uses the execution primitive Acquire to obtain the relation state under the statement snapshot, together with its row identifiers and encoding. The macro instructions CoherentDataAccess and PredicateEvaluation supply the encoded values and predicate through the Execution Primitives Load and Evaluate. These outputs become operands of the macro instruction Aggregation. The corresponding expansion is:

RelationAccess        : Acquire
CoherentDataAccess  : Load, Load (adjoint)
PredicateEvaluation : Evaluate, Evaluate (adjoint)
Aggregation         : Interfere, Observe, Derive
ResultDelivery      : Emit

Within the Aggregation macro instruction, the execution primitive Interfere represents controlled rotations on normalized values and amplitude amplification. The execution primitive Observe supplies measurement counts to the execution primitive Derive for maximum-likelihood estimation and conversion back to the original value scale. The adjoint forms undo temporary predicate and value preparation. The interpreter executes amplification, observation, and estimation in one backend call using the requested shot budget and confidence level. The execution primitive Emit returns the estimate, confidence interval, and sampling metadata.

Hybrid Execution

The execution engine dispatches Execution Primitives to database and quantum backends according to their execution domains. The database backend evaluates classical relational operators over tuples. The quantum backend implements the quantum operators selected by the physical plan.

The execution engine accesses relation inputs and stored quantum states through the Storage Engine under the statement snapshot. For a stored quantum input, the Storage Engine resolves the visible relation version and retrieves its amplitudes and encoding. The associated row mapping connects quantum basis positions to logical row identifiers and visible tuples. When an operator accesses a subset of rows, the Storage Engine extracts and normalizes the corresponding amplitudes. The execution engine supplies the resulting state and required column values to the quantum procedure. For newly prepared inputs, the quantum backend constructs the state from the accessed tuples and their encoding.

Backend routines return their results to the interpreter through the execution interface. The execution engine decodes quantum candidate identifiers into visible tuples and invokes classical completion when specified by the plan. Classical estimation converts quantum measurement counts into aggregate values and confidence intervals. These tuples and aggregate values enter subsequent relational operators according to the physical plan. The execution engine coordinates classical and quantum processing through instruction dependencies, and Emit returns the final QSQL result.

Execution Optimization

Circuit depth and gate duration contribute directly to quantum query latency [17]. In quantum circuit processing, repeated gate application can make memory access the execution bottleneck [8]. QuarkDB introduces Instruction Rewriting and Circuit Reduction to reduce instruction processing and quantum gate operations.

Instruction Rewriting applies common subexpression elimination to repeated data preparation and predicate evaluation. The rewriter identifies equivalent computations from their operations, operands, and parameters while tracking updates to the accessed state. For shared reversible preparation, it retains one adjoint operation after the final use. During circuit compilation, the compiler represents the gate sequence as one circuit block executed by the Interfere primitive. It constructs this block directly during instruction generation, preserving gate order while reducing instruction construction and interpreter dispatch.

Circuit Reduction simplifies the gate sequence in circuit execution. The optimizer uses dependencies between gate targets and controls to cancel inverse pairs and merge rotations about the same axis. It further combines successive single-qubit operations by multiplying their matrices in execution order. Measurements and other nonunitary operations delimit the sequences eligible for these transformations. Circuit Reduction precedes instruction generation, so Instruction Rewriting constructs a circuit block from the simplified sequence. The backend adapter compiles the same sequence for execution.

We use the following circuit to illustrate our execution optimization strategies. It applies eight gates to two qubits before result readout:

h q[0];  x q[1];  h q[0];
ry(pi/8) q[0];  ry(pi/8) q[0];
cx q[1], q[0];  cx q[1], q[0];
cx q[0], q[1];

Circuit Reduction cancels the two Hadamard gates across the independent X gate, merges the rotations into one rotation by π/4\pi/4, and cancels the identical controlled-X pair. The resulting sequence contains three gates:

x q[1];
ry(pi/4) q[0];
cx q[0], q[1];

Without either optimization, the complete operation requires eleven execution instructions: eight for the gates and three for state preparation, result readout, and result delivery. Instruction Rewriting represents the eight gates with one instruction for the Execution Primitive Interfere, reducing the total to four. Circuit Reduction alone reduces the gate instructions from eight to three, leaving six instructions. Together, the strategies produce four instructions containing three gates. The database execution engine thus constructs and processes fewer instructions, while the quantum backend applies fewer gates.

Storage Engine

QuarkDB designs a storage engine, with version management, state reconstruction, and cost-based state reuse, to reduce repeated amplitude storage. By setting shared checkpoints and using operation histories, our storage engine can reduce the cost of state persistent storage and circuit execution while preserving the quantum data version associations.

Version Management

Tuple versions record row changes but do not capture how quantum states are derived, making the reconstruction of quantum state difficult. QuarkDB therefore defines a data version, which associates each quantum data version with its input states, operations, and source tuple versions. It also introduces the database version that retains references to selected quantum data versions and tuple versions, together with their derivation histories, for historical queries and reuse of intermediate quantum results across transactions.

A quantum data version comprises a quantum state identified by a UUID and records describing its derivation. An operation record identifies the input quantum data versions and the applied circuit, especially for a tensor operation, it identifies both inputs and their qubit positions in the output. For states prepared from relational data, a qindex maps basis positions to logical row identifiers and the physical tuple identifiers (TIDs) of their source versions. Each entry contains a logical row identifier, which identifies the row across updates, and a tuple identifier (TID), which locates its physical row version. QuarkDB represents a quantum database version as a persistent snapshot that retains selected quantum states and relational tuples together with the states’ computational histories.

QuarkDB organizes quantum data version storage around checkpoints. A checkpoint stores the amplitudes of a quantum data version under its UUID. QuarkDB creates checkpoints when operation depth reaches a configurable threshold or upon an explicit request. Between checkpoints, versions are represented by operation records referencing earlier inputs. Branches and database snapshots share these checkpoints and their histories. Snapshot retention follows these records to the input states and uses their qindexes to identify the source tuples to retain. When a query accesses a version without stored amplitudes, QuarkDB traces its operation history to an available checkpoint and replays the intervening operations to reconstruct the requested state. This sharing reduces repeated storage of common inputs and repeated execution of common circuit prefixes.

Figure 5 illustrates quantum data version management with a tuple update and subsequent quantum computations. Initially, quantum data version q0q_0 is prepared from tuple set T0T_0, and database snapshot Σ0\Sigma_0 retains both. Updating row u2u_2 from 25 to 27 creates a new tuple version t2′t'_2 in T1T_1. Meanwhile, applying circuits C1C_1 and C2C_2 to q0q_0 produces quantum data versions q1q_1 and q2q_2, both referencing the shared input q0q_0. Database snapshot Σ1\Sigma_1 retains T1T_1, q1q_1, and q2q_2. A relational query on Σ1\Sigma_1 reads the updated value 27, whereas tracing the input references of q1q_1 and q2q_2 to q0q_0’s qindex identifies the original tuple t2t_2 containing 25 at basis position 1.

Figure 5. Quantum data versions and persistent database snapshots.

Historical State Reconstruction

Quantum data reconstruction recovers the complex amplitudes of historical states so that database queries can reuse intermediate results from earlier computations. QuarkDB uses the version history to support forward replay from shared checkpoints and inverse execution from retained successors. Both paths reconstruct the quantum data at the target version.

Figure 6. Historical State Reconstruction through Forward Replay and Inverse Execution

Figure 6 shows the two reconstruction paths. Forward replay follows the target’s input references to a visible checkpoint or decoded cached state, then executes the intervening operations in computation order. Inverse execution starts from a retained successor connected to the target by reversible operations. It applies their inverses in reverse order to a working copy of the successor’s state vector, using the recorded register mapping. If the successor is not materialized, forward replay reconstructs it before inverse execution. The reconstructed quantum state supports historical query evaluation and serves as input for deriving new state versions.

Figure 7. Example of Inverse State Reconstruction from a Successor Checkpoint

Figure 7 illustrates inverse execution for recovering the target state v3=(∣00⟩+i∣11⟩)/2v_3 = (|00\rangle+ i|11\rangle)/\sqrt{2} from a successor checkpoint v4=(∣00⟩−∣11⟩)/2v_4 = (|00\rangle- |11\rangle)/\sqrt{2}. Applying the recorded inverse gate S0†S_0^\dagger to v4v_4 restores the relative phase of the ∣11⟩|11\rangle amplitude, recovering v3v_3. The two versions have identical computational-basis probabilities. Reconstruction thus restores the phase of v3v_3 for historical query processing.

Cost-Based Quantum Data Reuse

Quantum state reuse accelerates query processing using states produced by earlier computations. Building on version management and historical reconstruction, QuarkDB chooses the better strategy between inverse reconstruction and observable propagation estimated costs for historical queries.

For a target state ∣ψ⟩|\psi\rangle and retained successor ∣ϕ⟩=U∣ψ⟩|\phi\rangle= U|\psi\rangle, where UU is the recorded unitary evolution, inverse reconstruction recovers the target as U†∣ϕ⟩U^\dagger|\phi\rangle and evaluates the requested observable OO. Observable propagation instead evaluates the transformed observable O′=UOU†O' = UOU^\dagger on the retained successor ∣ϕ⟩|\phi\rangle:

⟨ψ∣O∣ψ⟩=⟨ϕ∣UOU†∣ϕ⟩.(4)\langle\psi|O|\psi\rangle= \langle\phi|UOU^\dagger|\phi\rangle. \tag*{(4)}

QuarkDB constructs O′O' by propagating the Pauli terms of OO through the recorded gates and combining identical terms.

QuarkDB estimates the processing costs of both strategies using state-vector size, recorded gate operations, and Pauli-term counts. For inverse reconstruction, the cost includes copying the successor state, executing inverse gates, and evaluating OO on the recovered state. For observable propagation, the cost includes transforming and combining Pauli terms through the recorded operations and evaluating O′O' on the retained successor. The estimator accounts for amplitude accesses during state operations and observable evaluation, as well as the Pauli terms processed during propagation. Since propagation may increase the number of Pauli terms, its transformation and evaluation costs can outweigh the cost of inverse reconstruction. Thus, QuarkDB selects observable propagation when avoiding inverse execution provides greater savings, and inverse reconstruction when observable transformation becomes more expensive.

Evaluation

We conduct extensive experiments to evaluate QuarkDB under different workloads and compare it with various classical relational databases and quantum databases.

Experimental Setup

Hardware settings. We deploy QuarkDB on a physical server running Ubuntu, equipped with an AMD Ryzen 9 9950X3D processor @ 4.3 GHz, 256 GB of RAM, and 4 TB of disk storage. The Linux kernel version is 6.8.0-136-generic() .

Implementation. We implement QuarkDB on the open-source system. We implement the hybrid query engine, execution engine, and storage engine based on PostgreSQL 18.4 using default settings. We use Qulacs [8] without any tuning as the quantum processing backend. We set the PLAN AUTO as the default operator selection mode of QuarkDB.

Baseline systems & methodologies. For relational query processing, we use PostgreSQL 18.4, SQLite 3.46.1, Qute [17], and DEDALUS [10]. We adapt Qute to PostgreSQL 18.4 and use Qulacs [8] for quantum sampling in Qute and DEDALUS. Moreover, for quantum data processing, these baselines use the same backend Qulacs and compiled user-defined functions (UDFs) for quantum operations and dense state vectors for storage. For circuit execution, we use Qiskit Aer 0.17.0 and Qulacs, and extend PostgreSQL and SQLite with InfiniQuantumSim’s SQL translator to execute circuits [24]. For version management, we evaluate three other methods in QuarkDB: Full Snapshot [25] stores a complete state per version; Event Sourcing [26] stores initial checkpoints and operation histories; Incremental Checkpointing [27] stores changed amplitude blocks. For state reconstruction, we also assess Full Recomputation [21], which executes each circuit from scratch, and Event Sourcing which reconstructs and caches the shared-prefix state after the first task. For historical queries, we compare three other strategies: Fixed Inverse [28] reconstructs the target state from a successor; Fixed Propagation [29] evaluates propagated observables on that successor; Forward Replay [25] reconstructs the target state from an ancestor checkpoint.

Performance of Query Processing

Performance of relational query processing. We evaluate the relational query processing performance of QuarkDB using queries in STATS-CEB on the STATS dataset, which contains eight tables and 1,029,842 rows [30]. The query set consists of 33 queries: eight low-complexity queries join 2–3 relations, and 25 high-complexity queries join 3–6. All systems run in the same hardware environment and execute identical queries. We measure query latency, execution time, and query compilation time.

Table II shows query latency, execution time, and compilation time across the five systems on the query sets. QuarkDB achieves the lowest latency in both complexity groups, with an overall 2.14×\times speedup over the fastest baseline, PostgreSQL, and 2.46–13.53×\times over the others. The speedups over PostgreSQL are 2.66×\times for low-complexity queries and 1.86×\times for high-complexity queries.

SystemQuery Latency (ms)Execution Time (ms)Query Compilation Time (ms)
Low ComplexityHigh ComplexityTotalLow ComplexityHigh ComplexityTotalLow ComplexityHigh ComplexityTotal
Ours957.0741820.7792777.853931.7851730.6312662.41625.28990.148115.437
SQLite33675.9803915.37537591.35433674.9023911.93237586.8331.0783.4434.521
PostgreSQL2548.4723389.2965937.7682538.7893359.3295898.1179.68329.96739.650
Qute2536.5724305.1216841.6922526.5604273.5336800.09310.01131.58841.599
DEDALUS2696.4936221.2158917.7082541.6835467.3598009.042154.810753.856908.666

Table II. Query Latency, Execution Time, and Compilation Time Comparison on STATS

The benefits are derived from the selection of better executable plans. Although analyzing quantum requirements and selecting operator combinations increase query compilation time, the selected plans reduce execution time in the Execution Engine. The reduction in query latency shows that these execution savings compensate for the additional compilation cost. Figure 8 further shows the trade-off. Although QuarkDB spends more time on query compilation than PostgreSQL across 4 queries (Figure 8(a)), the selected plans reduce execution time (Figure 8(b)), and these savings lower overall query latency (Figure 8(c)).

Figure 8. Query Compilation Time, Execution Time, and Latency Comparison on STATS

Performance of QuarkDB Execution

Benefits of Hybrid Operator Selection. To evaluate the effectiveness of hybrid operator selection, we compare QuarkDB in AUTO and CLASSICAL modes on Q16 and Q17. The CLASSICAL mode restricts plan selection to classical operators, whereas AUTO jointly considers classical and quantum operators. Table III reports the functional-stage execution times under both configurations, together with PostgreSQL using the default settings.

StageQ16 PGQ16 AutoQ16 ClassicalQ17 PGQ17 AUTOQ17 CLASSICAL
Preparation0.0880.7880.6250.1150.6490.531
Optimization0.5002.1040.7500.5807.7510.959
Plan generation0.0070.2300.0160.0120.1570.022
Initialization0.0120.0670.0110.0190.0910.343
Scan/filter8.0924.50311.81327.51926.87345.920
Join11.0022.11410.937130.7613.5889.954
Aggregation0.0090.0900.0105.2650.30855.243
Output0.0040.0020.0020.0050.0020.006
Control0.1520.1880.1980.1110.6100.280
Probe bookkeeping0.0150.0080.0131.0020.0773.264
Client residual0.0280.0260.0290.2040.0350.058
Total latency19.91010.12124.404165.59240.141116.578

Table III. Query Processing Time Breakdown for Q16 and Q17 (ms). PG: PostgreSQL; AUTO and CLASSICAL: QuarkDB Execution PLAN.

Compared with the CLASSICAL mode, AUTO achieves 2.41×\times and 2.90×\times speedups in end-to-end query latency on Q16 and Q17, respectively. In particular, during execution the selected hybrid plans achieve 5.17×\times and 2.77×\times speedups in join processing on Q16 and Q17, respectively. The hybrid plans also accelerate scan/filter processing on both queries and aggregation on Q17. Compared with PostgreSQL, AUTO achieves 1.97×\times and 4.13×\times end-to-end speedups on Q16 and Q17, respectively. The results illustrate that cost-based hybrid plan selection introduces additional optimization overhead, but the execution time savings outweigh this overhead, resulting in lower overall query latency.

Quantum Data Processing. Moreover, we use NetSquid repeater-chain data [31, 32] to evaluate the performance of quantum data processing. The dataset contains two-qubit density matrices with protocol and delivery-time metadata. The experiment selects 60 records and combines every five independent entangled pairs into one joint state, producing 12 states. Each state uses ten physical qubits and ten ancillary qubits to represent the mixed states. The workload covers state construction through query-result retrieval, which constructs and stores these joint states and computes mean Bell-pair fidelity by protocol. We measure the complete latency to assess the query processing performance, preparation time to analyze the circuit preparation cost, commit time to evaluate state storage cost and fidelity latency to calculate fidelity-analysis cost.

Figure 9 shows that QuarkDB outperforms all baselines, achieving speedups of 17.27–25.86×\times in complete latency and even 27.06–32.47×\times in fidelity-query latency over the four baselines. These improvements arise because our system integrates quantum operations into the entire database execution process, thereby reducing the significant data encoding and access cost of processing quantum data using traditional relational databases. While some quantum databases like Qute or DEDALUS introduce quantum functionality into query processing, they still encode quantum data in a traditional manner, resulting in poorer performance.

Figure 9. Latency Comparison for Quantum Data Processing

Performance of QuarkDB Execution

Quantum Circuit Execution Performance. We evaluate the circuit compilation and execution performance of QuarkDB using the InferQ dataset, which contains 202,975 quantum circuits assembled from circuit templates [24]. We select circuits at different qubit widths, and each nn-qubit circuit contains 2n2n RY gates, 2n2n RZ gates, and n−1n - 1 CNOT gates. All systems run in the same hardware environment and execute identical circuits. We measure circuit execution time and end-to-end latency to assess quantum execution performance and overall response time, respectively.

Figure 10 illustrates that QuarkDB achieves 3.25–5.30× execution speedups and 1.04–1.16× end-to-end latency speedups over Qulacs, the fastest baseline. Our system outperforms other database because QuarkDB-IR reduces amplitude updates and

Figure 10. Circuit Execution Time and End-to-End Latency Comparison on InferQ (Log Scale)

instruction dispatch by gate simplification and fusion. For example, at 12 qubits circuits simplification reduces 59 input gates to 35 logical gates, and fusion produces five backend operations dispatched through four instructions, thereby reducing latency.

Ablation Study. To understand the benefits of Instruction Rewriting and Circuit Reduction described in Section IV, we compare the system performance under ablation configurations: Neither, Instruction Rewriting, Circuit Reduction, and Both. Neither and Both disable and enable both optimizations, respectively, while Instruction Rewriting and Circuit Reduc- @page 10/14 starts_mid=1 ends_mid=1 tion enable only their corresponding optimizations.

Table IV shows QuarkDB achieves the largest speedup with Both at every qubit width, ranging from 1.36× to 5.55×. At 8 qubits, Instruction Rewriting reduces 147 instructions to four while retaining 144 gates; Circuit Reduction reduces the gate count to 62. Combining them produces 62 gates in four instructions and a 4.16× speedup. The two transformations remove different work: Circuit Reduction simplifies quantum operations, while Instruction Rewriting avoids repeated instruction construction, validation, and binding. The varying speedups across widths reflect these differences in instruction repetition and circuit structure.

Configuration4 qubits6 qubits8 qubits10 qubits12 qubits
Neither2.8920.7292.1131.0472.344
Instruction Rewriting0.5570.6910.7130.8491.307
Circuit Reduction1.4780.5971.1940.9981.973
Both0.5210.4720.5080.7691.040

Table IV. Ablation Study of Instruction Rewriting and Circuit Reduction

Effectiveness of historical data reuse. We use the 20-qubit Ising evolution [33] to evaluate the benefits of reusing historical data in queries. The workload retains 38 state versions, and five queries compute local and mean magnetization at three recorded times. We compare the performance of QuarkDB under four methods for processing historical queries: cost-based reuse, Fixed Inverse, Fixed Propagation, and Forward Replay. The evaluation measures complete workload latency and per-query latency to assess historical query performance.

Table V shows that QuarkDB achieves the lowest latency. The cost-based reuse strategy selects inverse reconstruction or observable propagation according to each query’s estimated execution cost. It evaluates propagated local observables on retained successor states to save reconstruction work. For mean magnetization, it selects inverse reconstruction to reduce the cost of evaluating an expanded observable. Reuse of successor states also reduces replay from ancestor checkpoints. These reductions yield complete-workload speedups of 1.22×, 1.32×, and 9.63× over Fixed Inverse, Fixed Propagation, and Forward Replay, respectively.

MethodLatency (ms)Speedup
Ours213.279.63×
Fixed Inverse260.177.89×
Fixed Propagation281.587.29×
Forward Replay2053.831.00×

Table V. Historical Query Workload Latency Comparison. Speedup is relative to Forward Replay.

Performance of Version Management and State Reconstruction

We evaluate the benefits of version management and state reconstruction using a 16-qubit QAOA maximum-cut circuit workload [3] on a three-regular graph with 16 vertices and 24 edges. The workload performs 256 reads and 256 one-layer updates on four quantum states and retains all 260 versions to evaluate version management overhead.

We measure reconstruction latency, including database restart and retrieval of the four committed states, and WAL volume to analyze the write cost of retaining these versions. To evaluate the reconstruction correctness, we assess reconstruction fidelity against independently computed reference states using Fv=∣⟨ψv∣ψ^v⟩∣2F_v = \lvert\langle\psi_v \mid\hat{\psi}_v\rangle\rvert^2 for normalized states, with an error threshold of 1−Fv≤10−121 - F_v \le10^{-12}. Moreover, we evaluate the benefits of reconstructed states for task processing. The workload further executes batches of 8, 16, or 32 tasks with an eight-layer shared prefix and a two-layer suffix specific to each task. We use batch latency and circuit time to measure the savings from supplying subsequent tasks with the reconstructed prefix state.

Figure 11 shows that QuarkDB reduces reconstruction latency by 30.0% compared with the best baseline Event Sourcing. QuarkDB retains all 260 versions using operation histories and eight checkpoint versions sharing two distinct state payloads. While additional writes generate slightly more WAL than Event Sourcing, retained checkpoints of QuarkDB provide starting states closer to the committed version, resulting in the lower latency. Full Snapshot stores every checkpoint, and Incremental Checkpointing requires the same number checkpoint because QAOA updates modify every amplitude block. Consequently, QuarkDB generates 85.3% less WAL than these two methods (Figure 11(b)). Figure 11(c) shows the infidelity of QuarkDB, covering 40 forward and inverse reconstructions at distances of 1, 8, 31, 32, and 64 circuit operations under linear and branched histories of, before and after restart. The maximum infidelity is 6.60×10−136.60 \times10^{-13}, which is below the corresponding threshold. And corresponding results before and after restart coincide, confirming that our state reconstruction can accurately generate the intended quantum state.

State reconstruction latency, WAL volume, and infidelity comparison

Figure 11. State Reconstruction Latency, WAL Volume, and Infidelity Comparison

Moreover, Figure 12(a) shows that QuarkDB achieves the lowest batch latency at 32 tasks, reducing it by 13.7% compared with Event Sourcing. QuarkDB loads the retained checkpoint of the shared prefix to supply inputs to subsequent tasks, while Event Sourcing replays this prefix once after the first task commits and then caches it. Compared with Full Recomputation, the batch-latency speedup increases from 1.66×1.66 \times at eight tasks to 2.17×2.17 \times at 32 tasks. The shared eight-layer prefix executes once, and each task executes only its two-layer suffix. At 32 tasks, this reduces executed layers from 320 to 72 and yields a 4.56×4.56 \times circuit speedup.

Figure 12. Batch Latency and Circuit Execution Time Comparison for Shared-Prefix Tasks

Related Work

Quantum Data Management

Quantum data management addresses the representation and processing of quantum states. Hai et al. [7] discuss data models, transactions, and recovery for quantum applications. Rieger et al. [34] define preparation, writing, readout, and deletion operations over index and data registers. Li et al. [35] propose quantum row-oriented and column-oriented table representations and analyze their qubit and gate requirements. Qymera [36] translates quantum circuits into SQL queries, representing amplitudes and gate matrices as tables. QuarkDB represents relation versions, quantum states, circuits, and classical results through a unified object model, and provides QSQL supporting quantum query processing.

Hybrid Query Optimization

Quantum approaches encode multiple query optimization [4] and join ordering [37] as quadratic unconstrained binary optimization (QUBO) problems. QDBO [9] reduces QUBO instances for quantum annealing and corrects them using sampling feedback. DEDALUS [10] weights join subsets using database statistics and prunes disconnected subsets before QUBO construction. Qute [17] compares classical and quantum operators by latency, success probability, and approximation error, using selective indexing to reduce encoded data. QuarkDB uses dynamic programming to select execution plans with classical and quantum operators based on estimated total cost, retaining the lowest-cost classical and quantum-containing subplans for each relation subset. Its cost model distinguishes candidate and output cardinalities and accounts for input preparation, quantum search, result readout, and transitions between classical and quantum operators.

Quantum Compilation and Execution

Quantum compilers use intermediate representations for optimization before hardware-specific translation [38]. ProjectQ [39] composes decomposition, local optimization, and execution engines. QIRO [40] exposes quantum and classical data dependencies for optimization; Quartz [41] optimizes circuits through generated and verified transformations. QuarkDB integrates database operations with quantum execution through three-level instructions intermediate representation QuarkDB-IR, System Commands, Macro Instructions, and Execution Primitives. It introduces Instruction Rewriting to eliminate redundant data preparation and predicate evaluation, reducing instruction construction and dispatch. It also designs Circuit Reduction to cancel inverse gate pairs, merge same-axis rotations, and combine successive single-qubit operations before backend execution. Both of them can efficiently reduce the execution cost.

Version Management and State Reuse

TimeArr stores historical arrays through backward deltas and accelerates version retrieval with skip links [42], while Decibel shares data across relational branches [43]. TQSim partitions circuits and reuses intermediate subcircuit results across noisy simulations [20]; qTask restricts incremental simulation to partitions affected by circuit modifications [21]. Heisenberg simulation propagates observables through circuits, with Pauli representations supporting expectation estimation [29], [44]. QuarkDB manages quantum state versions using shared checkpoints and operation histories. It reconstructs historical states through forward replay or inverse execution. The reconstructed states can serve as inputs to subsequent circuit execution. It also designs a cost-based quantum data reuse strategy for historical queries, which selects the better of inverse reconstruction and observable propagation on a retained successor to reduce the time cost, considering state-vector size, inverse gate operations, and Pauli-term processing.

Conclusion

This paper proposes QuarkDB, a hybrid database supporting quantum data management. we proposes a unified object model and QSQL interfaces for quantum data processing. By introducing hybrid optimization on operator combinations using dynamic programming and designing three-level instructions intermediate representation QuarkDB-IR, QuarkDB integrates quantum operations into database processing, enabling the database to support native quantum algorithms. Moreover, QuarkDB designs the special quantum data version management strategy and manage quantum data through shared checkpoints and operation histories. QuarkDB also supports historical quantum state reconstruction by forward replay or inverse execution from retained successors. Extensive results on real datasets show that QuarkDB achieves up to 2.14×2.14 \times speedup on relational queries and up to 25.86×25.86 \times speedup in quantum data processing latency over the evaluated baselines.

AI-GENERATED CONTENT ACKNOWLEDGMENT

We use generative AI solely for language refinement, including grammar checks and language polishing. The authors are fully accountable for the content.

References

References

  1. [21]T.-W. Huang, “qTask: Task-parallel quantum circuit simulation with incrementality,” in Proc. IEEE Int. Parallel Distrib. Process. Symp. (IPDPS), 2023, pp. 746–756.arxiv.org/abs/2210.01076
  2. [22]Y. Stade, L. Burgholzer, and R. Wille, “Towards supporting QIR: Steps for adopting the quantum intermediate representation,” in Proceedings of the SC ’25 Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis. Association for Computing Machinery, 2025, pp. 1907–1915. [Online]. Available: https://doi.org/10.1145/3731599.3776546
  3. [23]Y. Suzuki, S. Uno, R. Raymond, T. Tanaka, T. Onodera, and N. Yamamoto, “Amplitude estimation without phase estimation,” Quantum Inf. Process., vol. 19, no. 2, 2020, Art. no. 75.DOI
  4. [24]A. Ilniescu, A. Patwardhan, and R. Hai, “InferQ: A database-oriented benchmark for quantum circuits simulation,” Proc. ACM Manag. Data, vol. 4, no. 4, pp. 1–26, Sep. 2026, Art. no. 278. [Online]. Available: https://doi.org/10.1145/3837116
  5. [25]E. N. Elnozahy, L. Alvisi, Y.-M. Wang, and D. B. Johnson, “A survey of rollback-recovery protocols in message-passing systems,” ACM Comput. Surv., vol. 34, no. 3, pp. 375–408, 2002.
  6. [26]M. Overeem, M. Spoor, S. Jansen, and S. Brinkkemper, “An empirical characterization of event sourced systems and their schema evolution—lessons from industry,” J. Syst. Softw., vol. 178, 2021, Art. no. 110970. [Online]. Available: https://arxiv.org/abs/2104.01146
  7. [27]J. S. Plank, M. Beck, G. Kingsley, and K. Li, “Libckpt: Transparent checkpointing under Unix,” in Proc. USENIX Winter Tech. Conf., New Orleans, LA, USA, Jan. 1995, pp. 213–225. [Online]. Available: https://web.eecs.utk.edu/~jplank/plank/papers/USENIX-95W.html
  8. [28]X.-Z. Luo, J.-G. Liu, P. Zhang, and L. Wang, “Yao.jl: Extensible, efficient framework for quantum algorithm design,” Quantum, vol. 4, 2020, Art. no. 341.DOI
  9. [29]P. Rall, D. Liang, J. Cook, and W. Kretschmer, “Simulation of qubit quantum circuits via Pauli propagation,” Phys. Rev. A, vol. 99, no. 6, 2019, Art. no. 062337.DOI
  10. [30]Y. Han et al., “Cardinality estimation in DBMS: A comprehensive benchmark evaluation,” Proc. VLDB Endow., vol. 15, no. 4, pp. 752–765, 2022. [Online]. Available: https://www.vldb.org/pvldb/vol15/p752-zhu.pdf
  11. [31]A. Labay Mora, F. Ferreira da Silva, and S. Wehner, “Reducing hardware requirements for entanglement distribution via joint hardware-protocol optimization,” Quantum Sci. Technol., vol. 9, no. 4, 2024, Art. no. 045001.arxiv.org/abs/2309.11448
  12. [32]F. Ferreira da Silva, “Replication data for: Reducing hardware requirements for entanglement distribution via joint hardware-protocol optimization,” 4TU.ResearchData, 2023, dataset, version 1. [Online]. Available: https://doi.org/10.4121/0c6f100c-cf16-4fe1-81fe-afcafabdc7ca.v1
  13. [33]C. Lamb, Y. Tang, R. Davis, and A. Roy, “Ising meson spectroscopy on a noisy digital quantum simulator,” Nat. Commun., vol. 15, 2024, Art. no. 5901.DOI
  14. [34]C. Rieger, M. Grossi, G. G. Gu¬rreschi, S. Vallecorsa, and M. Werner, “Operational framework for a quantum database,” arXiv:2405.14947, 2024, version 2, Feb. 12, 2025. [Online]. Available: https://arxiv.org/abs/2405.14947v2
  15. [35]T. Li et al., “Quantum storage design for tables in RDBMS,” in Proc. 2nd Int. Workshop Quantum Data Science and Management (QDSM), 2024. [Online]. Available: https://vldb.org/workshops/2024/proceedings/QDSM/QDSM.4.pdf
  16. [36]T. Littau and R. Hai, “Qymera: Simulating quantum circuits using RDBMS,” in Companion of the 2025 Int. Conf. Management of Data, 2025, pp. 179–182.DOI
  17. [37]M. Schönberger, S. Scherzinger, and W. Mauerer, “Ready to leap (by co-design). Join order optimisation on quantum hardware,” Proc. ACM Manag. Data, vol. 1, no. 1, pp. 92:1–92:27, 2023.
  18. [38]T. Häner, D. S. Steiger, K. Svore, and M. Troyer, “A software methodology for compiling quantum programs,” Quantum Sci. Technol., vol. 3, no. 2, 2018, Art. no. 020501.DOI
  19. [39]D. S. Steiger, T. Häner, and M. Troyer, “ProjectQ: An open source software framework for quantum computing,” Quantum, vol. 2, 2018, Art. no. 49.DOI
  20. [40]D. Ittah, T. Häner, V. Kluchnikov, and T. Hoefler, “QIRO: A static single assignment-based quantum program representation for optimization,” ACM Transactions on Quantum Computing, vol. 3, no. 3, pp. 14:1–14:32, 2022.DOI
  21. [41]M. Xu et al., “Quartz: Superoptimization of quantum circuits,” in Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2022, pp. 625–640.DOI
  22. [42]E. Soroush and M. Balazinska, “Time travel in a scientific array database,” in Proc. IEEE Int. Conf. Data Eng. (ICDE). IEEE, 2013, pp. 98–109. [Online]. Available: https://doi.org/10.1109/icde.2013.6544817
  23. [43]M. Maddox, D. Goehring, A. J. Elmore, S. Madden, A. Parameswaran, and A. Deshpande, “Decibel: The relational dataset branching system,” Proc. VLDB Endow., vol. 9, no. 9, pp. 624–635, 2016.DOI
  24. [44]D. Gottesman, “The Heisenberg representation of quantum computers,” arXiv:quant-ph/9807006, 1998. [Online]. Available: https://arxiv.org/abs/quant-ph/9807006

Paper details

vlnc:W_h8u6sq3s
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY-SA 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents