Full text
Universidade do Minho Escola de Engenharia Departamento de Inform´ atica Jaime Pereira Santos Quantum Random Walks Simulations and physical realizations September 2021
Universidade do Minho Escola de Engenharia Departamento de Inform´ atica Jaime Pereira Santos Quantum Random Walks Simulations and physical realizations Master dissertation Integrated Master’s in Physics Engineering Dissertation supervised by Lu´ıs Barbosa Bruno Chagas September 2021
COPYRIGHT AND TERMS OF USE This is an academic work that can be used by third parties as long as good practices are respected as well as internationally accepted rules concerning copyright and related rights. Thereby, this work can be used under the terms set out in the license below. If one needs permission to work under a different set of conditions not provided by the indicated license, one must contact the author, through the University of Minho RepositoriUM. https://creativecommons.org/licenses/by/4.0/ i
STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. ii
ACKNOWLEDGEMENTS I would like to express my gratitude to my supervisor prof. Lu ´ ıs Barbosa, for all of the opportunities, support and patience throughout the entirety of my Masters degree; to my co-supervisor Bruno Chagas, for the countless hours dedicated to the development of this dissertation and invaluable advice. I would also like to thank my family, especially my parents, for their unconditional support throughout all my life. A very special thank you to my girlfriend, Cl ´ audia Vieira, for her love and encouragement and also for keeping me grounded in these trying times. Finally, this dissertation was financed by the ERDF – European Regional Development Fund through the Operational Programme for Competitiveness and Internationalization - COMPETE 2020 Programme and by National Funds through the Portuguese funding agency, FCT - Funda c¸˜ ao para a Ci ˆ encia e a Tecnologia, within project POCI-01-0145-FEDER-030947. iii
ABSTRACT Quantum computing is an emergent field that brings together Quantum Mechanics, Computer Science and Information Theory, which promises improvements to classical algorithms such as simulation of quantum systems, cryptography, data base searching and many others. Among these algorithms, quantum walks may provide a quadratic speed up when compared to their classical counterparts, allowing improvements to applications such as element distinctness, searching problems, matrix product verification and hitting times in graphs. The present work offers a general theoretical overview, simulation and circuit implementation of the coined, staggered and continuous-time quantum walk models. The first two chapters of this thesis are dedicated to the definition of the theoretical framework, simulation in Python and comparison of the aforementioned quantum walk models for the simple case of the dynamics in a line graph and for the search algorithm in a complete graph. This is then used as a benchmark for the final chapter, devoted to building and testing the circuits corresponding to models mentioned above in IBM’s Qiskit. A main contribution of this dissertation concerns the circulant graph approach to diagonal operators for continuous-time quantum walks. Keywords: Quantum Computing Quantum Walks Python Qiskit iv
RESUMO A computa c¸˜ ao qu ˆ antica ´ e uma ´ area emergente, que junta os campos de Mec ˆ anica Qu ˆ antica, Ci ˆ encias da Computa c¸˜ ao e Teoria da Informa c¸˜ ao, com a promessa de melhoramentos a algoritmos cl ´ assicos tais como a simula c¸˜ ao de sistemas qu ˆ anticos, criptografia, busca em base de dados, e outros. Entre estes algoritmos, as caminhadas qu ˆ anticas surgem com um ganho quadr ´ atico de complexidade em compara c¸˜ ao ` as caminhadas cl ´ assicas, possibilitando melhor desempenho em aplica c¸ ˜ oes como distin c¸˜ ao de elementos, problemas de busca, verifica c¸˜ ao de produtos de matrizes e tempos de alcance em grafos. O trabalho atual oferece uma vis ˜ ao geral de um ponto de vista te ´ orico, de simula c¸˜ ao e de implementa c¸˜ ao de circuitos, relativos aos modelos de caminhadas qu ˆ anticas com moeda, escalonadas e continuas no tempo. Os primeiros dois cap ´ ıtulos desta tese s ˜ ao dedicados ` a defini c¸˜ ao da estrutura te ´ orica, simula c¸˜ ao em Python e compara c¸˜ ao dos modelos supracitados, para o caso simples da din ˆ amica na linha, e para o problema de busca num grafo completo. Isto ser ´ a ent ˜ ao utilizado como refer ˆ encia para o capitulo final, dedicado ` a constru c¸˜ ao e teste dos circuitos correspondentes aos modelos supracitados. Uma contribui c¸˜ ao principal desta disserta c¸˜ ao diz respeito ` a abordagem de grafos circulantes para realiza c¸˜ ao de caminhadas qu ˆ anticas continuas no tempo. Palavras-Chave: Computac¸ ˜ ao Quˆ antica Caminhadas Quˆ anticas Python Qiskit v
CONTENTS 1 introduction 1 1.1Brief History of Quantum Computing 1 1.2Classical and Quantum Walks 4 1.3State of the Art on Quantum Walk Implementations 6 1.4Objectives, Contributions and Structure 8 2 quantum walks 10 2.1Classical Random Walk 10 2.2Coined Quantum Walk 12 2.3Staggered Quantum Walk 17 2.4Continuous-Time Quantum Walk 20 3 searching problems 24 3.1Grover’s Algorithm 24 3.1.1One marked element 26 3.1.2Multiple marked elements 28 3.1.3Single-Shot Grover 30 3.2Coined Quantum Walk 31 3.3Staggered Quantum Walk 33 3.4Continuous-Time Quantum Walk 35 4 implementations and applications 39 4.1Coined Quantum Walk 40 4.2Staggered Quantum Walk 43 4.3Continuous-Time Quantum Walk 46 4.4Implementing Search Algorithms in Qiskit 52 4.4.1Grover’s Algorithm 52 4.4.2Searching with a Coined Quantum Walk 55 4.4.3Searching with a Staggered Quantum Walk 58 4.4.4Searching with a Continuous-Time Quantum Walk 61 5 discussions and conclusion 65 a support material 75 a.1The Postulates of Quantum Mechanics 75 a.2Quantum Fourier Transform 79 vi
LIST OF FIGURES Figure 1 Probability distribution for the classical random walk on a line, after 72 , 180 and 450 steps, running 300000 experiments for each number of steps, with starting position on vertex 0. 11 Figure 2 Standard deviation after 200 steps for the quantum walk in blue, and the classical random walk in red. 14 Figure 3 Probability distribution for the coined quantum walk on a line, after 32 , 64 and 128 steps, with initial condition |ψ(0)i=|0i|x=0i and the Hadamard coin. 14 Figure 4 Probability distribution for the coined quantum walk on a line, after 32 , 64 and 128 steps, with initial condition |ψ(0)i=|1i|x=0i and the Hadamard coin. 15 Figure 5 Probability distribution for the coined quantum walk on a line, after 32 , 64 and 128 steps, with initial condition |ψ(0)i=|0i+i|1i √2|x=0i and the Hadamard coin. 16 Figure 6Tessellation of a line graph. 18 Figure 7 Probability distribution for the staggered quantum walk on a line after 50 steps, with initial condition |ψ(0)i=|0i+|1i √2 , for multiple values of θ.18 Figure 8 Probability distributions for the staggered quantum walk on a line after 50 steps, for different initial conditions. 19 Figure 9 Probability distribution for the continuous-time quantum walk on a line, at t=40 , 80 and 120 , with initial condition |ψ(0)i=|0i and γ=1 2√2.21 Figure 10 Probability distribution for the continuous-time quantum walk on a line, at t=100 , with initial condition |ψ(0)i=|0i+|1i √2 , for multiple values of γ.22 Figure 11 Probability of one marked element in the Grover search, as a function of the number of steps, for N=32, 64, 128 and 256. 27 Figure 12 Probability of two marked elements in the Grover search, as a function of the number of steps, for N=32, 64, 128 and 256. 29 Figure 13 Total probability of marked elements in the Grover search, as a function of the number of marked elements, for 1 step, with N=32 , 64 , 128 and 256. 30 vii
1.1. Brief History of Quantum Computing 3 A more modest, but very relevant advantage was presented by Grover (1996) in the form of a quantum algorithm able to speed up unstructured database searches quadratically. Even though it’s not an exponential improvement like Shor’s algorithm, search-based algorithms are useful in many contexts, so even a ”small” quadratic gain generated a lot of interest. Contemporary to computer science, information theory is another field very relevant to this topic. Shannon (1948) revolutionized how communication and information are understood. In his paper, Shannon was interested in defining what resources are required to send information over a communication channel and how to reliably send that information mitigating the effects of noise. This led to the discovery of the two fundamental theorems of information theory. Firstly, Shannon’s noiseless channel coding theorem specifies what resources are needed to store information sent from a source. Secondly, the noisy channel coding theorem, specifies how much information can be sent through a channel subject to noise. Even though Shannon’s second theorem does not define any specific methodology to reduce noise, it sets an upper limit on how much noise can be mitigated through said methodology. These are known as error-correcting codes and research has developed better and better codes that get closer and closer to Shannon’s limit. They are used wherever there is a need to store or transmit information. Similar progress was made in quantum information theory. Schumacher (1995) developed a quantum version of Shannon’s noiseless coding theorem, where he defined a quantum bit as a physical resource. There is no analogue for the second Shannon theorem, but that didn’t stop the development of quantum error-correcting theory. For example, Calderbank and Shor (1996) and Steane (1996) proposed an important class of quantum error-correcting codes known as CSS. Error-correcting was designed to protect quantum states, but another discovery by Bennett and Wiesner (1992) showed another interesting aspect of quantum information when transmitting classical information through a quantum channel. They explained how to send two classical bits of information using only one qubit, in a phenomenon known as superdense coding. Another interesting application of quantum information is in the field of cryptography. Wiesner (1983) showed how quantum mechanics could be used to make sure that a information sent could not be interfered with without destroying it. Building on this work, Bennett and Brassard (1984) proposed a quantum key distribution protocol between sender and receiver that could not spied upon without notice. Many other protocols have since been proposed and experimental prototypes developed. Finally, another interesting field within quantum computation is based on the concept of distributed quantum computation. Quantum clusters show promise since they require exponentially less communication to solve certain problems, such as modeling quantum systems, but are stil in their infancy due to technical restrictions. There has been an increasing
1.2. Classical and Quantum Walks 4 international interest in taking advantage of these systems to build a quantum internet which promises better and safer transmission of information, but there are still many technological improvements to be made before this becomes a mainstream reality. 1.2 classical and quantum walks The Church-Turing thesis, that states that any algorithmic process can be simulated efficiently using a Turing Machine, was challenged by Solovay and Strassen (1977) where they presented what is known as the Solovay-Strassen primality test. They showed that it is possible to test whether a integer is prime or composite using a randomized algorithm. The implication is that, because of the randomness, the Solvay-Strassen primality test does not determine with certainty whether a integer is prime or composite, rather it computes that a number is probably prime or else certainly composite. This is of significance since no deterministic test for primality was known at the time 1 , meaning that this was an example of a class of problems that could not be efficiently solved by a conventional deterministic Turing Machine. This led to a modification of the Church-Turing thesis, now stating that any algorithm can be simulated efficiently using a probabilistic Turing machine. The discovery of more instances of such algorithms followed, Motwani and Raghavan (1995) and Papadimitrious (1994) show several problems that can be solved based on randomized algorithms. For example, the Quicksort algorithm, developed by Hoare (1961), has a high probability of finishing in O(nlog n) . In contrast to many deterministic algorithms that require O(n2) time. They also show algorithms that take advantage of Markov chains and the Monte Carlo method. The volume of a convex body, proposed by Dyer et al. (1991), can be estimated by a randomized algorithm in polynomial time; the permanent of a nonnegative entry matrix can also be approximately calculated in probabilistic polynomial time as was shown by Jerrum et al. (2004) and the k-SAT and satisfiability with restrictions problem by Sch¨ oning (1999). Random walks, as the name suggests, belong to this class of algorithms. Pearson (1905) coined the term random walk, and they can be described as path consisting of a succession of steps determined by a stochastic process, over a mathematical space. They are a special case of Markov chains, which are stochastic processes that assume discrete values and whose next state is dictated by a deterministic or random rule based only on the current state. This is a useful framework, since it can be used to explain the behaviour of systems across many fields, from the Brownian movement of particles moving through a gas, to the price of a fluctuating stock as shown by Cootner (1967). 1 Work by Agrawal et al. (2002) has since found a general, polynomial, deterministic, and unconditional primality proving algorithm.
1.2. Classical and Quantum Walks 5 The quantum analogue of the random walk was firstly developed by Aharonov et al. (1993), where they defined the coined quantum random walk. This model consists of a walker and a coin that determines the movement of the walker, which are both quantum systems where time is a discrete variable dictated by the successive quantum coin flips and shifts in position. Nayak and Vishwanath (2000) and Aharonov et al. (2001) present the first analyses of the quantum walk on a graph described by a line. Further work by Inui et al. (2003) studies the behaviour of the walk on grids and Aharonov et al. (2001) on general regular graphs. The first algorithmic applications appear in the work of Shenvi et al. (2003) where they constructed a search problem based on the quantum random walk, and Ambainis (2007) applied it to the element distinction problem. On a more theoretical note, Konno (2002) demonstrated how the classical and quantum models of the random walk on the line differ, and Grimmett et al. (2003) generalized this to higher dimensions. Lovett et al. (2010) demonstrated that any quantum algorithm can be reformulated as a discrete time quantum walk algorithm, effectively showing that this model can be used for universal quantum computation. A different model for quantum random walks emerged from the work of Farhi and Gutmann (1998), where a different way of computing a search problem was presented. They showed that evolving a system in time between an initial and final Hamiltonian is analogous to the Grover algorithm, but continuous in time. Farhi et al. (2000) revised their work, now known as an adiabatic evolution, to solve Boolean sat problems. Childs and Goldstone (2004) formulated a model of a quantum walk in terms of adiabatic evolution, known as continuous time quantum walk or adiabatic quantum walk.Aharonov et al. (2007) showed that any quantum algorithm can be efficiently simulated using adiabatic evolution, meaning that it is polynomially equivalent to the conventional quantum computation model. Further work by Childs (2009) showed that this model is indeed universal. The main difference between these two quantum walk models lies on the fact that in the discrete case, the system evolves with the flipping of a coin and subsequent movement of the walker, whilst in the adiabatic case the system evolves smoothly in time. Yet another way of thinking about quantum walks was announced by Szegedy (2004), where he describes a discrete model based on Markov chain random walks. At the foundation of this model is the duplication of a graph, a process by which a bipartite graph is created. Magniez et al. (2007) show how to use this walk for triangle detection in an undirected graph. Magniez et al. (2006) proposed a search problem, which takes advantage of ergodicity and simmetry properties of Markov chains, with quadratic gain compared to classical algorithms. Problems like element distinctness, matrix product verification and others were formulated within this framework by Santha (2008). Further work by Portugal (2015) established a connection between the coined and Szegedy’s quantum walk, by defining a model that encompasses and expands the latter.
1.3. State of the Art on Quantum Walk Implementations 6 Patel et al. (2005) pointed that, at the time, there was confusion surrounding the scaling behaviour of discrete and adiabatic quantum walk algorithms. They argued that this was because the former model used a coin, which is an extra resource, and the latter didn’t. So, in an attempt to resolve this confusion, they showed that a discrete time quantum walk could be constructed without the use of a coin. A new way of thinking about quantum walks came with the development of the methods behind the construction of evolution operators, by Falk (2013), introducing the concept of tessellations, based on local diffusion operators. Portugal et al. (2015) studied this model applied to a line graph. Further work by Portugal et al. (2016) formalized this approach naming it staggered quantum walk, and showed instances where the Szegedy quantum walk is equivalent. This suggests that this is a more general model, being able to describe other discrete-time quantum walks. Portugal et al. (2017) delved deeper into this topic, adding Hamiltonians to the model, and Portugal and Fernandes (2017) shows how this can be instanced as a search problem in a grid. Finally, Coutinho and Portugal (2018) analyze how a continuous-time quantum walk can be cast into this discrete model and Moqadam et al. (2017) show a possible physical implementation of this walk. 1.3 state of the art on quantum walk implementations One of the earliest works on a more computational approach to quantum random walks was by Marquezino and Portugal (2008), where they created a general simulator for discretetime quantum walks on one- and two-dimensional lattices. They argued that this framework allowed researchers to focus more on the mathematical aspect of quantum walks, instead of the specific numerical implementations. Further work on these lattices was later presented by Sawerwain and Gielerak (2010), where they studied the simulation of quantum walks by taking advantage of the GPU and CUDA technology. Another interesting program for simulating discrete-time quantum walks came with the work of Berry et al. (2011). This package allows for direct simulation of these walks, and visualization of the time-evolution on arbitrary undirected graphs. It also allowed for plotting of continuous-time quantum walks, provided the data was provided externally. There are, however, direct simulators of continuous-time quantum walks, the earliest being by Izaac and Wang (2015). Their distributed memory software claims to be able to perform efficient simulation of multiparticle continuous-time quantum walk based systems, on High Performance Computing platforms. Falloon et al. (2017) provide a Mathematica package that implements a simulator of Quantum Stochastic Walks, which are a generalization of the continuous-time model. These walks incorporate both coherent and incoherent dynamics, which means that quantum stochastic walks can be instantiated as both quantum walks and classical random walks. What this paper then provides is a way of implementing quantum walks on directed graphs, opening the door to applications ranging from the capture of energy by photosyntethic
1.3. State of the Art on Quantum Walk Implementations 7 protein complexes, to page ranking algorithms used by search engines. This package was ported to and expanded in the Julia programming language by Glos et al. (2018). In order to truly harness the power of quantum computing, however, one must be able to perform these algorithms on quantum hardware. For this purpose, various implementations of quantum walks on quantum circuits have been purposed. Douglas (2009) pioneered this approach by developing efficient quantum circuits for discrete-time quantum walks on highly symmetric graphs, whose resources scale logarithmically with the size of the state space. Shakeel (2020) presented a new approach for building circuits for the discrete model, reducing resource requirement by using the quantum Fourier transform. For the continuoustime quantum walk, work by Qiang et al. (2016) presents efficient quantum circuits for the circulant graph class, and also an experimental implementation on a photonic quantum processor. In the same year, Loke and Wang (2017a) showed how to build continuous-time quantum walk circuits for composite graphs, namely commuting graphs and Cartesian product of graphs. Considering the Szegedy quantum walk, Chiang et al. (2009) proposed an efficient method of creating quantum circuits for this model. In their work, they showed how to derive a quantum version of the arbitrary sparse classical random walk by approximating aquantum update rule with circuit complexity scaling linearly with the degree of sparseness of the structure. Loke and Wang (2017b) developed this method by showing that an efficient circuit for the Szegedy quantum walk can be constructed even if the structures are not sparse, given they posses translational symmetry in the columns of the transitional matrix. More specifically, they identified that the class of cyclic and bipartite graphs are compatible with this approach. Another interesting result in this paper was the creation of circuits that implement a quantum analogue of Google’s Page Rank algorithm, in terms of Szegedy walks. On the experimental side, there have been various implementations of quantum walks on quantum computers. On IBM’s hardware, work by Balu et al. (2017) presents an efficient implementation of topological quantum walks where they ran the circuit on a five qubit computer over a 4 vertex lattice. Georgopoulos and Zuliani (2019) implements two instances of the discrete-time quantum walk. The first is based on the work of Douglas (2009) using generalized CNOT gates, and the second uses a rotational approach to the CNOT decomposition, which saves using an extra ancilla qubit register. They noted that IBM’s simulator backend corresponded to the theoretical predictions, however the circuit for over three qubits was too much for the quantum hardware at that time. The paper presented by Shakeel (2020) also uses IBM’s hardware to perform their formulation of the discrete-time quantum walk. For the staggered quantum walk model, work by Acasiete et al. (2020) obtains meaningful results when using the quantum computers to study the dynamics of this model on various graphs with 16 elements, requiring 4 qubits. They also modify these circuits to accommodate an oracle, showing that a spatial search algorithm could be
1.4. Objectives, Contributions and Structure 8 performed on IBM’s quantum computers for a search space of size 8 , and with a bit of noise but still satisfactory for size 16. 1.4 objectives,contributions and structure The motivation behind the contents in this dissertation is to create an expanded overview on the topic of quantum random walks. To better contextualize the rest of this thesis, appendix A.1presents the basic concepts and mathematical tools needed to study quantum walks. Chapter 2consists of the study of three major quantum random walk models, more specifically the discrete-time coined quantum walk, the continuous-time quantum walk and the staggered quantum walk. For each of these models, this work presents the theoretical framework as well as the corresponding Python implementations. In these simulations, the dynamics of the walks are analyzed by changing various parameters, plotting the resulting probability distributions and seeing how these parameters alter the shape, propagation and other features of the quantum random walks. Chapter 3follows this approach, but now the structure where these walks take place is a complete graph and the goal is to find a marked element. For this purpose, the section about Grover’s algorithm is used to introduce the notion of quantum searching problems. The following sections show how to change the various models of quantum walks to accommodate an oracle, thus performing an element search in time similar to Grover’s algorithm. Finally, chapter 4is dedicated to constructing circuits for the models previously defined, using IBM’s software Qiskit and their hardware. The first three sections are used to create circuits for the dynamics of the walks. The biggest contribution is the circulant graph approach to build diagonal operators for the continuous-time quantum walk, which can be easily translated to Qiskit circuits. Although work by Qiang et al. (2016) pioneered this approach, the work presented in this thesis aims to give a clear description on how to build these circuits in Qiskit and an original analysis on how the approximate quantum Fourier transform affects the accuracy of the results and the number of operations needed to perform the quantum walk. The last section shows how to introduce an oracle to the various circuits in order to perform a searching problem. For the continuous-time case, circulant graphs are again used in an original implementation of the searching problem making use of diagonal operators and the Suzuki-Trotter expansion. The work reported in this dissertation is partially documented in an accepted paper, and a poster submitted in June 2021:
1.4. Objectives, Contributions and Structure 9 • Jaime Santos, Bruno Chagas, Rodrigo Chaves. Quantum Walks on a Superconducting Quantum computer. ( accepted in SBRC 2021 - WQuantum / Comunica c¸˜ ao e Computac¸˜ ao Quˆ antica) • Jaime Santos, Bruno Chagas. Implementing Grover’s algorithm on a Superconducting Quantum Computer. ( accepted to the 2nd European Quantum Technologies Virtual Conference) A third publication • Jaime Santos, Bruno Chagas. Searching with Continuous-Time Quantum Walks. (in preparation) is being prepared at the moment of writing.
2 QUANTUM WALKS The structure of this chapter is as follows. The first section presents a brief introduction to random walks by reviewing the classical case. The following sections are dedicated to the study of several quantum random walk models and their advantages. This analysis is done by firstly describing the theoretical framework for these walks, and then simulating them in Python, with code that can be found on Github 1. Section 2.2introduces the quantum case of random walks by analyzing the dynamics of the coined model, making use of Python’s plot capabilities in order to visualize the probability distributions associated with this algorithm. The quantum walk is generally said to be quadratically faster than the classical one, which is reflected on the behavior of the standard deviation associated with the probability distribution, and in this section a brief comparison of this metric is also presented. Section 2.3is dedicated to the study of another instance of a discrete quantum walk, but where a coin is not needed. Instead, tessellations are used to construct the Hamiltonians of this algorithm, hence the name staggered, effectively reducing the associated Hilbert space. Here, plots are used to study the propagation of the walk, and the effects of altering available the parameters will also be analyzed. Lastly, section 2.4presents the continuous-time model of the quantum walk. Following the previous sections, the probability distributions will be plotted for the different parameters that can be altered. Finally, this chapter is closed with some final thoughts and remarks. 2.1 classical random walk The term random walk, firstly introduced by Pearson (1905), is classically defined as a stochastic process that models the path a walker would take through a mathematical space, where each step made by the walker is random. This can be used to model systems such as a molecule displaying Brownian motion in a fluid, or even fluctuating stock prices as in Sottinen (2001). The simplest instance of this walk is on an infinite discretely numbered line, whose mathematical space is composed of integer numbers. Here, the walker can only advance 1https://github.com/JaimePSantos/QWSimulations 10
2.1. Classical Random Walk 11 with equal probability in one of two directions, depending on the outcome of a random event such as tossing a coin. Starting from position x=0 , the walker moves to x= +1 or x=−1 with 1 2 probability after the first toss. On the second toss, the walker could be on x=±2 with 1 4 probability each, and on x=0 with 1 2 . Continuing this trend will result in a normal probability distribution around the origin, as seen in the Python plot of figure 1. Figure 1: Probability distribution for the classical random walk on a line, after 72 , 180 and 450 steps, running 300000 experiments for each number of steps, with starting position on vertex 0. The number of iterations directly affects how far the walker can reach. As the number of steps increases, the height of each curve at the starting position decreases and the width of the curve increases. This relationship can be captured by the position standard deviation, and Pearson (1905) shows that the standard deviation is σ(t)∼√t. (1) In other words, equation (1) represents the rate at which a walker moves away from the origin. Note that this algorithm can be abstracted to graphs of higher dimensions. For example, in a two dimensional lattice, a walker would be transversing a plane with integer coordinates, choosing one of four directions at every intersection. Notably, P ´ olya (1921) proved that a walker in a two dimensional lattice will almost surely return to the origin at some point. However, the probability of returning to the origin decreases as the number of dimensions increases, as shown by Montroll (1956) and Finch (2003). It is worth noting that a random walk, over a graph whose nodes are weighed and directed, is analogous to a discrete-time Markov chain2. 2 A Markov chain can be described as a sequence of stochastic events where the the probability of each event depends only on the state of the previous event.
2.2. Coined Quantum Walk 12 2.2 coined quantum walk In the quantum case, the walker is a system whose position, on an infinite discretely numbered line, is described by a vector |xi in Hilbert space. The next position of the system will depend, in part, of a unitary operator, which can be viewed as a quantum coin. The analogy is, if the coin is tossed and rolls ”heads”, for example, the system transitions to position |x+1i , otherwise it advances to |x−1i . From a physical perspective, this coin can be the spin of an electron or the chirality of a particle, for example, and the outcome of measuring these properties decides whether the walker moves left or right. The coin is a unitary operator defined as C|0i=a|0i+b|1i; C|1i=c|0i+d|1i, (2) where a , b , c and d are the complex amplitudes associated with each outcome of the coin toss. One of the most commonly used coins is the unbiased coin, also known as the Hadamard operator H= a c b d!=1 √2 1 1 1−1!, (3) which will be the one used in this example. The Hilbert space of the system is H=HC⊗HP , where HC is the two-dimensional Hilbert space associated with the coin and HPis the Hilbert space of the walker. The transition from |xi to either |x+1i or |x−1i must be described by a unitary operator, the shift operator S|0i|xi=|0i|x+1i S|1i|xi=|1i|x−1i, (4) that can also be described by S=|0ih0|⊗ x=∞ ∑ x=−∞|x+1ihx|+|1ih1|⊗ x=∞ ∑ x=−∞|x−1ihx|. (5) It follows that the operator that describes the dynamics of the quantum walk will be given by U=S(C⊗I) = S(H⊗I). (6) Consider a quantum system located at |x=0i with coin state |0i , for t=0 . Its state will be described by |ψ(0)i=|0i|x=0i. (7) After tsteps |ψ(t)i=Ut|ψ(0)i, (8)
2.3. Staggered Quantum Walk 19 The Hamiltonian evolution operator reduces to U=eiθHβeiθHα, (26) and applying it to an initial condition |ψ(0)iresults in the time evolution operator U|ψ(t)i=Ut|ψ(0)i. (27) Having defined the time evolution operator, the walk is ready to be coded with a certain initial condition and θ value, to better understand how the probability distribution spreads through time. For the first case study, the initial condition will be a uniform superposition of states |0i and |1i and the value of θ will be varied in order to understand how this parameter impacts the walk, as seen in figure 7. The overall structure of the probability distribution is very similar for different values of θ , the difference being that the walker is more likely to be found further away from the origin as the angle increases. (a) |ψ(0)i=|0i(b) |ψ(0)i=|1i Figure 8: Probability distributions for the staggered quantum walk on a line after 50 steps, for different initial conditions. Another interesting case study is to see how the initial condition affects the dynamics of the system, and figure 8shows the results of plotting the quantum walk for initial conditions |ψ(0)i=|0i and |ψ(0)i=|1i . Similarly to the coined case, each initial condition results in asymmetric probability distributions, |ψ(0)i=|0i leads to a peak in the left-hand side, while condition |ψ(0)i=|1i results in a peak in the right-hand side. As shown in figure 7, the uniform superposition of both these conditions results in a symmetric probability distribution. So far, only discrete-time quantum walks have been shown. The next section presents the continuous-time quantum walk model, where time is not discretized and whose Hilbert space is the space of the walker.
2.4. Continuous-Time Quantum Walk 20 2.4 continuous-time quantum walk The continuous-time random walk model on a graph is a Markov process where transitions have a fixed probability per unit time, γ , of moving to adjacent vertices, firstly introduced by Montroll and Weiss (1997). Consider a graph G with N vertices and no self-loops, this walk can be defined by the linear differential equation that describes the probability of jumping to a connected vertex in any given time dpi(t) dt =γ∑ j Lij pj(t), (28) where L is the Laplacian defined as L=A−D , and pj(t) is the time dependent probability associated with each vertex transition. A is the adjacency matrix that represents each vertex connection, given by Aij = 1, if (i,j)∈G 0, otherwise, (29) and D is the diagonal matrix Djj =deg(j)corresponding to the degree4of vertex j. In the continuous-time quantum walk model (CTQW), the vertices are quantum states that form the basis for the Hilbert space. The continuous-time quantum walk model will also be described by a differential equation, the Schr¨ odinger equation i¯hd|ψ(t)i dt =H|ψ(t)i, (30) where H=−γLis the Hamiltonian of the system. More explicitly, Hij = deg(j)γ, if i=j; −γ, if i6=jand adjacent; 0, if i6=jand not adjacent. . (31) A general state of a system |ψ(t)i can be written as a function of its complex amplitudes qi=hi|ψ(t)|i|ψ(t)i, (32) which means equation (30) can be rewritten as i¯hdqi(t) dt =∑ j Hijqj(t). (33) 4The degree of a vertex refers to the number of edges that it is connected to.
2.4. Continuous-Time Quantum Walk 21 Comparing equations (33) and (28) , the Laplacian is replaced by the Hamiltonian, and the probabilities by amplitudes. One of the main differences is the complex phase i , which will result in a very different behavior. Setting ¯h=1 and solving the differential equation results in the evolution operator of this walk U(t) = e−iHt =ei(γL)t=eiγ(A−D)t, (34) In the regular graph case, where D is simply the degree of the graph multiplied by the identity matrix, A and D will commute, meaning that the evolution operator can be written in terms of the adjacency matrix U(t) = eiγAt−iγDt =eiγAte−iγDt =φ(t)eiγAt, (35) since the degree matrix becomes a global phase. Applying this operator to an initial condition ψ(0), will give the state of the system at a time t |ψ(t)i=U(t)|ψ(0)i. (36) Figure 9: Probability distribution for the continuous-time quantum walk on a line, at t=40 , 80 and 120, with initial condition |ψ(0)i=|0iand γ=1 2√2. Considering a uni-dimensional quantum system, each vertex will have at most 2other neighboring vertices, reducing equation (31) to Hij = 2γ, if i=j; −γ, if i6=jand adjacent; 0, if i6=jand not adjacent. (37)
2.4. Continuous-Time Quantum Walk 22 For a more detailed visualization, this quantum walk model was coded in Python and figure 9was obtained setting the transition rate to γ=1 2√2 and the initial condition to |ψ(0)i=|0i . A brief look at figure 9reveals several similarities to previous models. The property of having two peaks away from the origin and low probability near the origin is present across all the quantum walks. However, in the continuous case, a symmetric initial condition is not needed. In the staggered quantum walk model, the propagation of the walk could be altered by changing the values of θ, whereas in this case different values of γand time will influence the probability distribution. Altering the initial condition will also differ in the continuous-time example. For example, setting the initial condition to the balanced superposition of states |0iand |1ihas no effect on the overall pattern of the probability distribution as seen in figure 10. Both peaks are still present and at the same distance from the origin, with intermediate amplitudes being attenuated relative to figure 9. This behavior is in contrast with the previous discrete-time cases, where a change in the initial condition would dictate the number of peaks and where they would appear. Figure 10 also shows the influence of the transition rate γ . As would Figure 10: Probability distribution for the continuous-time quantum walk on a line, at t=100 , with initial condition |ψ(0)i=|0i+|1i √2, for multiple values of γ. be expected from equation (35) , the effects are very similar to altering time, since both parameters are multiplying in the exponential. In conclusion, the purpose of this chapter was to present an overview of several different models of a quantum walk. The probability distributions are very distinct from the classical case, but relatively similar to each other. The bigger differences between the models come from the size of the associated Hilbert space. The staggered and continuous-time quantum walks have Hilbert spaces equal to the space of the walker, whereas the coined quantum walk also requires a space for the coin. It might seem unimportant now, but it will play a
2.4. Continuous-Time Quantum Walk 23 major role when these models are translated into circuits, since the size of the Hilbert space will have a direct relation with the number of qubits required to perform the walk, which is a scarce resource for Noisy intermediate-scale quantum (NISQ) computers. Considering the case of the coined quantum walk on a simple line graph, only one extra qubit will be needed. However, as will be seen in the next chapter, the search problem is optimal when performed over a complete graph which, in the coined case, will double the number of required qubits.
3 SEARCHING PROBLEMS This chapter studies the search problem using quantum walks. Section 3.1introduces the basics of a search problem by presenting the theoretical framework of Grover’s algorithm, followed by a complexity analysis, together with Python plots for a better illustration. Different numbers of marked elements will be shown and, by the end of the section, it should be clear that Grover’s algorithm is optimal for searching, as shown by Zalka (1999). Subsequent sections are dedicated for the quantum walk instance of this problem. In section 3.2, the coined quantum walk is defined for the search problem, which implies the introduction of an oracle. Here, instead of a line, a complete graph is used, which will increase the space of the search to 2N , due to the connected nature of this graph and the need of a coin. Section 3.3presents the staggered quantum walk version of the search problem. Again, the notion of cliques and tessellations is used instead of a coin, and the complete graph is again considered. The oracle is again defined for this walk, which makes it quite similar to Grover’s algorithm. However, since it is possible to alter the parameter θ and the structure over which the search is performed, this algorithm is known to be more general then Grover’s. Like the coined quantum walk, the staggered model is discrete in time but, since a coin is not used, the space associated with it scales only with the size of the graph, meaning its implementation on a NISQ computer will be more feasible. Finally, section 3.4closes this chapter with the search instance of the continuous-time quantum walk. Similarly to the staggered quantum walk, both the structure where the search is performed and parameter γ can be controlled. However, because time is not discrete in this instance, the probability distribution associated with this walk will be slightly different, and it will later be seen that this results in a circuit that does not scale up with time. 3.1 grover’s algorithm Searching through an unstructured database is a task classically achieved by exhaustively evaluating every element in the database. Assume there exists a black box (oracle) that can be asked to find out if two elements are equal. Since we’re looking for a specific element in 24
3.1. Grover’s Algorithm 25 a database of size N , we’d have to query the oracle on average N 2 times or, in the worst case, Ntimes. Grover’s algorithm, presented in Grover (1996), comes as a quantum alternative to this type of problems, taking advantage of superposition by increasing desirable states’ amplitudes through a process called amplitude amplification. This method has a quadratic gain over the classical counterpart, shown in Boyer et al. (1998), being able to find a target element in expected time O(√N). The inner workings of the black box will now be expanded upon. Instead of directly evaluating the elements, the searching indices will be considered, and the number of elements defined as N=2n , n being a positive integer. The next step is to define a function f:{0, 1, ..., N−1} that returns 1 when evaluating the desired (marked) element, and 0 otherwise. Since this function is to be applied to a quantum system, a unitary operator can be built such as O|xi|ii=|xi|i⊕f(x)i. (38) where |xi is the index register, ⊕ is the binary sum operation and |ii is a qubit that is flipped if f(x) = 1. The action of the oracle on state |0iwill be O|xi|0i= |x0i|1i, if x=x0 |xi|0i, otherwise. (39) where x0is the marked element. More generically, Ocan be written as O|xi= (−1)f(x)|xi. (40) This offers a bit of insight into the oracle: it marks the solutions to the search problem by applying a phase shift to the solutions. The question now is, what is the procedure that determines a solution x0 using O the minimum number of times? The answer lies in the amplitude amplification section of Grover’s search, starting with the creation of a uniform superposition |ψ0i=H⊗n|0i=1 √N N−1 ∑ x=0|xi, (41) where H⊗nis the Hadamard operator applied to an arbitrary number of qubits. If one were to measure |xi at this point, the superposition would collapse to any of the base states with the same probability 1 N=1 2n , which means that on average, we’d need to try N=2n times to guess the correct item. This is where amplitude amplification comes into effect, by means of a second unitary operator D= (2|ψ0ihψ0|−I) = H⊗n(2|0ih0|−I)H⊗n. (42)
3.1. Grover’s Algorithm 26 This operator applies a conditional phase shift, with every computational basis state except |0i receiving a phase shift. This can also be described as the inversion about the mean, for a state of arbitrary amplitudes |φi= N−1 ∑ k=0 αk|ki, (43) the action of Don state φwill be D|φi= N−1 ∑ k=0 (−αk+2hαi)|ki, (44) where hαiis the average of αk hαi=1 N N−1 ∑ k=0 αk|ki. (45) The evolution operator that performs one step of the algorithm is then U=DO, (46) and after tsteps the state of the system is |ψ(t)i=Ut|ψ0i. (47) 3.1.1One marked element The optimal number of steps is, as aforementioned, proportional to √N . More precisely, if there’s only one solution, maximum probability can be reached in approximately π 4√N iterations. In order to show that this is the case, an iteration will be formally defined, following the example of Boyer et al. (1998), as the process that transforms the state |ψ(k,l)i=k|i0i+∑ i6=i0 l|ii, (48) into state ψ(N−2 Nk+2(N−1) Nl,N−2 Nl−2 Nk)E . Amplitudes l and k are real numbers that satisfy k2+ (N−1)l2=1 . Running t iterations over state |ψ0i will eventually lead to state ψj=ψ(kj,lj)after the jth iteration, where k0=l0=1 √Nand kj+1=N−2 Nkj+2(N−1) Nlj; lj+1=N−2 Nlj+2 Nkj. (49)
3.1. Grover’s Algorithm 27 After the last iteration, the system will be in state |ψti with a certain amplitude. If that amplitude corresponds to the marked element x0 , then it is said that the algorithm was successful. Grover (1996) proves that there exists a value of t<√2N , such that the probability of success is at least 1 2 . However the probability of success does not linearly increase with the number of iterations, in fact for t=√2N the system will succeed less than 1 in 10 times. Boyer et al. (1998) argues that an explicit value of t is needed, and this can be achieved by finding a closed form formula for kj and lj . The first step is to define an angle θ so that sin2θ=1 N, and equation (49) becomes kj=sin ((2j+1)θ); lj=1 √N−1cos ((2j+1)θ).(50) In order to maximize the probability of success, one must find a value of t so that kt≈1 and lt is as close to 0 as possible. The value of k after t iterations will be at its maximum when sin ((2t+1)θ) = 1 . Solving the trigonometric equation leads to a value of t=π−2θ 4θ . Conversely, let=0 when et=π−2θ 4θfor an integer number of et. Setting tto bπ 4θcwill lead to t−et≤1 2⇐⇒ (2t+1)θ−(2et+1)θ≤π 2. (51) By definition, (2et+1)θ=π 2 which means that |cos ((2t+1)θ)|≤|sin θ| . The probability of Figure 11: Probability of one marked element in the Grover search, as a function of the number of steps, for N=32, 64, 128 and 256.
3.1. Grover’s Algorithm 28 failure after titerations can then be written as (N−1)l2 t=cos2((2t+1)θ)≤sin2θ=1 N. (52) Failure decreases as the number of elements increases. The run time of the algorithm will be t≤π 4θ≤π 4√N, (53) since θ≥sin θ=1 √N . This means that, for a large N , the number of iterations that maximizes the probability of success will be very close to π 4√N. Figure 11 was obtained by coding the appropriate operators as to simulate the system presented in equation (47) . The unitary evolution operator was applied approximately π 4√N times and the amplitudes associated with those states were stored as a probability distribution. Filtering the probability of the marked element and plotting it against the number of steps, shows that the maximum is indeed reached after the said number of iterations, and then decreases as more steps are taken, periodically. It also shows that the maximum probability for N=32 is lower than for N=128 , which makes sense since the the probability of success is maximized for larger values of N . This is the case because the ideal number of iterations will be bπ 4√Nc , meaning that the rounding will be proportionally smaller as Nincreases. 3.1.2Multiple marked elements When there’s more than one element marked by the oracle, the number of iterations to achieve maximum probability changes. In fact, the latter part of this section will be used to discuss the case where one single iteration of this algorithm is enough to achieve maximum probability. Firstly, one must define a set A collecting all the marked elements and set B with the remaining ones. The state from equation (48) will become |ψ(k,l)i=∑ i∈A k|ii+∑ x∈B l|xi. (54) Assuming mmarked elements, iterating over this state will result in ψ(N−2m Nk+2(N−m) Nl,N−2m Nl−2m Nk). (55)
3.4. Continuous-Time Quantum Walk 35 Figure 16: Probability of one marked element in the staggered quantum walk search, as a function of the number of steps, for complete graphs of size N=16, 32 and 64. The walk achieves the same result as Grover’s algorithm after π 4√N steps, as shown in figure 16. This plot also shows that the probabilities converge to 1 as N increases. Because time is discretized, deviations to the ideal number of steps will matter less for bigger values of N . Unlike Grover’s algorithm, however, the parameter θ can be changed in order to alter how many iterations are required to achieve maximum probability of the marked element. Combined with the fact that one has control over which structure this search problem is performed, the staggered quantum walk search is more general than Grover’s search, both being equivalent when a complete graph is considered and θ=π 2. Finally, the next section will present the search problem using the continuous-time quantum walk model. Since time is not discretized, a finer control over the evolution is possible. This will have significant impact when translating the algorithm to a quantum circuit, since it will be seen that circuit depth will not scale with an increase in time. 3.4 continuous-time quantum walk As was previously seen, the continuous-time quantum walk model is defined by an evolution operator obtained by solving Schr¨ odinger’s equation U(t) = e−iHt. (77)
3.4. Continuous-Time Quantum Walk 36 The search problem requires introducing an oracle to the Hamiltonian, that will mark an arbitrary vertex m H0=−γL−∑ m∈M|mihm|, (78) where M is the set of marked vertices. Since the complete graph is a regular graph, the operator can be rewritten in terms of the adjacency matrix plus the marked elements. Considering the case where only element |0iis marked, one gets U0(t) = e−iH0t=e−i(−γL−|0ih0|)t=e−i(−γA+γD−|0ih0|)t=eiγ(A+|0ih0|)t−iγDt. (79) The degree matrix is again D=dI , which means it will commute with A+|0ih0| and become a global phase U0(t) = eiγ(A+|0ih0|)te−iγDt =φ(t)eiγ(A+|0ih0|)t. (80) Figure 17: Value of the difference between the largest eigenvalue and the second largest plotted as a function of γN, for N=512. As shown by Childs and Goldstone (2004), the value of γis crucial for the success of the search. As γ increases, the contribution of the marked element in the Hamiltonian decreases and, as γ approaches 0 , the contribution of the adjacency matrix decreases. To find the
3.4. Continuous-Time Quantum Walk 37 optimum value, the Hamiltonian can be rewritten by adding multiples of the identity matrix to the adjacency matrix H0=−γ(A+NI)−|0ih0|=−γN|sihs|−|0ih0|, (81) where |si=1 √N∑i|ii . Now it is obvious that, for γ=1 N , the Hamiltonian becomes H=−|sihs|−|0ih0| . Its eigenstates are proportional to |si±|wi and eigenvalues are −1−1 √N and −1+1 √N , respectively. This means that the evolution rotates from the state of balanced superposition to the marked vertex state in time π ∆E=π 2√N , where ∆E is the spectral gap. This is, as shown by Farhi et al. (2000), equivalent to Grover’s algorithm. Figure 18: Probability of one marked element in the continuous quantum walk search, as a function of the number of steps, for complete graphs of size N=16, 32 and 64. Plotting ∆E as a function of γN , as seen in figure 17, has a minimum at γN=1 . The difference between the largest eigenvalue and second largest, plotted in the y-axis, is the smallest for a value of γN=1=⇒γ=1 N , which will correspond to the maximum probability for the marked vertex, in optimal steps. Figure 18 shows the evolution of the probability of the marked vertex in time, which is continuous in this model. In contrast with previous models, the distributions are smooth and reach exactly one, since the walk is allowed to evolve for exactly the ideal time steps. Again, this walk will require only as many qubits as needed to represent the space of the walker. Similarly to the staggered case, this model allows an adjustment to the γ parameter, that will affect the number of ideal steps. It also allows the choice of structure over which to perform the search, making it more general than the Grover algorithm as well. Another
3.4. Continuous-Time Quantum Walk 38 interesting property is that, because time is treated as a continuous variable, the circuit associated will not scale in time. For the case without search, the circuit will be relatively small and somewhat resistant to noise. When considering the search problem, however, the introduction of the oracle and the dependency of the Suzuki-Trotter expansion will render the circuit less than ideal for NISQ implementation, as will be seen in the next chapter.
4 IMPLEMENTATIONS AND APPLICATIONS This chapter is dedicated to the construction of quantum walk circuits using IBM’s Software Development Kit, Qiskit, whose code is made publicly available in the Github repository 1 . It is composed of two parts. The first one includes sections 4.1through 4.3 and presents the circuits for the dynamics of each previously studied quantum walk model. The second part corresponds to section 4.4, where the search algorithm is studied for each model. The first part of this chapter begins with section 4.1, where the coined quantum walk implementation based on the work of Douglas (2009) can be found. Here, the line graph is considered again, whose shift operation is composed of increment and decrement gates constructed with generalized CNOT gates. As seen in previous chapters, this model requires an extra qubit for the space of the coin that, when combined with all the operations required to implement the generalized CNOT gates, results in a circuit far too deep to be implemented in current NISQ computers, as was concluded at the end of this section. The staggered quantum walk circuit is presented in the following section, based on the work of Acasiete et al. (2020). This implementation still uses the notion of increment and decrement operations. However, since a coin was not required, the resulting circuit became much more NISQ-friendly. The first part is then concluded with section 4.3, where the continuous-time quantum walk circuit is implemented. The best results for the dynamics of the quantum walk were obtained for this case, due to the circulant graph approach that, unlike the previous discrete models, does not require extra iterations of the algorithm to represent time. Work by Qiang et al. (2016) firstly presented the circulant graph definition of this model, limited to the complete graph case, and the final part of this section greatly expands on this work by means of statistical analysis of the impact of the approximate quantum Fourier transform on a large collection of circulant graphs. Finally, section 4.4closes this chapter with the implementation of circuits for the search problem using quantum walks. It starts with the introduction of quantum searching by means of the circuit associated with Grover’s algorithm, followed by the coined quantum walk, which produces the worst results due to the requirement of 2n qubits and swap gates 1https://github.com/JaimePSantos/QWQiskit 39
4.1. Coined Quantum Walk 40 for the representation of the complete graph. Surprisingly, the best results were achieved for the staggered quantum walk search problem, since it produced the circuit with the least operations. The continuous-time quantum walk search was expected to produce the best results in this section also, but the introduction of the oracle together with the requirement of the Suzuki-Trotter expansion resulted in a circuit somewhat impacted by noise. 4.1 coined quantum walk Consider the example of a quantum walker on a discretely numbered cycle. It was seen that the evolution operator associated with such a system is, as defined in equation (6) U=S(C⊗I), (82) where Sis a shift operator, defined in equation (5) as S=|0ih0|⊗ x=∞ ∑ x=−∞|x+1ihx|+|1ih1|⊗ x=∞ ∑ x=−∞|x−1ihx|, (83) that increments or decrements the position of the walker according to the coin operator C. Previously, this system was simulated in Python by coding its equations. Now, the focus is to study and implement a quantum circuit based on the work presented by Douglas (2009). This approach relies on multi-controlled CNOT gates, also known as generalized Toffoli gates, in order to shift the state of the walker by +1 or −1 , each with a probability associated with the chosen coin, as can be seen in figure 19. The generalized CNOT gates act on the (a) Increment. (b) Decrement. Figure 19: General circuits of the components of the shift operator for the coined quantum walk. vertex states as a cyclic permutator, where each vertex state is mapped to an adjacent state. This can be seen as the walker moving left or right, in the line graph example. The coin operator will simply be a Hadamard gate acting on a single qubit. For a graph of size N=8 , for example, n=3 qubits are required to encode each vertex, and an extra qubit for the coin.
4.1. Coined Quantum Walk 41 Repeat for steps. /⊗nINCR DECR C• Figure 20: General circuit for the coined quantum walk. The general circuit for the coined quantum walk is shown in figure 20. Note that this circuit limits the number of graph nodes to powers of 2 , and an arbitrary implementation of 2n nodes requires n+1 qubits. However, it is possible to have any number of nodes, given that the proper correction is made, as was shown in the work of Douglas (2009). The method used for this correction is called Gray Code Ordering proposed by Slepoy (2006), whereby a certain arrangement of CNOT gates results in control states only differing by a single bit. Figure 21: Qiskit circuit for the coined quantum walk, for a line graph of size N=8 and initial condition |ψ0i=|4i, with 3steps and the Hadamard coin. This circuit was implemented in Qiskit, as can be seen in figure 21. In this example, the increment and decrement sequence was applied three times on a graph of size 23=8 nodes. The starting position of the walker was set to ψ(0) = |4i , and the Hadamard coin was used. (a) Increment. (b) Decrement. Figure 22: Qiskit circuits of the components of the shift operator for the coined quantum walk, for a line graph of size N=8.
4.1. Coined Quantum Walk 42 The first block after the barrier is the sequence of operations that will increment and decrement the state, as shown in figure 22. Note that, because the decrement gate is optimized, some X gates were removed. The generalized CNOT gates are implemented using Qiskit’s mcx function, which decomposes these gates according to lemma 7.5of Barenco et al. (1995) and work by Maslov (2016), to create CNOT gates up to four controls. For more generalized instances of the gate, the aforementioned Gray Code is used. The rest of the circuit is just the repetition of these operations as a function of the number of steps required. Lastly, the circuit is measured. The results can be seen in figure 23. These results can be verified by calculating the time evolution of the wave function associated with the system |ψ(0)i=|4i, (84) |ψ(1)i=|0i|x=3i+|1i|x=5i √2, (85) |ψ(2)i=|0i|x=2i+|1i|x=4i+|0i|x=4i−|1i|x=6i 2, (86) |ψ(3)i=|1i|x=1i−|0i|x=3i+2(|0i+|1i)|x=5i+|0i|x=7i 2√2. (87) Taking the modulus squared of the amplitudes associated with the states, confirms that the probability distribution associated with the QASM simulator, presented in figure 23 as the blue bar plot, is correct. However, the results obtained from running in IBM’s Toronto Figure 23: Probability distributions of the coined quantum walk for several steps in a line graph of size N=8 . The blue bar plot represents a circuit run in the QASM simulator, and the orange bar plot on IBM’s Toronto backend.
4.2. Staggered Quantum Walk 43 backend are not satisfactory. This is because of the size of the circuit. Actually, the coined quantum walk model besides requiring an extra qubit for the coin, also needs a very large number of CNOT gates, more specifically 187 , 372 and 569 , for 1 , 2 and 3 steps, respectively each of which have an average associated error of 1.284e−2 in this specific backend, at the time of this experiment. Note that this number may vary, depending on the transpiler seed used. For a better error analysis, one can calculate the fidelity between the ideal distribution p(x)and the experimental q(x)using the formula F(p,q) = N−1 ∑ x=0qp(x)q(x), (88) where x is the vertex. For 0 steps, the obtained fidelity is approximately 0.91 which is very high, because the circuit is simply the initial condition. When the circuit is increased to 1 step the fidelity lowers to 0.49 , due to the increase of CNOTs. However, for 2 and 3 steps, the fidelity increases again to approximately 0.63 due to the fact that the probability distribution in the simulator becomes more spread out with the increase of steps, meaning that the random uniform distribution obtained from the noisy experiments ran in IBM’s backend will be closer to them than a highly localized distribution like in the case of 1 step. In order to reduce the effects introduced by noise, the next chapter will present the circuit for the alternative discrete model, the staggered quantum walk. Besides avoiding an extra qubit for the coin, this model also does not require so many CNOT gates for each iteration. 4.2 staggered quantum walk As was discussed in section 2.3, the elements of each tessellation of a discretely numbered cycle can be described by states |αxi=|2xi+|2x+1i √2, (89) |βxi=|2x+1i+|2x+2i √2. (90) These states allow the construction of the Hamiltonians Hα=2 +∞ ∑ x=−∞|αxihαx|−I, (91) Hβ=2 +∞ ∑ x=−∞|βxihβx|−I, (92)
4.2. Staggered Quantum Walk 44 as in equations (24) and (25). Following the implementation presented in the work of Acasiete et al. (2020), these operators can be rewritten in matrix form Hα=I⊗X, (93) Hβ= 0··· 1 . . .Hα . . . 1··· 0 , (94) which turn out to be very useful representations for the construction of the circuit. As was shown in equation (26), the unitary evolution operator is U=eiθHβeiθHα=UβUα, (95) knowing that Rx(θ) = e−iθX 2, (96) then each of the evolution operators associated with the different tessellation Hamiltonians will be Uα=I⊗Rx(θ), (97) Uβ= cos θ··· −isin θ . . .Uα . . . −isin θ··· cos θ . (98) Notice that Uβis simply a permutation of Uα, therefore it can be rewritten as Uβ=P−1UαP, (99) where P=∑x|x+1ihx|. Repeat for steps /⊗n−1 INCR DECR Rx(2θ)Rx(2θ) Figure 24: General circuit for the staggered quantum walk. Remember from equation (83) and figure 19 that these permutation operators can be implemented as increment and decrement gates, defined in the work of Douglas (2009).
4.3. Continuous-Time Quantum Walk 51 m\G G1G2 0 0.98 ±0.01 0.99 ±0.01 1 0.98 ±0.02 0.993 ±0.006 Table 1: Fidelity of quantum state with N=4, backend Toronto, and t=1. For the N=23=8 case, table 2shows that state fidelity is greater as graph connectivity increases, and as m increases. This is due to the fact that a greater m implies a smaller circuit, but also an increase in error. However, graphs have less distinct eigenvalues as they are more connected, which means that a higher degree of approximation of the QFT will generally introduce less errors, while keeping the circuit depth lower. m\G G1G2G3G4 0 0.80 ±0.01 0.92 ±0.02 0.968 ±0.007 0.965 ±0.006 1 0.894 ±0.007 0.95 ±0.01 0.98 ±0.01 0.973 ±0.008 2 0.852 ±0.009 0.955 ±0.004 0.985 ±0.003 0.990 ±0.002 Table 2: Fidelity of quantum state with N=8, backend Toronto, and t=1. Finally, table 3presents the N=24=16 case. Here, the behavior is similar to the previous case up to graph G5 , meaning that higher graph connectivity and larger m will result in higher fidelity. However, graphs G6 , G7 and G8 , even though highly connected and with relatively low depth, present lower fidelity. This seems to contradict the results in table 2. m\GG1G2G3G4G5G6G7G8 0 0.47 ±0.03 0.61 ±0.02 0.78 ±0.02 0.86 ±0.01 0.86 ±0.01 0.70 ±0.04 0.54 ±0.03 0.49 ±0.04 1 0.50 ±0.03 0.63 ±0.03 0.79 ±0.03 0.87 ±0.02 0.85 ±0.03 0.70 ±0.03 0.55 ±0.05 0.50 ±0.04 2 0.55 ±0.03 0.71 ±0.03 0.83 ±0.02 0.90 ±0.01 0.89 ±0.02 0.75 ±0.02 0.62 ±0.04 0.59 ±0.06 3 0.60 ±0.03 0.70 ±0.02 0.85 ±0.01 0.92 ±0.01 0.91 ±0.01 0.80 ±0.03 0.71 ±0.04 0.69 ±0.04 Table 3: Fidelity of quantum state with N=16, backend Toronto, and t=1. However this behavior can be explained due to the fact that the probability distribution of the dynamics of the walk on these structures is highly concentrated in a small number for vertices. Considering that the size of the circuit starts to push the limits of NISQ computers, it is expected that the spreading out of the probability distribution due to the effects of noise produces a lower fidelity. Nonetheless, the increase of m still has a positive impact on the fidelity of these circuits, which means that the reduction in circuit size will indeed produce better results.
4.4. Implementing Search Algorithms in Qiskit 52 4.4 implementing search algorithms in qiskit 4.4.1Grover’s Algorithm As discussed in section 3.1, Grover’s algorithm is a quantum process to address unstructured search problems. Consider the case of finding element x0 out of an unordered list of size N . For the worst case scenario, a classical algorithm would need to check every element of the list, therefore requiring Nsteps. The first stage of Grover’s algorithm is to create an uniform superposition of all states in the system |ψ0i=1 √N N−1 ∑ x=0|xi. (114) The next stage is the application of the Grover iteration process, which starts with an oracle that adds a negative phase to the solution states O|xi= (−1)f(x)|xi. (115) This operator can be seen as an identity matrix with negative entries corresponding to the solution states. The operator can be rewritten as O=I−2∑ m∈M|mihm|. (116) where Iis the identity matrix and Mis a set of solutions where f(m) = 1, and 0 otherwise. The matrix associated with this operator is O= (−1)f(0)0··· 0 0(−1)f(1)··· 0 . . . 0 .... . . 0 0 ··· (−1)f(N−1) . (117) The second part of the iteration is an amplitude amplification process through the diffusion operator D= (2|ψ0ihψ0|−I) = H⊗n(2|0ih0|−I)H⊗n. (118) The unitary operator that describes the Grover iteration process will then be U=DO. (119)
4.4. Implementing Search Algorithms in Qiskit 53 Repeat O(√N)times /⊗nHOD Figure 33: General circuit for the Grover search. As previously discussed, this iteration process will be repeated several times, depending on the number of elements. Optimal probability of success in finding a single solution will be reached after bπ 4√Nc steps, and bπ 4qN Kc for K solutions, which amounts to a quadratic gain when compared to the classical case. The general Grover circuit can then be constructed as shown in figure 33. Consider the 3 qubit case, where N=8 and solution state |4i . The optimal number of iterations is approximately 2 . Figure 34 depicts the circuit for 3 iterations implemented in Qiskit. Figure 34: Qiskit circuit for the Grover algorithm, for a search space of size N=8 and 3 steps. The system starts with the creation of an uniform superposition state, by applying Hadamard gates to each qubit. Immediately following the barrier, the first operator of the Figure 35: Qiskit circuit of the diagonal oracle operator for a search space of size N=8 and marked element |mi=|4i. iteration process is the oracle, which is shown in figure 35. Because the oracle operator is simply the identity matrix with negative entries corresponding to the solution states, it can be simply translated into a circuit through the diagonal function in Qiskit. The last part of the iteration is the diffusion operator, whose circuit is shown in figure 36. Comparing equations (116) and (118) , it is easy to see why figures 35 and 36 are so similar.
4.4. Implementing Search Algorithms in Qiskit 54 Figure 36: Qiskit circuit of the diagonal Grover diffusion operator for a search space of size N=8. The diffusion circuit will simply be the oracle circuit for state |0i , placed between Hadamard operations. Figure 37: Probability distributions of the Grover search algorithm for several steps, in a search space of size N=8 . The blue bar plot represents a circuit run in the QASM simulator, and the orange bar plot on IBM’s Toronto backend. The results of measurement are shown in figure 37. As expected, the maximum probability for the marked element was reached after 2 iterations, on the simulator, and it decreases in subsequent steps. However, the experimental result from the Toronto backend presents maximum probability for the marked element for 1 step, with a fidelity of 0.96 . The optimal number of steps, in contrast, has a lower fidelity of 0.89 . This is because as the number of steps increases, so does the circuit depth, more specifically the number of CNOT gates for 1 , 2 and 3 steps were 19 , 45 and 60 , respectively. Therefore, the circuit does not achieve the maximum probability after 2 steps due to the effects introduced by noise. Despite this, the results are satisfactory when taking into account the properties of NISQ computers. The following sections will present the search problem adapted to several quantum walk models.
4.4. Implementing Search Algorithms in Qiskit 55 4.4.2Searching with a Coined Quantum Walk Following the structure of section 3.2, this section expands the coined quantum walk model into a circuit for searching. The modified unitary evolution operator is U0=S(O⊗G), (120) as was defined in equation (68) , where S is the flip-flop shift operator, O is the oracle operator and Gis the Grover diffusion as a coin operator. Consider the case of a complete graph, where every vertex is adjacent to one another. The general quantum circuit to implement this, as shown in figure 38, will require n qubits to represent the state of the walker and n qubits for the state of the coin. The shift operator was constructed based on the work of Douglas (2009), where the state of the walker is flip-flopped with the state of the coin with a swap operation. Repeat O(√N)times /⊗nHOSHIFT /⊗nG Figure 38: General circuit for the search problem using the coined quantum walk model. This was implemented in Qiskit, for a graph of size N=23=8 , which means 6 qubits will be required. For the case of one marked element, the number of iterations that maximizes the amplitude of the solution state is bπ 2√Nc . Figure 39 shows the circuit for 5iterations of the walk. Figure 39: Qiskit circuit for the search problem using the coined quantum walk model, for a complete graph of size N=8 and with 5 steps. The circuit starts in a uniform superposition of the states corresponding to the vertices of the graph. The first step of the iteration is the oracle. This operator flips the amplitude of
4.4. Implementing Search Algorithms in Qiskit 56 the vertex state |4i , and can be translated into a circuit making use of the Qiskit’s diagonal function, as shown in figure 40. It is the same oracle used in the Grover search of figure Figure 40: Qiskit circuit of the diagonal oracle operator in the coined quantum walk search problem, for a complete graph of size N=8, with marked element |mi=|4i. 35, but in the coined quantum walk model it is only applied to the states associated with the position of the walker. The states associated with the coin space of the walk will be transformed according to Grover’s diffusion of figure 36, as seen in figure 41. Figure 41: Qiskit circuit of the diagonal diffusion operator in the coined quantum walk search problem, for a complete graph of size N=8. The final part of the iteration is the shift operator, as represented in figure 42. The flip-flop shift operator was defined in equation (64) as S|v1i|v2i=|v2i|v1i, (121) where |v1i represents the position of the walker and |v2i is the state of the coin. Making use of the swap gate, this operator can be implemented as in figure 42. Lastly, measurements were performed. The results are plotted in figure 43. Maximum probability of the marked element was reached after 4 steps in the simulator. Extra steps reduce that probability. The resulting probability distribution from the Toronto backend is again unsatisfactory for the coined quantum walk model, with fidelities ranging from 0.58
4.4. Implementing Search Algorithms in Qiskit 57 Figure 42: Qiskit circuit of the flip-flop shift operator in the coined quantum walk search problem, for a complete graph of size N=8. for 4 steps, to 0.75 for 2 steps. This is expected, since the complete graph representation requires N extra qubits for the coin, and swap operations which are decomposed into 3 CNOT gates each, resulting in 92 , 210 and 261 CNOT operations for 2 , 4 and 5 steps, respectively. The optimal number of steps that maximizes the probability of the marked element is also a contributing factor to the size of the circuit, requiring more iterations to achieve the same probability when compared to Grover’s search discussed above. Figure 43: Probability distributions of the coined quantum walk search problem for several steps, in a complete graph of size N=8 . The blue bar plot represents a circuit run in the QASM simulator, and the orange bar plot on IBM’s Toronto backend. As mentioned previously, other models of the quantum walks that do not require coins or iterations will be studied in the following sections, in the context of the searching problem. The staggered quantum walk, for example, should be able to present better results when ran in a NISQ computer, considering the smaller Hilbert space due to its coinless nature.
4.4. Implementing Search Algorithms in Qiskit 58 4.4.3Searching with a Staggered Quantum Walk As discussed in section 3.3, the staggered quantum walk on a complete graph requires a single tessellation with associated polygon |αi=1 √N N−1 ∑ x=0|xi. (122) The Hamiltonian will then be Hα=2 1 ∑ 0|αihα|−I=H⊗n(2|0ih0|−I)H⊗n=H⊗nO0H⊗n, (123) which is equivalent to the Grover diffusion operator. Therefore, it can be implemented in a similar fashion. The evolution operator for the staggered quantum walk on the complete graph can then be defined as U=eiθHα=eiθ(H⊗nO0H⊗n)=H⊗neiθO0H⊗n. (124) This is a very useful representation since the exponent part of the operator is a diagonal matrix, which means that implementing the circuit in Qiskit is straightforward. Now that the staggered quantum walk associated with the complete graph is defined, what remains to be done is to add an oracle to the evolution operator, as was done in equation (76), U0=UO, (125) where O=IN−2∑ m∈M|mihm|, (126) and Mis the set of marked elements. The general circuit for implementing the staggered quantum walk search problem in a complete graph is shown in figure 44. Since only one tessellation is required, there is no Repeat O(√N)times. /⊗nHOHeiθO0H Figure 44: General circuit for the search problem using the staggered quantum walk model. need for the Suzuki-Trotter approximation. However, several iterations will be needed in order to achieve the maximum probability for the marked vertex. As the staggered quantum
4.4. Implementing Search Algorithms in Qiskit 59 walk search algorithm a complete graph is equivalent to Grover’s algorithm, the optimum number of steps will also be bπ 4qN Kc, where K is the number of solutions. Consider the case of N=8 and one marked vertex, |mi=|4i . The number of steps that maximizes the probability of the marked element is bπ 4q8 1c=2 . Translating to Qiskit, n=3 qubits will be needed and the circuit will be as in figure 45. Similar to previous examples, Figure 45: Qiskit circuit for the search problem using the staggered quantum walk model, for a complete graph of size N=8, with 3 steps and a value of θ=π 2. the circuit begins with a uniform superposition built by the Hadamard gates. The next operation is the oracle, which was implemented through the use of Qiskit’s diagonal function, producing a circuit similar to the one in figure 35. Next, an analogue to Grover’s diffusion operator is applied, where the operation named UniOp is a diagonal matrix, easily translated to Qiskit, as shown in figure 46. This circuit is Figure 46: Qiskit circuit of the diagonal diffusion operator in the staggered quantum walk search problem, for a complete graph of size N=8 and a value of θ=π 2. very similar to the one in figure 36, the difference being that in the staggered quantum walk search model one can control the value of θ , as seen in equation (124) . This influences how fast maximum probability of the marked element is achieved. Since Grover’s algorithm is optimal, a value of θ=π 2 yields a diffusion circuit equal to the one in figure 36, implying that the staggered quantum walk is a more general model of quantum searching. Finally, measurement is performed and the results for several steps of the walk are shown in figure 47. The circuit for each step of the walk was run both in the QASM simulator and IBM’s backend named Toronto. The experiment was performed with 3000 shots in both cases, and the probability distributions show that this model is indeed more suited for a NISQ computer than the previous case. However, unlike the simulator, maximum
4.4. Implementing Search Algorithms in Qiskit 60 Figure 47: Probability distributions of the staggered quantum walk search problem for several steps, in a complete graph of size N=8 . The blue bar plot represents a circuit run in the QASM simulator, and the orange bar plot on IBM’s Toronto backend. probability of the marked vertex was achieved in 1 step of the walk instead of the expected 2 steps, as in the Grover algorithm. Looking at the 1 step case in the simulator, one can see that the probability of vertex |4i is very close to the maximum, while the circuit has about half of the operations of the 2 step case. This means it is not surprising that the smaller circuit produces higher results for the probability of the marked vertex. For better context, the number of CNOT gates for 1 , 2 and 3 steps were 18 , 37 and 64 , which is a big improvement when compared to the coined model. This can be further confirmed by the fidelities of each of the states, which are approximately 0.954 and 0.780 for 1 and 2 steps, respectively. Thus, the former circuit produces better results because of the number of operations, even though that the latter should theoretically yield the highest probability. Even though these results are a great improvement with respect to the algorithm using the coined quantum walk, the staggered model is still discrete, meaning its circuit will increase in depth as the number of steps increases. This can be avoided by turning again to the continuous-time quantum walk, whose circuit remains constant with time. However, to address the searching problem, the continuous-time model might not produce the best results, because it will need extra iterations due to the Suzuki-Trotter approximation and it will also require extra operations to implement the oracle, which was not the case in the pure dynamics example of section 4.3.
BIBLIOGRAPHY F. Acasiete, F. P. Agostini, J. Khatibi Moqadam, and R. Portugal. Implementation of quantum walks on ibm quantum computers. Quantum Information Processing,19(12), Nov 2020. ISSN 1573-1332. doi: 10.1007/s11128-020-02938-5. URL http://dx.doi.org/10.1007/ s11128-020-02938-5. Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. Primes is in p. Annals of Mathematics, 160,09 2002. doi: 10.4007/annals.2004.160.781. Dorit Aharonov, Andris Ambainis, Julia Kempe, and Umesh Vazirani. Quantum walks on graphs. STOC ’01 Proceedings of the thirty-third annual ACM symposium on Theory of computing, pages 50–59,2001. Dorit Aharonov, Wim van Dam, Julia Kempe, Zeph Landau, Seth Lloyd, and Oded Regev. Adiabatic quantum computation is equivalent to standard quantum computation. SIAM Journal on Computing,37(1), 2007. doi: 166-194. Y. Aharonov, L. Davidovich, and N. Zagury. Quantum random walks. Physical Review A,48 (2):1687–1690,1993. Andris Ambainis. Quantum walk algorithm for element distinctness. SIAM Journal on Computing,37(1):210–239,2007. Radhakrishnan Balu, Daniel Castillo, and George Siopsis. Physical realization of topological quantum walks on ibm-q and beyond. 2017. Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, and Harald Weinfurter. Elementary gates for quantum computation. Physical Review A,52(5):3457–3467, Nov 1995. ISSN 1094-1622. doi: 10.1103/physreva.52.3457. URL http://dx.doi.org/10.1103/PhysRevA.52.3457. Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, and P ¨ aivi T ¨ orm ¨ a. Approximate quantum fourier transform and decoherence. Physical Review A,54(1):139–146, Jul 1996. ISSN 1094-1622. doi: 10.1103/physreva.54.139. URL http://dx.doi.org/10.1103/PhysRevA. 54.139. Paul Benioff. The computer as a physical system: A microscopic quantum mechanical hamiltonian model of computers as represented by turing machines. Journal of Statistical Physics,22(5):563–591,1980. 67
bibliography 68 Charles Bennett and Gilles Brassard. Withdrawn: Quantum cryptography: Public key distribution and coin tossing. Theoretical Computer Science - TCS,560:175–179,01 1984. doi: 10.1016/j.tcs.2011.08.039. Charles H. Bennett and Stephen J. Wiesner. Communication via one- and two-particle operators on einstein-podolsky-rosen states. Phys. Rev. Lett.,69:2881–2884, Nov 1992. doi: 10.1103/PhysRevLett.69.2881. URL https://link.aps.org/doi/10.1103/PhysRevLett.69. 2881. Scott D. Berry, Paul Bourke, and Jingbo B. Wang. qwviz: Visualisation of quantum walks on graphs. Computer Physics Communications,182(10):2295–2302,2011. ISSN 0010-4655. doi: https://doi.org/10.1016/j.cpc.2011.06.002. URL https://www.sciencedirect.com/science/ article/pii/S0010465511002128. Michael Boyer, Gilles Brassard, Peter Høyer, and Alain Tapp. Tight bounds on quantum searching. Fortschritte der Physik,46(4-5):493–505,1998. A. R. Calderbank and Peter W. Shor. Good quantum error-correcting codes exist. Phys. Rev. A,54:1098–1105, Aug 1996. doi: 10.1103/PhysRevA.54.1098. URL https://link.aps.org/ doi/10.1103/PhysRevA.54.1098. D. Cheung. Improved bounds for the approximate qft. Proc. of the Winter Intl Symposium of Information and Communication Technologies, pages 192–197,2004. Chen-Fu Chiang, Daniel Nagaj, and Pawel Wocjan. Efficient circuits for quantum walks. Quantum Information and Computation,10,03 2009. doi: 10.26421/QIC10.5-6-4. Andrew M. Childs. Universal computation by quantum walk. Physical Review Letters,102 (18):180501,2009. Andrew M. Childs and Jeffrey Goldstone. Spatial search by quantum walk. Physical Review A,70(2):022314,2004. Andrew M. Childs, Richard Cleve, Enrico Deott, Edward Farhi, Sam Gutmann, and Daniel A. Spielman. Exponential algorithmic speedup by quantum walk. Proc. 35th ACM Symposium on Theory of Computing (STOC 2003), pp. 59-68,2002. doi: 10.1145/780542.780552. Paul H. Cootner. The random character of stock market prices. M.I.T. Press, Cambridge, Mass, rev. ed. edition, 1967. D. Coppersmith. An approximate fourier transform useful for quantum factoring. Feb 2002. Gabriel Coutinho and Renato Portugal. Discretization of continuous-time quantum walks via the staggered model with hamiltonians. Natural Computing, pages 1–7,2018.
bibliography 69 David Deutsch. Quantum theory, the church-turing principle and the universal quantum computer. Proceedings of The Royal Society A Mathematical Physical and Engineering Sciences, 400(1818), 1985. David Deutsch and Richard Jozsa. Rapid solution of problems by quantum computation. Proceedings of The Royal Society A Mathematical Physical and Engineering Sciences,439(1907), 1992. B. Douglas. Efficient quantum circuit implementation of quantum walks. Phys. Rev. A,79,05 2009. doi: 10.1103/PhysRevA.79.052335. Martin Dyer, Alan Frieze, and Ravi Kannan. A random polynomial-time algorithm for approximating the volume of convex bodies. Journal of the ACM,38(1):1–17,1991. Matthew Falk. Quantum search on the spatial grid. 2013. Peter E. Falloon, Jeremy Rodriguez, and Jingbo B. Wang. Qswalk: A mathematica package for quantum stochastic walks on arbitrary graphs. Computer Physics Communications,217: 162–170,2017. ISSN 0010-4655. doi: https://doi.org/10.1016/j.cpc.2017.03.014. URL https://www.sciencedirect.com/science/article/pii/S0010465517301029. E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser. Quantum computation by adiabatic evolution. arXiv: Quantum Physics,2000. Edward Farhi and Sam Gutmann. An analog analogue of a digital quantum computation. Physical Review A,57(4):2403–2406,1998. Richard P. Feynman. There’s plenty of room at the bottom. Feynman and computation, pages 63–76,1959. Richard P. Feynman. Simulating physics with computers. International Journal of Theoretical Physics,21(6-7):467–488,1982. Steven Finch. P ´ olya’s random walk constant. Cambridge University Press, pages 322–331, 2003. Konstantinos Georgopoulos and P. Zuliani. One-dimensional hadamard quantum walk on a cycle with rotational implementation. arXiv: Quantum Physics,2019. Adam Glos, Jarosław Adam Miszczak, and Mateusz Ostaszewski. Qswalk.jl: Julia package for quantum stochastic walks analysis. Computer Physics Communications,235:414–421, Feb 2018. ISSN 0010-4655. doi: 10.1016/j.cpc.2018.09.001. URL http://dx.doi.org/10.1016/j. cpc.2018.09.001.
bibliography 70 Geoffrey Grimmett, Svante Janson, and Petra F. Scudo. Weak limits for quantum random walks. Physical Review E,69(2):026119,2003. Lov K. Grover. A fast quantum mechanical algorithm for database search. STOC ’96 Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pages 212– 219,1996. C. A. R. Hoare. Algorithm 64: Quicksort. Commun. ACM,4(7):321,1961. ISSN 0001-0782. doi: 10.1145/366622.366644. URL https://doi.org/10.1145/366622.366644. Norio Inui, Yoshinao Konishi, and Norio Konno. Localization of two-dimensional quantum walks. Physical Review A,69(5):052323,2003. Josh Izaac and Jb Wang. Pyctqw: A continuous-time quantum walk simulator on distributed memory computers. Computer Physics Communications,186,01 2015. doi: 10.1016/j.cpc. 2014.09.011. Mark Jerrum, Alistair Sinclair, and Eric Vigoda. A polynomial-time approximation algorithm for permanent of a matrix with nonnegative entries. Journal of the ACM,51(4):671–697, 2004. Norio Konno. A new type of limit theorems for the one-dimensional quantum random walk. J. Math. Soc. Japan,57(4):1179–1195,2002. A. Lenstra, H. Lenstra, M. Manasse, and J. Pollard. The number field sieve. pages 564–572, 01 1990. doi: 10.1145/100216.100295. T Loke and J B Wang. Efficient quantum circuits for continuous-time quantum walks on composite graphs. Journal of Physics A: Mathematical and Theoretical,50(5):055303, Jan 2017a. ISSN 1751-8121. doi: 10.1088/1751-8121/aa53a9. URL http://dx.doi.org/10.1088/ 1751-8121/aa53a9. T. Loke and J.B. Wang. Efficient quantum circuits for szegedy quantum walks. Annals of Physics,382:64–84, Jul 2017b. ISSN 0003-4916. doi: 10.1016/j.aop.2017.04.006. URL http://dx.doi.org/10.1016/j.aop.2017.04.006. Neil B. Lovett, Sally Cooper, Matthew Everett, Matthews Trevers, and Viv Kendon. Universal quantum computation using the discrete quantum walk. Physical Review A,81(4):042330, 2010. Fr ´ ed ´ eric Magniez, Ashwin Nayak, J ´ er ´ emie Roland, and Miklos Santha. Search via quantum walk. SIAM Journal on Computing,40(1):142–164,2006. Fr ´ ed ´ eric Magniez, Miklos Santha, and Mario Szegedy. Quantum algorithms for the triangle problem. SIAM Journal on Computing,37(2):413–424,2007.
bibliography 71 F.L. Marquezino and R. Portugal. The qwalk simulator of quantum walks. Computer Physics Communications,179(5):359–369, Sep 2008. ISSN 0010-4655. doi: 10.1016/j.cpc.2008.02.019. URL http://dx.doi.org/10.1016/j.cpc.2008.02.019. Dmitri Maslov. Advantages of using relative-phase toffoli gates with an application to multiple control toffoli optimization. Physical Review A,93(2), Feb 2016. ISSN 2469-9934. doi: 10.1103/physreva.93.022311. URL http://dx.doi.org/10.1103/PhysRevA.93.022311. Elliott Montroll. Random walks in multidimensional spaces, especially on periodic lattices. Journal of the Society for Industrial and Applied Mathematics,4(4):241–260,1956. doi: 10.1137/ 0104014. Elliott Waters Montroll and George Herbert Weiss. Random walks on lattices. ii. Journal of Mathematical Physics, page 167–181,1997. Gordon E. Moore. Cramming more components onto integrated circuits. Electronics,38(8): 114–117,1965. J .K. Moqadam, M. C. de Oliveira, and Renato Portugal. Staggered quantum walks with superconducting microwave resonators. Physical Review B,95(14):144506,2017. Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge University Press, 1995. Ashwin Nayak and Ashvin Vishwanath. Quantum walk on the line. 2000. Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press New York, NY, USA, 2011. Christos Papadimitrious. Computational Complexity. Pearson, 1994. Apoorva Patel, K.S. Raghunathan, and Pranaw Rungta. Quantum random walks do not need a coin toss. Physical Review A,71(3):032347,2005. Karl Pearson. The problem of the random walk. Nature,72(1865):294,1905. doi: 10.1038/ 072294b0. R. Portugal, R.A.M. Santos, T.D. Fernandes, and D.N. Goncalves. The staggered quantum walk model. Quantum Information Processing,15(1):85–101,2016. Renato Portugal. Establishing the equivalence between szegedy’s and coined quantum walks using the staggered model. Quantum Information Processing,15(4):1387–1409,2015. Renato Portugal. Quantum Walks and Search Algorithms. Springer, 2018.
bibliography 72 Renato Portugal and T. D. Fernandes. Quantum search on the two-dimensional lattice using the staggered model with hamiltonians. Physical Review A,95(4):042341,2017. Renato Portugal, Stefan Boettcher, and Stefan Falkner. One-dimensional coinless quantum walks. Physical Review A,91(5):052319,2015. Renato Portugal, M. C. de Oliveira, and J. K. Moqadam. Staggered quantum walks with hamiltonians. Physical Review A,95(1):012328,2017. George P ´ olya. ¨ Uber eine aufgabe der wahrscheinlichkeitsrechnung betreffend die irrfahrt im straßennetz. Mathematische Annalen,84:149–160,1921. doi: 10.1007/BF01458701. Xiaogang Qiang, Thomas Loke, Ashley Montanaro, Kanin Aungskunsiri, Xiaoqi Zhou, Jeremy L. O’Brien, Jingbo B. Wang, and Jonathan C. F. Matthews. Efficient quantum walk on a quantum processor. Nature Communications,7(1), May 2016. ISSN 2041-1723. doi: 10.1038/ncomms11511. URL http://dx.doi.org/10.1038/ncomms11511. J. J. Sakurai. Modern Quantum Mechanics. Addison-Wesley Publishing, Co, 1994. Miklos Santha. Quantum walk based search algorithms. International Conference on Theory and Applications of Models of Computation. TAMC 2008. Lecture Notes in Computer Science, 4978:31–46,2008. J. Santos, B. Chagas, and R. Chaves. Quantum walks on a superconducting quantum computer. Simp´ osio Brasileiro de Redes de Computadores e Sistemas Distribu´ ıdos, July 2021. Marek Sawerwain and Roman Gielerak. Gpgpu based simulations for one and two dimensional quantum walks. Communications in Computer and Information Science, page 29–38, 2010. ISSN 1865-0937. doi: 10.1007/978-3-642-13861-4 3. URL http://dx.doi.org/10.1007/ 978-3-642-13861-4 3. Benjamin Schumacher. Quantum coding. Phys. Rev. A,51:2738–2747, Apr 1995. doi: 10.1103/PhysRevA.51.2738. URL https://link.aps.org/doi/10.1103/PhysRevA.51.2738. Uwe Sch ¨ oning. A probabilistic algorithm for k-sat and constraint satisfaction problems. 40th Annual Symposium on Foundations of Computer Science, pages 410–, 1999. Asif Shakeel. Efficient and scalable quantum walk algorithms via the quantum fourier transform. Quantum Information Processing,19(9), Aug 2020. ISSN 1573-1332. doi: 10.1007/ s11128-020-02834-y. URL http://dx.doi.org/10.1007/s11128-020-02834-y. C. E. Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423,1948. doi: 10.1002/j.1538-7305.1948.tb01338.x.
bibliography 73 V.V. Shende, S.S. Bullock, and I.L. Markov. Synthesis of quantum-logic circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems,25(6):1000–1010, Jun 2006. ISSN 1937-4151. doi: 10.1109/tcad.2005.855930. URL http://dx.doi.org/10.1109/ TCAD.2005.855930. Neil Shenvi, Julia Kempe, and Birgitta Whaley. A quantum random walk search algorithm. Physical Review A,67(5):052307,2003. Peter W. Shor. Algorithms for quantum computation: Discrete logarithms and factoring. Proceedings 35th Annual Symposium on Foundations of Computer Science, pages 124–134, 1994a. P.W. Shor. Algorithms for quantum computation: discrete logarithms and factoring. Proceedings 35th Annual Symposium on Foundations of Computer Science, pages 124–134,1994b. doi: 10.1109/SFCS.1994.365700. Alexander Slepoy. Quantum gate decompostition algorithms. Sandia National Laboratories, 2006. R. Solovay and V. Strassen. A fast monte-carlo test for primality. SIAM Journal on Computing, 6(1):84–85,1977. doi: 10.1137/0206006. URL https://doi.org/10.1137/0206006. Tommi Sottinen. Fractional brownian motion, random walks and binary market models. Finance and Stochastics, (5):343–355,2001. doi: 10.1007/PL00013536. Andrew Steane. Multiple-particle interference and quantum error correction. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences,452 (1954):2551–2577,1996. doi: 10.1098/rspa.1996.0136. URL https://royalsocietypublishing. org/doi/abs/10.1098/rspa.1996.0136. Mario Szegedy. Quantum speed-up of markov chain based algorithms. 45th Annual IEEE Symposium on Foundations of Computer Science,2004. Alan Turing. On computable numbers, with an application to the entscheidungsproblem. Proceedings of the London Mathematical Society, s2-42(1):230–265,1936. Salvador El ´ ıas Venegas-Andraca. Quantum walks: a comprehensive review. Quantum Information Processing,11(5):1015–1106,2012. J. von Neumann. First draft of a report on the edvac. IEEE Annals of the History of Computing, 15(4):27–75,1993. doi: 10.1109/85.238389. Stephen Wiesner. Conjugate coding. SIGACT News,15(1):78–88,1983. ISSN 0163-5700. doi: 10.1145/1008908.1008920. URL https://doi.org/10.1145/1008908.1008920.
bibliography 74 Christof Zalka. Grover‘s quantum searching algorithm is optimal. Physical Review A,60(4): 2746–2751,1999.
A SUPPORT MATERIAL a.1 the postulates of quantum mechanics Quantum mechanics, firstly discovered in the decade of 1920, is a mathematical framework for developing physical theories. This section revisits the basic postulates of quantum mechanics, which are formalized resorting to the Dirac notation. Further reading on this notation includes the work of Sakurai (1994) and, for an extensive review of quantum computation, the book by Nielsen and Chuang (2011). The first postulate defines where the processes of quantum mechanics take place. The state of a system describes its physical characteristics, so some rules are required for these mathematical objects to have a connection to the real world. Postulate 1(State Space) Any isolated physical system has an associated Hilbert Space, H , known as the state space. The state of the system is wholly described by its state vector |ψi∈ H . The physical system’s degrees of freedom dictate the dimension of H Note that this postulate does not tell us the Hilbert space of any given physical system, nor does it tell us its state vector. It is generally hard to define the Hilbert space of an arbitrary system, which makes the work physicists have done in developing certain theories, like quantum electrodynamics, even more remarkable. Considering the computational basis {|0i,|1i} , the simplest quantum system, the qubit, can be defined as |ψi=α|0i+β|1i, (133) where α,βare complex numbers and |0i= 1 0!and |1i= 0 1!. (134) Because Hilbert spaces are also vector spaces, linear combinations of these states are also allowed |ψi=∑ i αi|ϕii. (135) 75
A.1. The Postulates of Quantum Mechanics 76 Since |ψiis required to be a unit vector, |ψihψ|=1 or, equivalently, ∑ j|αj|2=1. (136) These combinations, known as superpositions, are the main difference between a classical bit and a qubit, where the states are not in a definite value before measurement. This is a well studied quantum phenomenon that leads to constructive and destructive interference between states, which is an aspect many algorithms indeed exploit. The second postulate aims to describe how a quantum system evolves with time, and it can be formulated in the following way. Postulate 2(Evolution) The time evolution of a closed quantum system is described by a unitary operator. Considering an initial condition |ψ0i , then for any time evolution of a closed quantum system, a unitary operator U exists such that ψf=U|ψ0i. Just as the first postulate does not specify a Hilbert space, the evolution postulate does not state which unitary operators U describe an arbitrary physical system. What it does state is that the evolution of a closed quantum system follows those rules. More specifically, the second postulate describes the dynamics of such systems. In the case of a qubit, any U can be performed in a realistic system as long as UU†=U†U=I , which is another way of saying that Uis unitary. There are a number of unitary operators very relevant to quantum computation, known as Pauli matrices, that are usually composed to create more general matrices. These are defined as I= 1 0 0 1!,X= 0 1 1 0!,Y= 0−i i0!and Z = 1 0 0−1!. (137) Postulate 2tells us the relationship between the states of the system at two different times. An improved version of this postulate takes time as a continuous variable, stating that the temporal evolution of a closed quantum system can be described by the Schrodinger equation i¯hd|ψi dt =H|ψi, (138) where ¯h is the Planck’s constant and H is a Hermitian operator known as the Hamiltonian of the system. In principle, the Hamiltonian can be used to describe a system in its entirety. However figuring out the Hamiltonian is generally a hard task. So far only single quantum systems have been considered. The next postulate describes how one can create composite quantum systems made of smaller distinct systems.