Quantum algorithm involves the manipulation of amplitudes and computational basis, of which manipulating basis is largely a quantum analogue of classical computing that is always a major contributor to the complexity. In order to make full use of quantum mechanical speedup, more transformation should be implemented on amplitudes. Here we propose the notion of quantum amplitude arithmetic (QAA) that intent to evolve the quantum state by performing arithmetic operations on amplitude. Based on the basic design of multiplication and addition operations, QAA can be applied to solve the black-box quantum state preparation problem and the quantum linear system problem with fairly low complexity, and evaluate nonlinear functions on amplitudes directly. QAA is expected to find applications in a variety of quantum algorithms.
The Quantum Fourier Transform offers an interesting way to perform arithmetic operations on a quantum computer. We review existing Quantum Fourier Transform adders and multipliers and propose some modifications that extend their capabilities. Among the new circuits, we propose a quantum method to compute the weighted average of a series of inputs in the transform domain.
We demonstrate a technique for optimizing quantum circuits that is analogous to classical windowing. Specifically, we show that small table lookups can allow control qubits to be iterated in groups instead of individually. We present various windowed quantum arithmetic circuits, including a windowed modular exponentiation with nested windowed modular multiplications, which have lower Toffoli counts than previous work at register sizes ranging from tens of qubits to thousands of qubits.
Black-box quantum state preparation is an important subroutine in many quantum algorithms. The standard approach requires the quantum computer to do arithmetic, which is a key contributor to the complexity. Here we present a new algorithm that avoids arithmetic. We thereby reduce the number of gates by a factor of 286-374 over the best prior work for realistic precision; the improvement factor increases with the precision. As quantum state preparation is a crucial subroutine in many approaches to simulating physics on a quantum computer, our new method brings useful quantum simulation closer t…
In some quantum algorithms, arithmetic operations are of utmost importance for resource estimation. In binary quantum systems, some efficient implementation of arithmetic operations like, addition/subtraction, multiplication/division, square root, exponential and arcsine etc. have been realized, where resources are reported as a number of Toffoli gates or T gates with ancilla. Recently it has been demonstrated that intermediate qutrits can be used in place of ancilla, allowing us to operate efficiently in the ancilla-free frontier zone. In this article, we have incorporated intermediate qutrit…
This study presents a quantum circuit for estimating the pi value using arithmetic circuits and by quantum amplitude estimation. We review two types of quantum multipliers and propose quantum squaring circuits based on the multiplier as basic arithmetic circuits required for performing quantum computations. The squarer realized by a quantum adder with the gate size of $ O(n) $ requires $ O(n^2) $ gates and at least one ancillary qubits, while that realized by using quantum Fourier transform (QFT) requires $ O(n^3) $ gates without ancillary qubit. The proposed quantum circuit to estimate pi is …
Quantum circuits which perform integer arithmetic could potentially outperform their classical counterparts. In this paper, a quantum circuit is considered which performs a specific computational pattern on classically represented integers to accelerate the computation. Such a hybrid circuit could be embedded in a conventional computer architecture as a quantum device or accelerator. In particular, a quantum multiply-add circuit (QMAC) using a Quantum Fourier Transform (QFT) is proposed which can perform the calculation on conventional integers faster than its conventional counterpart. Whereas…
We describe a general-purpose framework to design quantum algorithms relying upon an efficient handling of arrays. The corner-stone of the framework is the direct embedding of information into quantum amplitudes, thus avoiding the need to deal with square roots or encode the information in registers. We discuss the entire pipeline, from data loading to information extraction. Particular attention is devoted to the definition of an efficient tool-kit of quantum arithmetic operations on arrays. We comment on strong and weak points of the proposed manipulations, especially in relation to an effec…
Quantum theory is based on a mathematical structure totally different from conventional arithmetic. Due to the symmetric nature of bosonic particles, annihilation or creation of single particles translates a quantum state depending on how many bosons are already in the given quantum system. This proportionality results in a variety of non-classical features of quantum mechanics including the bosonic commutation relation. The annihilation and creation operations have recently been implemented in photonic systems. However, this feature of quantum mechanics does not preclude the possibility of re…
We present some basic integer arithmetic quantum circuits, such as adders and multipliers-accumulators of various forms, as well as diagonal operators, which operate on multilevel qudits. The integers to be processed are represented in an alternative basis after they have been Fourier transformed. Several arithmetic circuits operating on Fourier transformed integers have appeared in the literature for two level qubits. Here we extend these techniques on multilevel qudits, as they may offer some advantages relative to qubits implementations. The arithmetic circuits presented can be used as basi…
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 impleme…
The quantum Fourier transform (QFT) brings efficiency in many respects, especially usage of resource, for most operations on quantum computers. In this study, the existing QFT-based and non-QFT-based quantum arithmetic operations are examined. The capabilities of QFT-based addition and multiplication are improved with some modifications. The proposed operations are compared with the nearest quantum arithmetic operations. Furthermore, novel QFT-based subtraction, division and exponentiation operations are presented. The proposed arithmetic operations can perform nonmodular operations on all sig…
Towards Fault-Tolerant Quantum Deep Learning: Designing and Analyzing Quantum ResNet and Transformer with Quantum Arithmetic and Linear Algebra Primitives
The theories of quantum mechanics and relativity dramatically altered our understanding of the universe ushering in the era of modern physics. Quantum theory deals with objects probabilistically at small scales, whereas relativity deals classically with motion in space and time. We show here that the mathematical structures of quantum theory and of relativity follow together from pure thought, defined and uniquely constrained by the same elementary "combining and sequencing" symmetries that underlie standard arithmetic and probability. The key is uncertainty, which inevitably accompanies obser…
Many quantum algorithms make use of oracles which evaluate classical functions on a superposition of inputs. In order to facilitate implementation, testing, and resource estimation of such algorithms, we present quantum circuits for evaluating functions that are often encountered in the quantum algorithm literature. This includes Gaussians, hyperbolic tangent, sine/cosine, inverse square root, arcsine, and exponentials. We use insights from classical high-performance computing in order to optimize our circuits and implement a quantum software stack module which allows to automatically generate…
This is an investigation of the limits of quantum circuit simulation with Schrodinger's formulation and low precision arithmetic. The goal is to estimate how much memory can be saved in simulations that involve random, maximally entangled quantum states. An arithmetic polar representation of $B$ bits is defined for each quantum amplitude and a normalization procedure is developed to minimize rounding errors. Then a model is developed to quantify the cumulative errors on a circuit of $Q$ qubits and $G$ gates. Depending on which regime the circuit operates, the model yields explicit expressions …
Continuous-variable (CV) encoding allows information to be processed compactly and efficiently on quantum processors. Recently developed techniques such as controlled beam-splitter operations and the near deterministic phonon subtractions make trapped ion systems attractive for exploring CV quantum computing. Here we propose a probabilistic scheme based on the boson sculpting technique for generating multipartite highly entangled states of motional modes of trapped ion systems. We also investigate the effects of decoherence on the fidelity of the generated state by performing numerical simulat…
Quantum algorithms to solve practical problems in quantum chemistry, materials science, and matrix inversion often involve a significant amount of arithmetic operations which act on a superposition of inputs. These have to be compiled to a set of fault-tolerant low-level operations and throughout this translation process, the compiler aims to come close to the Pareto-optimal front between the number of required qubits and the depth of the resulting circuit. In this paper, we provide quantum circuits for floating-point addition and multiplication which we find using two vastly different approac…
Bell's theorem is supposed to exclude all local hidden-variable models of quantum correlations. However, an explicit counterexample shows that a new class of local realistic models, based on generalized arithmetic and calculus, can exactly reconstruct rotationally symmetric quantum probabilities typical of two-electron singlet states. Observable probabilities are consistent with the usual arithmetic employed by macroscopic observers, but counterfactual aspects of Bell's theorem are sensitive to the choice of hidden-variable arithmetic and calculus. The model is classical in the sense of Einste…
Elliptic curves over finite fields GF(2^n) play a prominent role in modern cryptography. Published quantum algorithms dealing with such curves build on a short Weierstrass form in combination with affine or projective coordinates. In this paper we show that changing the curve representation allows a substantial reduction in the number of T-gates needed to implement the curve arithmetic. As a tool, we present a quantum circuit for computing multiplicative inverses in GF(2^n) in depth O(n log n) using a polynomial basis representation, which may be of independent interest.
One of the major promises of quantum computing is the realization of SIMD (single instruction - multiple data) operations using the phenomenon of superposition. Since the dimension of the state space grows exponentially with the number of qubits, we can easily reach situations where we pay less than a single quantum gate per data point for data-processing instructions which would be rather expensive in classical computing. Formulating such instructions in terms of quantum gates, however, still remains a challenging task. Laying out the foundational functions for more advanced data-processing i…
Since Shor's proposition of the method for factoring products of prime numbers using quantum computing, there has been a quest to implement efficient quantum arithmetic algorithms. These algorithms are capable of applying arithmetic operations simultaneously on large sets of values using quantum parallelism. Draper proposed an addition algorithm based on the quantum Fourier transform whose operands are two quantum registers, which I refer to as register-by-register addition. However, for cases where there is the need to be added a constant value to a target register, Draper's algorithm is more…