Quantum parity algorithms as oracle calls, and application in Grover Database search

Similar documents
Quantum-inspired Huffman Coding

Chapter 10. Quantum algorithms

Complex numbers: a quick review. Chapter 10. Quantum algorithms. Definition: where i = 1. Polar form of z = a + b i is z = re iθ, where

Parallelization of the QC-lib Quantum Computer Simulator Library

Database Manipulation Operations on Quantum Systems

Parallel Simulation of Quantum Search

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

Parallelization of the QC-lib Quantum Computer Simulator Library

- Why aren t there more quantum algorithms? - Quantum Programming Languages. By : Amanda Cieslak and Ahmana Tarin

Introduction to Quantum Computing

Quantum Algorithms. Andreas Klappenecker Texas A&M University. Lecture notes of a course given in Spring Preliminary draft.

Volume 2, Issue 9, September 2014 International Journal of Advance Research in Computer Science and Management Studies

An Implementation of Compact Genetic Algorithm on a Quantum Computer

Introduction to Quantum Algorithms Part I: Quantum Gates and Simon s Algorithm

Quantum computing! quantum gates! Fisica dell Energia!

Quantum gate. Contents. Commonly used gates

Quantum Computing Virtual Machine. Author: Alexandru Gheorghiu Scientific advisor: PhD. Lorina Negreanu

DEVELOPING A QUANTUM CIRCUIT SIMULATOR API

C/CS/Phys C191 Quantum Gates, Universality and Solovay-Kitaev 9/25/07 Fall 2007 Lecture 9

Bounds for Error Reduction with Few Quantum Queries

CSCI 2570 Introduction to Nanocomputing. Discrete Quantum Computation

. Here we are using the standard inner-product over C k to define orthogonality. Recall that the inner-product of two vectors φ = i α i.

Lecture 3: Hilbert spaces, tensor products

Quantum Computing. 6. Quantum Computer Architecture 7. Quantum Computers and Complexity

QUANTUM COMPUTER SIMULATION

C/CS/Phys C191 Grover s Quantum Search Algorithm 11/06/07 Fall 2007 Lecture 21

Quantum Algorithms Lecture #2. Stephen Jordan

Introduction to Quantum Computing

Quantum Information Processing and Diagrams of States

IBM quantum experience: Experimental implementations, scope, and limitations

Introduction to Quantum Computing

ROM-BASED COMPUTATION: QUANTUM VERSUS CLASSICAL

Quantum Gates, Circuits & Teleportation

Quantum Computing Lecture 6. Quantum Search

Grover s algorithm. We want to find aa. Search in an unordered database. QC oracle (as usual) Usual trick

1 Readings. 2 Unitary Operators. C/CS/Phys C191 Unitaries and Quantum Gates 9/22/09 Fall 2009 Lecture 8

QLang: Qubit Language

Gates for Adiabatic Quantum Computing

A better lower bound for quantum algorithms searching an ordered list

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 1: Quantum circuits and the abelian QFT

2.0 Basic Elements of a Quantum Information Processor. 2.1 Classical information processing The carrier of information

Teleportation of Quantum States (1993; Bennett, Brassard, Crepeau, Jozsa, Peres, Wootters)

Hilbert Space, Entanglement, Quantum Gates, Bell States, Superdense Coding.

LECTURE NOTES ON QUANTUM COMPUTATION. Cornell University, Physics , CS 483; Spring, 2005 c 2006, N. David Mermin

1 Bernstein-Vazirani Algorithm

C/CS/Phys 191 Quantum Gates and Universality 9/22/05 Fall 2005 Lecture 8. a b b d. w. Therefore, U preserves norms and angles (up to sign).

arxiv: v1 [quant-ph] 6 Feb 2013

Introduction to Quantum Information Processing QIC 710 / CS 768 / PH 767 / CO 681 / AM 871

Introduction to Quantum Computation

Lecture 2: From Classical to Quantum Model of Computation

Quantum Searching. Robert-Jan Slager and Thomas Beuman. 24 november 2009

)j > Riley Tipton Perry University of New South Wales, Australia. World Scientific CHENNAI

Quantum Query Algorithm Constructions for Computing AND, OR and MAJORITY Boolean Functions

FPGA-Based Circuit Model Emulation of Quantum Algorithms

Unitary evolution: this axiom governs how the state of the quantum system evolves in time.

Lecture 3: Constructing a Quantum Model

Uncloneable Quantum Money

Chapter 2. Basic Principles of Quantum mechanics

Constructive quantum scaling of unitary matrices

Quantum algorithms for testing Boolean functions

4th year Project demo presentation

Quantum Communication Complexity

Reversible and Quantum computing. Fisica dell Energia - a.a. 2015/2016

Compute the Fourier transform on the first register to get x {0,1} n x 0.

α x x 0 α x x f(x) α x x α x ( 1) f(x) x f(x) x f(x) α x = α x x 2

Quantum Information & Quantum Computing

Exponential algorithmic speedup by quantum walk

arxiv:quant-ph/ v1 16 Nov 1995

b) (5 points) Give a simple quantum circuit that transforms the state

Quantum Information & Quantum Computation

Seminar 1. Introduction to Quantum Computing

Design Methodologies for Reversible Logic Based Barrel Shifters

6.896 Quantum Complexity Theory September 18, Lecture 5

Quantum Information Processing with Liquid-State NMR

with the ability to perform a restricted set of operations on quantum registers. These operations consist of state preparation, some unitary operation

2.2 Classical circuit model of computation

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Introduction to Quantum Computing for Folks

Ph 219b/CS 219b. Exercises Due: Wednesday 4 December 2013

92 CHAPTER III. QUANTUM COMPUTATION. Figure III.11: Diagram for swap (from NC).

Introduction of Quantum-inspired Evolutionary Algorithm

Tracking Quantum Circuits By Polynomials

Quantum Computing. Thorsten Altenkirch

Efficient Distributed Quantum Computing

QUANTUM COMPUTATION. Exercise sheet 1. Ashley Montanaro, University of Bristol H Z U = 1 2

Principles of Quantum Mechanics Pt. 2

6. Quantum error correcting codes

An Architectural Framework For Quantum Algorithms Processing Unit (QAPU)

Quantum Circuits and Algorithms

arxiv: v3 [cs.dm] 13 Feb 2018

An Analog Analogue of a Digital Quantum Computation

A High Level Programming Language for Quantum Computing

CS257 Discrete Quantum Computation

Introduction into Quantum Computations Alexei Ashikhmin Bell Labs

arxiv:quant-ph/ v1 15 Mar 2006

Tutorial on Quantum Computing. Vwani P. Roychowdhury. Lecture 1: Introduction

arxiv:quant-ph/ v5 6 Apr 2005

CHAPTER 2 AN ALGORITHM FOR OPTIMIZATION OF QUANTUM COST. 2.1 Introduction

arxiv:quant-ph/ Oct 2002

Concepts and Algorithms of Scientific and Visual Computing Advanced Computation Models. CS448J, Autumn 2015, Stanford University Dominik L.

Transcription:

Abstract Quantum parity algorithms as oracle calls, and application in Grover Database search M. Z. Rashad Faculty of Computers and Information sciences, Mansoura University, Egypt Magdi_z2011@yahoo.com This paper discusses the determination of the parity of a string of N binary digits, the well-known problem in classical as well as quantum information processing. It can be formulated as an oracle problem. It has been established that quantum algorithms require at least N /2 oracle calls. We present an algorithm that reaches this lower bound and is also optimal in terms of additional gate operations required. Keywords: parity, quantum computing, oracle. 1 Introducing Quantum Computing Quantum computing is a promising approach of computation that is based on equations from Quantum Mechanics. A Bit is the basic computational unit of computing. It encodes a 0 or a 1. A register of n bits can store ANY n-bit number. A qubit (quantum bit) exists in a superposition of states, and encodes the values 1 and 0 simultaneously. A quantum register of n qubits stores ALL n-bit numbers, i.e. 2 n values[1]. Quantum State The quantum state ψ represents a qubit if there are α, β C, where C is the set of Complex numbers, such that ψ = α 0 + β 1 or ψ = sin θ 0 + cos θ 1 With α 2 + β 2 =1. 0 and 1 are the computational basis states. Measuring the state ψ with respect to { 0, 1 } basis will give 0 with probability α 2 and 1 with probability β 2. The states + and defined as + = 1 1 0 + 1 2 2 = 1 1 0 1 2 2 DOI : 10.5121/acij.2012.3201 1

Matrix notation A 2-level quantum system can store a single qubit state.we will have Also, we can say that: 0 = 01 and 1 = 10. That is x = binary (x + 1). The symbol. is called a ket, while the symbol. is called a bra. ψ represents the conjugate transpose of ψ z1 z1 ψ = M ψ = M = zn zn where z 1,, z n Complex. ( z1,..., zn) Writing 1 0 + 0 1 means mapping 1 to 0 and 0 to 1. Note that ψ ψ = 1. Combing Qubits Let A and B be quantum systems with state spaces H A and H B, the state space of the joint quantum system is t For two qubits, This is made by tensor product This means that : An operation on a single qubit will in general affect all coefficients of the joint state vector. A single qubit operation is highly parallel operation. Adding a single quantum bit doubles the memory A note about operations on a Quantum Computer is that apart from measurements (Input/Output Operations) any quantum operation U is Linear, Length-preservingg (i.e. input vectors and output vectors have the same number of components), Unitary (i.e. UU t = I, where I is the identity matrix), Reversible, and Deterministic. 2

For detailed discussions on quantum computing and information, you can selectively refer to ([2], [3], [4]). 2. Simulating Quantum Algorithms. Any simulator for quantum algorithms must be capable of performing heavy mathematical matrix transforms. The design of the simulator itself usually takes the form of circuit model of connected gates. The circuit model of computation is equivalent to Turing machine model but is nearer to real computers ([2]). The building blocks that can build any circuit are called logic gates. The functionality of logic gates is described in terms of truth table, which specifies all possible configurations of input and the corresponding output. The elementary logic gates with their truth tables are given below, where A and B denote inputs and F denotes output. 3

(Figure 2: elementary classical logic gates) A set of connected gates accomplishing a certain computation is called a circuit. A gate called XOR (exclusive OR) and its inverse are given below. Actually, XOR is a common used circuit, so we handle it as if it is an elementary gate. (Figure 3: another two elementary logic gates) Note that: the NOT gate is reversible (as you can guess the input for any given output), while the AND gate is irreversible, so we can say that the AND gate erases information. Quantum gates are the same as the classical ones, but with maintaining the Reversibility and Length-preserving by usually outputting extra bits (ancilla bits) which usually correspond to a sufficient number of the inputs. For example, the quantum XOR gate takes two inputs, x and y say, and outputs x and the main output that is x y. x, y x, x y When studying quantum gates we usually classify them according to the number of qubits the gate operates on into 1D (1 dimensional), 2D, and 3D. The common 1D quantum gates are: 1 0 0 1 Identity = NOT = 0 1 1 0 1 1 1 Hadamard = 1 0 2 Phase _ Flip = 1 1 0 1 1 1 1 NOT = 2 1 1 The common 2D quantum gates are CNOT and SWAP. The CNOT (Controlled-Not) is quantum version of the XOR operation and it indicates the interaction between two qubits. This gate has many representations besides x, y x, x y 4

I/O transform Gate first input is the control (black) Matrix Block diagram and function (Figure 4: Different representations of CNOT gate) If first qubit is set then, apply NOT on the second qubit, else do nothing The SWAP gate can be derived from successive CNOT gates. The common 3D quantum gates are Toffoli and Fredkin which may be considered as the controlled 3D versions of CNOT and SWAP, respectively. For more about classical and quantum circuit models, you can refer to ([6], [7]) and ([1], [3]) respectively. 3. Parity Digital information processing relies on a number of error checking and correction algorithms. The most basic form of error detection checks the parity, which indicates if the number of 1 s in a binary string is even or odd. The number of computational steps required to determine the parity of a binary string increases linearly with the length of the string; this holds true for classical as well as for quantum information processors [19]. Quantum algorithms can reduce the number of steps required by a factor of 2 compared to classicall algorithms [19], [20]. 5

4. Grover Database search (Figure 5: Parity algorithm for n=2 qubits and n=3 bottom) Classically, searching a database of N elements for a certain element to specify its index N O requires O(N) comparisons, and 2 on average. Grover's algorithm achieves the same in O ( N ) ([18]). Figure 8 shows a sample database. index value 1 Chicago 2 Cairo 3 Mansoura M M (figure 8: sample search database) Grover's algorithm operates an N-element database, which sometimes is called Quantum Auto-associative Memory (QuAM). The basic idea of Grover's algorithm is to perform a check on all the elements several times and gradually increase the amplitude of the required state. O N iterations, a measurement operation will give the correct answer with probability After ( ) close to 1. In the sample database, x and I(x) correspond to indices and values respectively. Unitary operators applied are: U 1 = I 2 w w U 2 = 2 p 0 p 0 I where p 0 is the initial state of the database and w, a target state. When a target state w is 0, then p 0 = 1 1 N N x = 0 x 6

U 2 is a reverse transformation on the average, and is called a Diffusion operator. U 1 is a transformation of selective rotation on a target state, and is called an Oracle operator, with the following effect: x O x f ( = 1 ) ( ) x If x is the required element then the state x is rotated through π. Where f(x) =1 if x is the target, and f(x) =0 otherwise. Tracing Grover's Algorithm When it was the time to implement a case study utilizing the package, we decided to reimplement the most of the package, initially in VB.NET, into a web Flash object with ActionScript, and then embed it into a form as if it is built in VB.NET. This weird implementation is for many reasons: Challenging our programming skills. Better visuality, compared to command-line textual outputs Execution speed, compared to other web objects such as java applets. The window for Grover's algorithm is shown in figure 9. At the first sight, the overall design of the window looks similar to that found in adopted Quasi. The window consists of two sky-blue panels with three buttons in between. The upper panel shows the circuit, with a blue indicator to track progress of execution which can be controlled using the forward and backward buttons. Each step is called a stage. The lower panel is for states. The algorithm is restricted to the case of searching for an item out of four. We then need 2 (= log 2 4) qubits and a third on for control. To specify the index of the desired item, use restart button which shows the following window: figure 10: specifying the index () we have 16 stages and a final measure (M). A better look shows that we are applying one circuit twice each of 7 stages. We think that gate symbols are self describing as H for hadamard and for phase flip. Stage 5 is the oracle. At the end, we will find the system in the required state. 7

(figure 9: Grover windows) indicator The initial state is ( 000> 1.0 + ), and here are some steps of execution: State after stage 1: 000> 0.7071067811865475 + 100> 0.7071067811865475 + a stage State after stage 2: 000> 010> 100> 110> 8

State after stage 3: 001> 011> 101> 111> (figure 11: first steps of execution of Grover's algorithm) 5. Results and Conclusion Experimental results for the pure-state algorithm shown in Fig. 5, is shown below. FIG. 12. Experimental results for the pure-state algorithm shown in Fig. 5. 9

We have introduced a family of quantum algorithms that solve the parity problem with an optimal number of quantum gate operations. It uses the black-box scheme introduced by Beals et al. [19] to represent the strings as oracle gates. In agreement with the lower bound established by Beals et al., we can apply it after Grover search. The determination of the parity of a string of N binary digits can be formulated as an oracle problem. It has been established that quantum algorithms require at least N /2 oracle calls. 6. References [1] Andreas Klappenecker, The Quantum Circuit Model, Quantum computing seminar, Departments of Computer Science, Texas A&M University, 2001. [2] Rob Pike, An Introduction to Quantum Computation and Quantum Communication, Bell Labs, 2000 [3] G. Benenti, G. Casati, and G. Strini, Principles of Quantum Computation and Information, Volume 1: Basic Concepts, World Scientific, 2004. [4] M. Brocks, Quantum Computing and Communications, Springer, 1999. [5] N.J. Cutland, Computability: an introduction to recursive function theory, Cambridge University Press, 1980. [6] M.M. Mano, Computer System Architecture, Prentice-Hall International, 3 rd ed., 1993. [7] M.M. Mano, Digital Design, Prentice-Hall International, 3 rd ed, 2001. [8] S. Gay, Quantum Programming Languages: Survey and Bibliography, Bulletin of the European Association for Theoretical Computer, June 2005. [9] S. Bettelli, Toward an architecture for quantum programming PhD Thesis, Universita di Trento, 2002 [10] E. Knill, Conventions for quantum pseudocode, Los Alamos National Laboratory technical report, LAUR-96-2724, 1996. [11] P. Maymin, The lambda-q calculus can efficiently simulate quantum computers, 1997. quant-ph/9702057 [12] A. van Tonder, A Lambda Calculus for Quantum Computation, SIAM J. Comput. 33, 1109-1135, 2004. quant-ph/0307150 [13] B. Ömer, Quantum Programming in QCL, Master thesis (technical physics), Technical University of Vienna, 2001. [14] I. Glendinning, B. Ömer, Parallelization of the QC-lib Quantum Computer Simulator Library, Springer LNCS 3019, 2004. [15] Sze Meng Tan, A Quantum Optics Toolbox for Matlab 5, University of Auckland, Private Bag 92019, Auckland [16] QuaSi - Quantum Circuit Simulator, online version as java applet, at the site of the University of Karlsruhe [17] Cameron Wakefield and Henk-Evert Sonder,VB.NET Developer s Guide, Syngress Publishing, 2001. [18] Qcs - Quantum computer Simulator, online tutorial, at the site of www.senko-corp.co.jp [19] R. Beals, H. Buhrman, R. Cleve, M. Mosca, and R. de Wolf, J. ACM 48, 778, 2001. [20] E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, Phys. Rev. Lett. 81, 5442 1998. 8