Quantum algorithms for computational linear algebra promise up to exponential speedups for applications such as simulation and regression, making them prime candidates for hardware realization. But these algorithms execute in a model that cannot efficiently store matrices in memory like a classical algorithm does, instead requiring developers to implement complex expressions for matrix arithmetic in terms of correct and efficient quantum circuits. Among the challenges for the developer is navigating a cost model in which conventional optimizations for linear algebra, such as subexpression reuse, can be inapplicable or unprofitable. In this work, we present Cobble, a language for programming with quantum computational linear algebra. Cobble enables developers to express and manipulate the quantum representations of matrices, known as block encodings, using high-level notation that automatically compiles to correct quantum circuits. Cobble features analyses that compute the time and space usage of programs, as well as optimizations that reduce overhead and generate efficient circuits using state-of-the-art techniques such as the quantum singular value transformation. We evaluate Cobble on benchmark kernels for simulation, regression, search, and other applications, showing 2.6x-25.4x speedups on these benchmarks compared to the unoptimized baseline.
翻译:摘要:量子线性代数算法在模拟和回归等应用中承诺实现指数级加速,使其成为硬件实现的主要候选方案。然而,这些算法执行的模型无法像经典算法那样高效地将矩阵存储在内存中,而是要求开发者基于正确且高效的量子电路,实现矩阵运算的复杂表达式。开发者面临的挑战之一是导航一个成本模型,其中传统的线性代数优化(如子表达式复用)可能不适用或无利可图。本文提出Cobble——一种面向量子计算线性代数的编程语言。Cobble使开发者能够使用高级符号表达和操作矩阵的量子表示(称为块编码),并自动编译为正确的量子电路。Cobble具备分析程序时空开销的功能,以及通过量子奇异值变换等前沿技术减少开销并生成高效电路的优化能力。我们在模拟、回归、搜索及其他应用的基准测试核心程序上评估Cobble,结果显示,与未优化的基线相比,这些测试实现了2.6倍至25.4倍的加速。