Two note chord

One example is F4 and A4. F4 is 65 in MIDI code, or 1000001 in binary. A4 is 69 in MIDI code or 1000101 in binary. Counting the rightmost bit as index 0, F4 and A4 differ only by the bit at index 2. These also form two of the three notes of a major F chord, so they are a bound to sound nice together.

The following code creates a superposition between F4 and A4 accordingly:

from qiskit import ClassicalRegister, QuantumRegister
from qiskit import QuantumCircuit

# set up registers and program
qr = QuantumRegister(7)
cr = ClassicalRegister(7)
qc = QuantumCircuit(qr, cr)

# F4 and A4 together:
qc.h(qr[2]) # create superposition on 2
qc.x(qr[0]) # 1
qc.x(qr[6]) # 1

for j in range(7):
qc.measure(qr[j], cr[j])

It may help to visualize the circuit:

Then, the results of a single measurement can be represented via sound with the following:

quantum_play_notes(qc,4)

Or, the results of a series of measurements can be represented via sound with the following:

quantum_play_chords(qc,4)

The argument 4 in the previous example indicates how many times to identically prepare and measure the circuit, in this case four times. The fewer the times, the less likely that we will see an even distribution over the equal superposition. For example, if this argument were equal to 1, we'd only ever see one of the two notes pop up.