In this paper, we present Q# implementations for arbitrary single-variabled fixed-point arithmetic operations for a gate-based quantum computer based on lookup tables (LUTs). In general, this is an inefficent way of implementing a function since the number of inputs can be large or even infinite. However, if the input domain can be bounded and there can be some error tolerance in the output (both of which are often the case in practical use-cases), the quantum LUT implementation of certain quantum arithmetic functions can be more efficient than their corresponding reversible arithmetic implementations. We discuss the implementation of the LUT using Q\# and its approximation errors. We then show examples of how to use the LUT to implement quantum arithmetic functions and compare the resources required for the implementation with the current state-of-the-art bespoke implementations of some commonly used arithmetic functions. The implementation of the LUT is designed for use by practitioners to use when implementing end-to-end quantum algorithms. In addition, given its well-defined approximation errors, the LUT implementation makes for a clear benchmark for evaluating the efficiency of bespoke quantum arithmetic circuits .
翻译:在本文中,我们介绍了基于查看表格(LUTs)的基于门基量子计算机的任意单变量固定点算术操作。一般来说,这是一种执行函数的不完美方式,因为投入数量可能很大甚至无限。然而,如果输入域可以被捆绑,产出中可能存在某些差错容忍度(两者通常都是实际使用案例),某些量子计算函数的量子 LUT实施量子量子LUT比相应的可逆算术实施效率更高。我们用 ⁇ (LUT)及其近似误差讨论LUT的实施问题。我们然后举例说明如何使用LUT来实施量子算术功能,并将执行该功能所需的资源与当前最先进的算术实施某些常用算术功能进行比较。LUT的实施是为了让从业者在实施端到端量算算法时使用。此外,由于其定义明确的近称错误,LUT的实施为评估简单量子算学路的效率规定了明确的基准。