23 research outputs found
An Introduction to Quantum Programming in Quipper
Quipper is a recently developed programming language for expressing quantum
computations. This paper gives a brief tutorial introduction to the language,
through a demonstration of how to make use of some of its key features. We
illustrate many of Quipper's language features by developing a few well known
examples of Quantum computation, including quantum teleportation, the quantum
Fourier transform, and a quantum circuit for addition.Comment: 15 pages, RC201
Five Quantum Algorithms Using Quipper
Quipper is a recently released quantum programming language. In this report,
we explore Quipper's programming framework by implementing the Deutsch's,
Deutsch-Jozsa's, Simon's, Grover's, and Shor's factoring algorithms. It will
help new quantum programmers in an instructive manner. We choose Quipper
especially for its usability and scalability though it's an ongoing development
project. We have also provided introductory concepts of Quipper and
prerequisite backgrounds of the algorithms for readers' convenience. We also
have written codes for oracles (black boxes or functions) for individual
algorithms and tested some of them using the Quipper simulator to prove
correctness and introduce the readers with the functionality. As Quipper 0.5
does not include more than \ensuremath{4 \times 4} matrix constructors for
Unitary operators, we have also implemented \ensuremath{8 \times 8} and
\ensuremath{16 \times 16} matrix constructors.Comment: 27 page
A tutorial introduction to quantum circuit programming in dependently typed Proto-Quipper
We introduce dependently typed Proto-Quipper, or Proto-Quipper-D for short,
an experimental quantum circuit programming language with linear dependent
types. We give several examples to illustrate how linear dependent types can
help in the construction of correct quantum circuits. Specifically, we show how
dependent types enable programming families of circuits, and how dependent
types solve the problem of type-safe uncomputation of garbage qubits. We also
discuss other language features along the way.Comment: Added a section on related work and a paragraph explaining qubit
initialization and terminatio
Sized Types for low-level Quantum Metaprogramming
One of the most fundamental aspects of quantum circuit design is the concept
of families of circuits parametrized by an instance size. As in classical
programming, metaprogramming allows the programmer to write entire families of
circuits simultaneously, an ability which is of particular importance in the
context of quantum computing as algorithms frequently use arithmetic over
non-standard word lengths. In this work, we introduce metaQASM, a typed
extension of the openQASM language supporting the metaprogramming of circuit
families. Our language and type system, built around a lightweight
implementation of sized types, supports subtyping over register sizes and is
moreover type-safe. In particular, we prove that our system is strongly
normalizing, and as such any well-typed metaQASM program can be statically
unrolled into a finite circuit.Comment: Presented at Reversible Computation 2019. Final authenticated
publication is available online at
https://doi.org/10.1007/978-3-030-21500-2_
Simple digital quantum algorithm for symmetric first order linear hyperbolic systems
This paper is devoted to the derivation of a digital quantum algorithm for
the Cauchy problem for symmetric first order linear hyperbolic systems, thanks
to the reservoir technique. The reservoir technique is a method designed to
avoid artificial diffusion generated by first order finite volume methods
approximating hyperbolic systems of conservation laws. For some class of
hyperbolic systems, namely those with constant matrices in several dimensions,
we show that the combination of i) the reservoir method and ii) the alternate
direction iteration operator splitting approximation, allows for the derivation
of algorithms only based on simple unitary transformations, thus perfectly
suitable for an implementation on a quantum computer. The same approach can
also be adapted to scalar one-dimensional systems with non-constant velocity by
combining with a non-uniform mesh. The asymptotic computational complexity for
the time evolution is determined and it is demonstrated that the quantum
algorithm is more efficient than the classical version. However, in the quantum
case, the solution is encoded in probability amplitudes of the quantum
register. As a consequence, as with other similar quantum algorithms, a
post-processing mechanism has to be used to obtain general properties of the
solution because a direct reading cannot be performed as efficiently as the
time evolution.Comment: 28 pages, 12 figures, major rewriting of the section describing the
numerical method, simplified the presentation and notation, reorganized the
sections, comments are welcome