Real-valued transforms such as the discrete cosine, sine, and Hartley transforms play a central role in classical computing, complementing the Fourier transform in applications from signal and image processing to data compression. However, their quantum counterparts have not evolved in parallel, and no unified framework exists for implementing them efficiently on quantum hardware. This article addresses this gap by introducing QRTlib, a library for fast and practical implementations of quantum real transforms, including the quantum Hartley, cosine, and sine transforms of various types. We develop new algorithms and circuit optimizations that make these transforms efficient and suitable for near-term devices. In particular, we present a quantum Hartley transform based on the linear combination of unitaries (LCU) technique, achieving a fourfold reduction in circuit size compared to prior methods, and an improved quantum sine transform of Type I that removes large multi-controlled operations. We also introduce circuit-level optimizations, including two's-complement and or-tree constructions. QRTlib provides the first complete implementations of these quantum real transforms in Qiskit.
翻译:实数变换(如离散余弦、正弦和哈特利变换)在经典计算中扮演着核心角色,在从信号与图像处理到数据压缩的各种应用中,它们是对傅里叶变换的重要补充。然而,其对应的量子版本并未同步发展,且目前缺乏在量子硬件上高效实现这些变换的统一框架。本文通过引入QRTlib填补了这一空白,这是一个用于快速、实用地实现量子实数变换的库,包括各类量子哈特利变换、余弦变换和正弦变换。我们开发了新的算法和电路优化技术,使得这些变换变得高效且适用于近期量子设备。特别地,我们提出了一种基于酉算子线性组合(LCU)技术的量子哈特利变换,与现有方法相比,其电路规模减少了四分之三;同时提出了一种改进的I型量子正弦变换,消除了大型多控制操作。我们还引入了电路级优化技术,包括二进制补码和或树结构。QRTlib在Qiskit中首次提供了这些量子实数变换的完整实现。