18,072 research outputs found
On Newton-Raphson iteration for multiplicative inverses modulo prime powers
We study algorithms for the fast computation of modular inverses.
Newton-Raphson iteration over -adic numbers gives a recurrence relation
computing modular inverse modulo , that is logarithmic in . We solve
the recurrence to obtain an explicit formula for the inverse. Then we study
different implementation variants of this iteration and show that our explicit
formula is interesting for small exponent values but slower or large exponent,
say of more than bits. Overall we thus propose a hybrid combination of
our explicit formula and the best asymptotic variants. This hybrid combination
yields then a constant factor improvement, also for large exponents
Quantum Arithmetic on Galois Fields
In this paper we discuss the problem of performing elementary finite field
arithmetic on a quantum computer. Of particular interest, is the
controlled-multiplication operation, which is the only group-specific operation
in Shor's algorithms for factoring and solving the Discrete Log Problem. We
describe how to build quantum circuits for performing this operation on the
generic Galois fields GF(), as well as the boundary cases GF() and
GF(). We give the detailed size, width and depth complexity of such
circuits, which ultimately will allow us to obtain detailed upper bounds on the
amount of quantum resources needed to solve instances of the DLP on such
fields.Comment: 29 pages, 12 figures. This is the most recent version, dated 11 April
02. Paper only posted now in reply to quant-ph/0301141, whose results are
complementary to ours and were obtained independentl
Statistical Assertions for Validating Patterns and Finding Bugs in Quantum Programs
In support of the growing interest in quantum computing experimentation,
programmers need new tools to write quantum algorithms as program code.
Compared to debugging classical programs, debugging quantum programs is
difficult because programmers have limited ability to probe the internal states
of quantum programs; those states are difficult to interpret even when
observations exist; and programmers do not yet have guidelines for what to
check for when building quantum programs. In this work, we present quantum
program assertions based on statistical tests on classical observations. These
allow programmers to decide if a quantum program state matches its expected
value in one of classical, superposition, or entangled types of states. We
extend an existing quantum programming language with the ability to specify
quantum assertions, which our tool then checks in a quantum program simulator.
We use these assertions to debug three benchmark quantum programs in factoring,
search, and chemistry. We share what types of bugs are possible, and lay out a
strategy for using quantum programming patterns to place assertions and prevent
bugs.Comment: In The 46th Annual International Symposium on Computer Architecture
(ISCA '19). arXiv admin note: text overlap with arXiv:1811.0544
Shor's quantum algorithm using electrons in semiconductor nanostructures
Shor's factoring algorithm illustrates the potential power of quantum
computation. Here we present and numerically investigate a proposal for a
compiled version of such an algorithm based on a quantum-wire network
exploiting the potentialities of fully coherent electron transport assisted by
the surface acoustic waves. Specifically, a non standard approach is used to
implement, in a simple form, the quantum circuits of the modular exponentiation
execution for the simplest instance of the Shor's algorithm, that is the
factorization of =15. The numerical procedure is based on a time-dependent
solution of the multi-particle Schr\"odinger equation. The near-ideal algorithm
performance and the large estimated fidelity indicate the efficiency of the
protocol implemented, which also results to be almost unsensitive to small
destabilizing effects during quantum computation.Comment: 22 pages, 7 figure
A quantum algorithm for greatest common divisor problem
We present a quantum algorithm solving the greatest common divisor (GCD)
problem. This quantum algorithm possesses similar computational complexity with
classical algorithms, such as the well-known Euclidean algorithm for GCD. This
algorithm is an application of the quantum algorithms for the hidden subgroup
problems, the same as Shor factoring algorithm. Explicit quantum circuits
realized by quantum gates for this quantum algorithm are provided. We also give
a computer simulation of this quantum algorithm and present the expected
outcomes for the corresponding quantum circuit
A 2D Nearest-Neighbor Quantum Architecture for Factoring in Polylogarithmic Depth
We contribute a 2D nearest-neighbor quantum architecture for Shor's algorithm
to factor an -bit number in depth. Our implementation uses
parallel phase estimation, constant-depth fanout and teleportation, and
constant-depth carry-save modular addition. We derive upper bounds on the
circuit resources of our architecture under a new 2D nearest-neighbor model
which allows a classical controller and parallel, communicating modules. We
also contribute a novel constant-depth circuit for unbounded quantum unfanout
in our new model. Finally, we provide a comparison to all previous
nearest-neighbor factoring implementations. Our circuit results in an
exponential improvement in nearest-neighbor circuit depth at the cost of a
polynomial increase in circuit size and width.Comment: 29 pages, 14 figures, 3 tables, presented at Reversible Computation
Workshop 2012 in Copenhagen. Updated with numerical circuit resource upper
bounds and constant-depth quantum unfanou
Advantages of a modular high-level quantum programming framework
We review some of the features of the ProjectQ software framework and
quantify their impact on the resulting circuits. The concise high-level
language facilitates implementing even complex algorithms in a very
time-efficient manner while, at the same time, providing the compiler with
additional information for optimization through code annotation - so-called
meta-instructions. We investigate the impact of these annotations for the
example of Shor's algorithm in terms of logical gate counts. Furthermore, we
analyze the effect of different intermediate gate sets for optimization and how
the dimensions of the resulting circuit depend on a smart choice thereof.
Finally, we demonstrate the benefits of a modular compilation framework by
implementing mapping procedures for one- and two-dimensional nearest neighbor
architectures which we then compare in terms of overhead for different problem
sizes
Fast versions of Shor's quantum factoring algorithm
We present fast and highly parallelized versions of Shor's algorithm. With a
sizable quantum computer it would then be possible to factor numbers with
millions of digits. The main algorithm presented here uses FFT-based fast
integer multiplication. The quick reader can just read the introduction and the
``Results'' section.Comment: 37 pages, LaTeX, 1 figur
Quantum arithmetic operations based on quantum Fourier transform on signed integers
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 signed numbers
without any limitation by using less resources. In addition, novel quantum
circuits of two's complement, absolute value and comparison operations are also
presented by using the proposed QFT-based addition and subtraction operations.Comment: 23 pages, 38 figures, Accepted by International Journal of Quantum
Information on Sep 3, 2020, Online Ready on Oct 8, 202
Efficient long division via Montgomery multiply
We present a novel right-to-left long division algorithm based on the
Montgomery modular multiply, consisting of separate highly efficient loops with
simply carry structure for computing first the remainder (x mod q) and then the
quotient floor(x/q). These loops are ideally suited for the case where x
occupies many more machine words than the divide modulus q, and are strictly
linear time in the "bitsize ratio" lg(x)/lg(q). For the paradigmatic
performance test of multiword dividend and single 64-bit-word divisor,
exploitation of the inherent data-parallelism of the algorithm effectively
mitigates the long latency of hardware integer MUL operations, as a result of
which we are able to achieve respective costs for remainder-only and full-DIV
(remainder and quotient) of 6 and 12.5 cycles per dividend word on the Intel
Core 2 implementation of the x86_64 architecture, in single-threaded execution
mode. We further describe a simple "bit-doubling modular inversion" scheme,
which allows the entire iterative computation of the mod-inverse required by
the Montgomery multiply at arbitrarily large precision to be performed with
cost less than that of a single Newtonian iteration performed at the full
precision of the final result. We also show how the Montgomery-multiply-based
powering can be efficiently used in Mersenne and Fermat-number trial
factorization via direct computation of a modular inverse power of 2, without
any need for explicit radix-mod scalings.Comment: 23 pages; 8 tables v2: Tweak formatting, pagecount -= 2. v3: Fix
incorrect powers of R in formulae [7] and [11] v4: Add Eldridge & Walter ref.
v5: Clarify relation between Algos A/A',D and Hensel-div; clarify
true-quotient mechanics; Add Haswell timings, refs to Agner Fog timings pdf
and GMP asm-timings ref-page. v6: Remove stray +bw in MULL line of Algo D
listing; add note re byte-LUT for qinv_
- …