Quantum compilation framework for data loading
Guillermo Alonso-Linaje, Utkarsh Azad, Jay Soni, Jarrett Smalley, Leigh Lapworth, Juan Miguel Arrazola
TL;DR
The paper presents an automated, approximation-aware quantum data-loading framework that jointly optimizes state preparation and diagonal encoding under a prescribed error budget $\varepsilon$, using a resource-estimation workflow built on PennyLane. It supports a broad set of methods (e.g., MPS, QROM, FSL, Walsh transforms) and enables hybrid, divide-and-conquer loading to minimize quantum resources. Two key innovations—compact block-encoding of $d$-diagonal matrices and an exact, QSP-based block encoding for kinetic energy operators—extend the framework's applicability to more complex Hamiltonians. Across Gaussian states, quantum chemistry, and CFD, the framework discovers non-obvious, structure-aware strategies that yield orders-of-magnitude reductions in gate counts and measurement overhead, demonstrating practical potential for resource-constrained quantum hardware.
Abstract
Efficient encoding of classical data into quantum circuits is a critical challenge that directly impacts the scalability of quantum algorithms. In this work, we present an automated compilation framework for resource-aware quantum data loading tailored to a given input vector and target error tolerance. By explicitly exploiting the trade-off between exact and approximate state preparation, our approach systematically partitions the total error budget between precision and approximation errors, thereby minimizing quantum resource costs. The framework supports a comprehensive suite of state-of-the-art methods, including multiplexer-based loaders, quantum read-only memory (QROM) constructions, sparse encodings, matrix product states (MPS), Fourier series loaders (FSL), and Walsh transform-based diagonal operators. We demonstrate the effectiveness of our framework across several applications, where it consistently uncovers non-obvious, resource-efficient strategies enabled by controlled approximation. In particular, we analyze a computational fluid dynamics workflow where the automated selection of MPS state preparation and Walsh transform-based encoding, combined with a novel Walsh-based measurement technique, leads to resource reductions of over four orders of magnitude compared to previous approaches. We also introduce two independent advances developed through the framework: a more efficient circuit for d-diagonal matrices, and an optimized block encoding for kinetic energy operators. Our results underscore the indispensable role of automated, approximation-aware compilation in making large-scale quantum algorithms feasible on resource-constrained hardware.
