Skip to main content

Quantum Music

Create music using quantum state number distributions

Quantum Music
Background

Visualization

-
Histogram
Accumulator
Musical Staff
bass.wav
Sample MIDI ValueRangeto
piano.wav
Sample MIDI ValueRangeto

Quantum State Settings

-
N
N is the number of fock states in the state's basis.

A fock state is a quantum state that has an exact number of photons. Any of the states generated by this program can be represented as a combination of multiple fock states, one for each possible photon count. N is the number of photon counts that will be included in the probability distribution. This is also equivalent to the highest photon count that the state can measure, plus one (because 0 is also counted).
N
n
n is the "expected value" of the state.

The expected value is not the photon count that we expect to occur most often (the mode), but the average photon count that we expect (the mean). This is clearly shown in the probability distribution of a thermal state, where the most frequent photon count is 0 even when the "expected value," n, is higher.
n
State
The state is what the program uses to calculate probability distributions.

A quantum state is a mathematical representation that can be used to calculate probability distributions for different properties of different types of light. For example, the thermal state represents blackbody radiation, which is light emitted from a hot object. The coherent state homogenous light with a single wavelength and direction, which we can generate using a laser. The basis state is a state with an exact number of photons, and is equivalent to a fock state. The maximally mixed state can be thought of as a uniform combination of fock states, which results in an evenly distributed probability distribution.
State
Operator
An operator in quantum mechanics is used to measure different properties of a state. For example, the number operator measures the total number of particles in a state. The identity operator, when applied to a state, will leave it unchanged. The creation and annihilation operators will raise or lower the number of particles in a state. The displace operator displaces the state in phase space. Finally, the squeeze operator "squeezes" the state, so that it has less uncertainty in one or or a combination of properties.
Operator

Music Settings

-
Play Note on 0
When left unchecked, the program will not play a new note or light up the "histogram" on a photon count of zero. This demonstrates the absence of photons with the absence of sound.

When checked, the notes will be shifted down so that a photon count of 0 will be mapped to the first note in the scale, 1 the second, and so on. With this setting, the program will play a note on a photon count of 0.
Play Note on 0
Tempo
This is the tempo of the music in beats per minute (BPM). By default, each note played is a quarter note, which has a length of one beat. When the note duration is set to vary, quarter notes will still be one beat in duration, but may not line up to a metronomic beat.
Tempo
Starting Octave
This is the lowest octave in which the program will play sound. Middle C is defined as C4, so to assign a photon count of 1 to C4, the starting octave must be 4.
Starting Octave
Transpose
This is the number of half steps by which the sound will be transposed. For example, to use the D minor pentatonic scale, select C, E flat, F, G, and B flat. Then set the transpose to 2, which will shift the output sound up 2 half steps.
Transpose
Allow Note Overlap
When unchecked, this will stop the playback of each sample after the note's duration has passed, cutting of the sound so that only one note is playing at a time. When checked, the playback will continue until the end of the sample, which will result in a "sustain" effect.
Allow Note Overlap
Note Duration
By default, the duration of each note will be one quarter note, or one beat. This can also be set to subdivide notes in halves to make eighth notes, sixteenth notes, and so on. The notes are subdivided based on the photon count, so a count of 2 will divide a play a note that lasts a half beat, and a count of 3 will play note with a duration of one-quarter beat.

The subdivisions can also be set to equal the photon count. For example, a photon count of 2 will still play a half beat note, but a count of 3 will play a single triplet note.
Note Duration
Volume
By default, the volume of each note is the same. However, similarly to note duration, this can be set to change with the photon count. When set to vary, each note will have a volume somewhere in the range between 100% and the user-defined lower limit. The volume level for each photon count lies somewhere in this range based on highest possible photon count in the probability distribution, so that the volume values for each photon count are evenly distributed.
Volume
Minimum Volume
This is the lower limit, in percent of maximum, to the volume range when volume is not set to constant.
Minimum Volume (%)
Independent Volume and Duration
By default, the program uses a single measurement from the quantum state to choose a note and set its duration and volume. When this box is checked, the program takes multiple measurements, and uses three different photon counts from the probability distribution for each note and its volume and duration.
Independent Volume and Duration
Play from Samples
By default, the program will use the default samples or samples uploaded by the user to generate music. If this box is unchecked, the program will instead generate a sawtooth sound wave and modulate its frequency to play each note.
Play from Samples
Notes
This is the scale or set of notes that the program will use to generate the music. By default this is set to a C Major 7 chord. To use a different key, it is most easy to set the desired scale or chord in the key of C, then use the "Transpose" input to change the key.
Notes

When we have a source of light that is so weak that it only emits a few photons, we can count the number of individual photons that are emitted during a certain amount of time - one second, for example. The number of photons that reach the detector during one second is called the photon count.

Say we measure the number of photons we get from a laser each second for ten seconds. This process is represented in the animation below:

Getting data from a photon emitter

Each blue bar in the graph represents a different photon count, so when two photons are detected, for example, the bar on the right will grow.

Now imagine taking measurements in the same way, but for one hundred seconds. If we put the results into a graph, we might see something like the graph below:

A simple probability distribution

This graph shows that out of all the one-second divisions of time, the photon count was 0 for 10 of them, 1 for 50 of them, and 2 for 40 of them. This can be used to show that for 10/100 seconds, we will count 0 photons, or in other words, there is a 10/100 (10%) chance that the photon count will be 0. Similarly, there is a 50/100 (50%) chance of a photon count of 1, and a 40/100 (40%) chance of a photon count of 2. In the graph above, we can think of the numbers on the left as probability, not just the number of each photon count.

We call this type of graph a "probability distribution." It tells us how likely we are to count a number of photons in a certain amount of time. A real-life probability distribution might look like these:

A Thermal state probability distribution A Coherent State probability distribution

These are the Thermal and Coherent states. The word "state" refers to a quantum state, which is a mathematical object used to calculate a probability distribution. These two states come from different sources of light. Thermal state light normally comes from hot objects, like lightbulbs and stars, and coherent state light comes from lasers.

The Quantum Music app takes data measured from quantum states and uses it to play music. Each photon count has a musical note assigned to it. The program takes measurements, like in the first animation, and plays the note that corresponds to the measured photon count.

If you listen carefully, you can hear the difference between the music created from the thermal and coherent states. From the graph of the thermal state, we can see that there is a high probability of a 0 photon count, which is represented in the music by silence. At higher tempos, this randomly spaced silence sounds like syncopation. There is also a chance of measuring 10 photons, which will result in a very high note. We can see in the graph of coherent state light that the probability is centered around 2 and 3, with smaller probabilities of the other photon counts. This means that the music will be mostly those two notes, with a few others in between.