Quantum compositions and the future of AI in music

4 November 2024

Author

Antonia Davison

Tech Reporter

Eduardo Reck Miranda’s latest musical collaborator is a quantum computer located 3,500 miles away.

In his composition “Qubism,” from the album of the same name, the computer music professor engages in a call-and-response improvisation incorporating circuits processed by an IBM Quantum Eagle, a 127-qubit quantum chip, one of many such processors powering the quantum computers located at the IBM Quantum Data Center in Poughkeepsie: a violin plays a solo, then the computer responds with a quantum-generated riff.

Reck first performed the piece, “Qubism,” with the London Sinfonietta last year. In the recording below, which appears on the album’s vinyl edition, you can hear the violin solo start at 4:15, and a response based on the computer’s outputs from 4:33 to 5:23.

Listen to “Qubism” here.

Miranda has been an innovator in the field of AI-generated music for several decades. We caught up with him to learn more about what inspired him to investigate quantum computing for his latest album, and where he sees AI and music heading in the future.

What first motivated you to explore quantum computing as a musical tool?

I have been working with AI since the late 1980s. In 1994, I defended a PhD thesis at the University of Edinburgh on using AI for sound design and music. This was probably the first thesis on this topic in the UK.

We must bear in mind, however, that AI is software, and AI software needs hardware to run. I have always been intrigued by the fact that AI still runs on a type of computer first described by John von Neumann in the 1940s, referred to as the “von Neumann architecture.” This is what, in quantum computing circles, people refer to as “classical computers.”

Since very early on in my career, I have been researching alternative kinds of computers to develop AI. My pet theory is that new types of computing architectures can afford new approaches to AI.

During my PhD studies, I was inspired to learn about the so-called “Harvard architecture,” which avoided the Von Neumann bottleneck caused by fetching data and instructions from the same memory. Also, I was lucky to have the opportunity to work with parallel computers with shared and distributed memory multiprocessors at the Edinburgh Parallel Computing Centre [now called the EPCC]. In 1995, I composed a piece of electronic music entitled “Olivine Trees” using a Cray T3D, the largest supercomputer in Europe at that time.

Obviously, quantum computing was on my radar for a while. But in the beginning, it was all theoretical and difficult to grasp. I often found that physicists had a different way of talking about information processing than computer scientists. And there were no actual quantum computers available until relatively recently. I became aware of IBM Quantum Experience [now known as IBM Quantum Platform] only in late 2016, which enabled anyone with an internet connection to access a 5-qubit quantum processor. So, in early 2017, I started focusing on researching AI and procedural music generation systems with quantum computing, and composing music with them. The rest is history!

Tell me more about how you got the quantum computer to respond to the violin. And what other ways did you use quantum computing on your album?

For Qubism, I developed two approaches to compose with quantum computing. One uses partitioned quantum cellular automata, or PQCA, for procedural generation. PQCA is a means to implement cellular automata—abstract computing systems that update iteratively based on a rule—on quantum computers. I developed methods to convert samples from PQCA cycles into musical structures, such as aggregates of notes, melodies, rhythms and so on. What is interesting about PQCA is that the measured samples constitute coherent patterns evolving in time. These patterns yielded evolving musical structures resembling a musical form known as “variations on a theme.” Variations on a theme in music refers to a compositional technique where a composer takes a specific theme or melody and alters it in various ways. Johann Sebastian Bach, for example, is known for being a genius in improvising variations on a given tune.

But what is even more interesting, I generated music running a PQCA with 120 qubits on an IBM Quantum Eagle. I would argue that Qubism would not have been possible without a quantum computer.

The other method used quantum computing for machine learning. At specific moments during the performance, the quantum computer “listened” to the violin and produced responses. [My collaborators and I] developed a system to extract sequencing rules from input music. The system encodes the rules into quantum circuits. The circuits tell a quantum computer to generate wavefunctions with amplitudes encoding musical stochasticity. In other words, they encode the probabilities of certain notes following others in a tune. A measurement defines which note follows another.

To generate the responses, a laptop on the stage recorded the violin, made the quantum circuits and relayed them to the quantum computer on the cloud for processing. Then, after a few seconds, the measurements were retrieved from the cloud, and the respective musical responses were synthesised.

What is exciting here is that only 5 qubits and a few lines of Qiskit code were necessary for the software to encode the musical sequencing rules. If I were to use standard machine learning running on a classical computer, I would certainly have needed computationally hungry artificial neural networks to do the same job.

How do you have to change your working methods when working with quantumas opposed to, say, running Max, a visual programming language for music, on your laptop?

It has not changed drastically. My compositional process comprises various stages. At one far end is the computer programming stage, so to speak, and at the other end is the creative musical rendering of the materials generated by a computer. The latter is the one I enjoy the most, because it is when I turn computer-generated data into actual music. The music technology community often refers to this practice as “mapping”—that is, mapping abstract data, or representations, into music.

Having said that, when I work with quantum computers, I definitely need a shift of mindset because I am researching how to harness these machines to generate composition materials.

I am privileged in the sense that I have a longstanding background in computer programming. I enjoy writing code. However, I know this is not the case for many musicians. So, I am on a mission to facilitate access to quantum computing for musicians. I recently joined forces with Moth, a newly formed quantum computing technology company, to build user-friendly software tools for the creative industries, focusing on music.

When I heard your tracks, my first thought was that they reminded me of avant-garde composer Iannis Xenakis. He happened to collaborate with IBM as well in the 1960s. What are your thoughts on what he created, and are there any other computer musicians who helped lay the groundwork for what you are creating today?

The work of Iannis Xenakis was very influential in my formative years. I already had a degree in computing when I went back to university to study music more formally. His book Formalized Music taught me how to leverage my background in computing to compose music. This book outlines his innovative approaches to musical composition, exploring category theory, stochastic processes, formal logic and geometric models to create music. I would say that understanding Xenakis’ work is a prerequisite to exploring the potential of quantum computers for music.

Other inspirational composers who worked with computers in my formative years were Jean-Claude Risset, John Chowning, Laurie Spiegel and Brian Eno. But it was the band Kraftwerk that got me into electronic music. They integrated technology, including sequencers and computer-generated sounds, to create their distinctive electronic music style, which I still find appealing today.

Take the next step

Quantum computers make most of the world’s existing encryption algorithms obsolete. IBM developed many of the foundational technologies that will secure the world in the quantum era, and now offers the tools and services needed to implement them. Use our suite of applications to support your quantum research and development needs.

Explore IBM Quantum