As quantum computing evolves, many important questions emerge, such as how best to represent quantum programs, and how to promote interoperability between quantum program analysis tools. These questions arise naturally in the design of quantum transpilers, which translate between quantum programming languages. In this paper, we take a step towards answering these questions by identifying challenges and best practices in quantum transpiler design. We base these recommendations on our experience designing LinguaQuanta, a quantum transpiler between Quipper and OpenQASM. First, we provide categorical specifications for quantum transpilers, which aim to encapsulate the core principles of the UNIX philosophy. We then identify quantum circuit decompositions which we expect to be useful in quantum transpilation. With these foundations in place, we then discuss challenges faced during the implementation of LinguaQuanta, such as ancilla management and stability under round translation. To show that LinguaQuanta works in practice, a short tutorial is given for the example of quantum phase estimation. We conclude with recommendations for the future of LinguaQuanta, and for quantum software development tools more broadly.
翻译:随着量子计算的发展,许多重要问题应运而生,例如如何最佳地表示量子程序,以及如何促进量子程序分析工具之间的互操作性。这些问题自然地出现在量子转译器的设计中——这类工具用于在不同量子编程语言之间进行转换。本文通过识别量子转译器设计中的挑战与最佳实践,向回答上述问题迈出了一步。这些建议基于我们设计LinguaQuanta(一款在Quipper与OpenQASM之间转换的量子转译器)的实际经验。首先,我们为量子转译器提供范畴论规范,旨在封装UNIX哲学的核心原则。随后,我们确定了在量子转译过程中可能具有实用价值的量子电路分解方法。在此基础之上,我们进一步讨论了实现LinguaQuanta时面临的挑战,例如辅助量子位管理以及往返翻译下的稳定性问题。为证明LinguaQuanta的实际可用性,我们以量子相位估计为例给出了简短教程。最后,我们针对LinguaQuanta的未来发展以及更广泛的量子软件开发工具提出了建议。