APPLICATIONS OF QUANTUM ANNEALING TO MUSIC THEORY
Ashish Arya Ludmila Botelho Fabiola Cañete Dhruvi Kapadia Özlem Salehi



"...might compose elaborate and scientific pieces of music of any degree of complexity or extent"
Ada Lovelace
Charles Babbage



Quantum annealing
Proposition: Find the minimum energy in a landscape
- Ground state = optimal solution





H(t)=(1−Tt)H0+ TtHP
- Different from gate based

HP=−i>j∑Jijsisj−i∑hisi,

H(t)=(1−Tt)H0+ TtHP
- Can be encoded in Binary Values
Ising model
- Mathematical model to describe magnetization
si∈{−1,+1}
NP-hard!
si↔xi=21−si
xi∈{0,1}
quadratic unconstrained binary optimization
-
Minimizing quadratic functions
y=xTQx
-
Penalty Method
min y=f(x)
subject to: x1+x2+x3=1
min y=f(x)+P(i=1∑3xi−1)2
Binary variables
Constants


And now for something completely different
Music Generation


4
1
rest
measure
Durations
2
Pitches
C
D
A
E
G
F
B
C
Music Generation
j∈P∑xi,j=1
How to define the binary variables?
1−j∈P∑xi,j2
- Pitches
- Rules about consecutive notes
xi,C+xi+1,D≤1
xi,C+xi+1,C+xi+2,C≤2
P={p1,p2,…,pk}
xi,j for i∈[n] and j∈P
P={C,D,E,G}


Melody Generation
Optimization
−i∈[n−1] j,j′∈P∑Wj,j′xi,jxi+1,j′
weights
Exemple: Ode to Joy excerpt
WF#4,E4=2,

WF#4,F#4=2,
WF#4,G4=1
melody Generation


i∈[n]j∈D∑d(j)yi,j=L
- Duration of notes
Rhythm Generation
j∈D∑yi,j=1
D={1,2,3,4}
j∈D

Harmonization

j∈P∑xi,j=3
(1−xi,pij)

G
E
D
G
B
B
G


And now for something Different
Markov random fields (MRF)
- Set of random variables (0,1) that form an undirected graph and satisfy the Markov property.

Music with MRF
- Antecedent: Algorythms, Generating music with D-Wave's Quantum Annealer (iQuHack 2021)

- D-Wave's Markov Network


HARMONIZATION WITH MRF
- Our work: harmonize a melody implementing music theory rules.


Results
Melody Harmonized melody







Thank you!
Dziękuję!
Obrigada!
धन्यवाद!
Teşekkür ederim!
Köszönöm!
ধন্যবাদ !
Copy of Copy of Quantum Annealing and Music Reduction
By qumusic
Copy of Copy of Quantum Annealing and Music Reduction
- 109