
Algorithms · Fall 2019
Quantum search algorithm using a quantum random walk
A reimplementation of quantum-walk search on a hypercube, verified numerically up to a 5-cube against the paper's own estimate.
The short version
A classical search through an unsorted list of N items takes O(N) queries; Grover's algorithm reaches O(√N) on a quantum computer. Shenvi, Kempe and Whaley reach the same scaling by a different route, a quantum walk on a hypercube. This coursework project studied their paper and reimplemented the algorithm.
Coursework for Quantum Information and Quantum Computation at NISER Bhubaneswar, taught by Dr Colin Benjamin, on "A Quantum Random Walk Search Algorithm" (Shenvi, Kempe & Whaley, Phys. Rev. A 67, 052307, 2003).
How
- Turned the hypercube step into arithmetic. Each of the 2^n nodes is an n-bit string and a step along direction i is an XOR with a single set bit, which I implemented as adding 2^(i-1) modulo 2^n for both the classical and the quantum walk.
- Simulated the classical random walk in Python first, plotting probability against position on a 3-cube and a 7-cube after 10 steps.
- Built the quantum walk search in Wolfram Mathematica with the
Quantum`Notationpackage: the bit-flip shift, a Grover coin operator and an oracle that inverts the target state |0⟩, iterated π/2 × 2^(n/2) times as the paper derives. - Ran the simulation past the point the paper analyses, which is where the non-periodic behaviour showed up.
The whole search in one Mathematica cell: bit-flip shift, Grover coin with the oracle folded in, iterated π/2 × 2^(n/2) times.