Given two unsorted lists each of length N that have a single common entry, a quantum computer can find that matching element with a work factor of O(N3/4logN) (measured in quantum memory accesses and accesses to each list). The amount of quantum memory required is O(N1/2). The quantum algorithm that accomplishes this consists of an inner Grover search combined with a partial sort all sitting inside of an outer Grover search.
We provide a set of prescriptions for implementing a quantum circuit model algorithm as measurement based quantum computing (MBQC) algorithm via a large cluster state. As means of illustration we draw upon our numerical modeling experience to describe a large graph state capable of searching a logical 8 element list (a non-trivial version of Grover's algorithm with feedforward). We develop several prescriptions based on analytic evaluation of cluster states and graph state equations which can be generalized into any circuit model operations. Such a resulting cluster state will be able to carry out the desired operation with appropriate measurements and feed forward error correction. We also discuss the physical implementation and the analysis of the principal 3-qubit entangling gate (Tooli) required for a non-trivial feedforward realization of an 8-element Grover search algorithm.
Classical simulations of quantum computers give us an insight into various things such as what quantum algorithms can achieve, whether it is possible to verify that they function as postulated, the difficulties that have to be overcome before quantum computers can be realized, as well as how we can handle these difficulties. We build a Python library to simulate a quantum computer that can perform all quantum algorithms by defining an universal gate set, from which all quantum gates – and thereby all circuits – can be constructed. We implement two algorithms that both highlight two important aspects of quantum computing: Grover’s quantum search algorithm, which demonstrates the efficiency of quantum algorithms and their superiority over their classical counterparts by searching an unsorted list quadratically faster; and an error correcting code, the Shor code, which highlights the cost of correcting the possible errors in a quantum computer.We test the rigidity of Grover’s algorithm by introducing errors without correction, and find that the algorithm shows resilience to smaller 1-qubit Pauli errors, but looses its efficiency under larger errors and thus the need for Pauli error correction arise.