Grover's song

Grover’s algorithm is one of the most well-known algorithms that can be run on a quantum computer. The algorithm is able to search within a list of entries for a particular value, and can find the entry of interest faster/in less steps than algorithms that exist for classical computing hardware. Effectively, a quantum computer is able to find a particular name in a phone book faster than a classical one.  

three-qubit (three quantum bit) Grover algorithm - a search through a list of 8 entries - can be written out as the following circuit:

A 3-qubit circuit diagram for Grover's algorithm

Each horizontal rail (q[0], q[1], q[2]) represents a qubit which is used to enter and readout information from the algorithm (what name you are search for and which entry that name exists in). Each box over the rail is a quantum-operation or quantum ‘gate operated on the qubit, which are the individual operations completed by the quantum computer to complete the searchIn this particular arrangementyou can see that there are a total of 11 stages of applied gates. The algorithm sorts and finds the matching value in the list (in this case, ‘110’ or the entry ‘6’).  

To generate some numbers or data to use as the basis of some sound generation, we wondered what it would be like to ‘hear’ the algorithm whilst it was working through each stage of applied gatesTo simulate each stage of the algorithm, we used QuTech’s Quantum Inspire Home Platform, which allows you to simulate various quantum circuits. We set up the Grover’s algorithm circuit and then looked at the output at each stage of the computation. An example in Figure 3 shows the output when we go through the first 4 stages of the algorithm. Each bar in the graph shows the probability that the quantum computer would output that value if we were to measure it at that point (e.g. there was a 18% chance that, at this point in the algorithm, the computer would output 000’ or a ‘0). From these probability values, we can generate a list of numbers that the computer would output at this point if you ran the algorithm multiple times (e.g. stage 4552063511667604). The 11 lists of numbers for each stage in the algorithm was the data passed on to make music from.

The output of Grover's algorithm after four gate sets have been applied


As with the Random Walk, we used MAX MSP to translate the data from Grover’s algorithm to the MIDI protocol. We used Ableton’s Operator FM synthesiser plugin for the main motif and then ran the MIDI out to an analogue modular synthesiser which provided a layer of texture to the sound. On a creative note, we musically interpreted the Grover algorithm to feel as if it was constantly building in tension as it draws close to finding the value it seeks. This heavily influenced the composition and use of additional instrumentation. In the track you will hear the main melody (Grovers Algorithm) start in a ‘random’ nature but as the track progresses it will reduce the amount of notes being played and eventually play a singular note. We again used samples from the lab, which you can hear most prominently at the start of the piece.
The Ableton track breakout for the Grover's algorithm track

Edit this page