Exploiting the properties of quantum information to the benefit of machine learning models is perhaps the most active field of research in quantum computation. This interest has supported the development of a multitude of software frameworks (e.g. Qiskit, Pennylane, Braket) to implement, simulate, and execute quantum algorithms. Most of them allow us to define quantum circuits, run basic quantum algorithms, and access low-level primitives depending on the hardware such software is supposed to run. For most experiments, these frameworks have to be manually integrated within a larger machine learning software pipeline. The researcher is in charge of knowing different software packages, integrating them through the development of long code scripts, analyzing the results, and generating the plots. Long code often leads to erroneous applications, due to the average number of bugs growing proportional with respect to the program length. Moreover, other researchers will struggle to understand and reproduce the experiment, due to the need to be familiar with all the different software frameworks involved in the code script. We propose QuASK, an open-source quantum machine learning framework written in Python that aids the researcher in performing their experiments, with particular attention to quantum kernel techniques. QuASK can be used as a command-line tool to download datasets, pre-process them, quantum machine learning routines, analyze and visualize the results. QuASK implements most state-of-the-art algorithms to analyze the data through quantum kernels, with the possibility to use projected kernels, (gradient-descent) trainable quantum kernels, and structure-optimized quantum kernels. Our framework can also be used as a library and integrated into pre-existing software, maximizing code reuse.
翻译:利用量子信息特性以提升机器学习模型性能,或许是量子计算领域最活跃的研究方向。这一研究热潮推动了一系列软件框架(如Qiskit、Pennylane、Braket)的发展,用于实现、模拟及执行量子算法。这些框架大多允许用户定义量子线路、运行基础量子算法,并根据硬件特性访问底层原语。但在多数实验中,这些框架需手动集成到更庞大的机器学习软件流程中。研究人员需自行掌握不同软件包,通过编写冗长代码脚本完成集成、分析结果并生成图表。长代码往往导致错误应用——程序错误数量与代码长度呈正比增长。此外,其他研究者需熟悉代码脚本中涉及的所有软件框架,才能理解并复现实验。为此,我们提出QuASK——基于Python的开源量子机器学习框架。该框架特别关注量子核技术,可辅助研究者开展实验。作为命令行工具,QuASK支持数据集下载、预处理、量子机器学习流程执行、结果分析与可视化。其实现了当前主流的量子核数据分析算法,包括投影核函数、(梯度下降)可训练量子核函数及结构优化量子核函数。该框架亦可作为程序库集成至现有系统,最大化代码复用率。