Hardware-efficient circuits employed in Quantum Machine Learning are typically composed of alternating layers of uniformly applied gates. High-speed numerical simulators for such circuits are crucial for advancing research in this field. In this work, we numerically benchmark universal and gate-specific techniques for simulating the action of layers of gates on quantum state vectors, aiming to accelerate the overall simulation of Quantum Machine Learning algorithms. Our analysis shows that the optimal simulation method for a given layer of gates depends on the number of qubits involved, and that a tailored combination of techniques can yield substantial performance gains in the forward and backward passes for a given circuit. Building on these insights, we developed a numerical simulator, named TQml Simulator, that employs the most efficient simulation method for each layer in a given circuit. We evaluated TQml Simulator on circuits constructed from standard gate sets, such as rotations and CNOTs, as well as on native gates from IonQ and IBM quantum processing units. In most cases, our simulator outperforms equivalent Pennylane's default.qubit simulator by up to a factor of 10, depending on the circuit, the number of qubits, the batch size of the input data, and the hardware used.
翻译:量子机器学习中采用的硬件高效电路通常由交替的均匀门层构成。针对此类电路的高速数值模拟器对于推动该领域研究至关重要。本工作中,我们对模拟量子态向量上门层作用的通用技术与门特定技术进行了数值基准测试,旨在加速量子机器学习算法的整体模拟。分析表明,针对特定门层的最优模拟方法取决于所涉及的量子比特数量,且定制化的技术组合能在给定电路的前向传播与反向传播过程中带来显著的性能提升。基于这些发现,我们开发了名为TQml Simulator的数值模拟器,该模拟器针对给定电路中的每一层采用最高效的模拟方法。我们在由标准门集(如旋转门与CNOT门)构建的电路上,以及IonQ和IBM量子处理单元的本地门集上评估了TQml Simulator。在大多数情况下,根据电路结构、量子比特数量、输入数据批大小及所用硬件的不同,我们的模拟器性能优于Pennylane的default.qubit模拟器,最高可达10倍。