# HHL with a Coherent Fourier Oracle: A Proof-of-Concept Quantum Architecture for Joint Melody-Harmony Generation

arXiv: https://arxiv.org/abs/2604.20882 · HTML: https://mlsanity.com/paper/2604.20882/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 32 references that are in the map.
- First posted on arXiv 13 Apr 2026.

## Builds on (most cited first, 9 of 9)

- [DeepBach: a Steerable Model for Bach Chorales Generation](https://mlsanity.com/paper/1612.01010/) (2016)
- [A quantum-inspired classical algorithm for recommendation systems](https://mlsanity.com/paper/1807.04271/) (2018)
- [Counterpoint by Convolution](https://mlsanity.com/paper/1903.07227/) (2019)
- [Information Perspective to Probabilistic Modeling: Boltzmann Machines versus Born Machines](https://mlsanity.com/paper/1712.04144/) (2017)
- [Quantum linear systems algorithms: a primer](https://mlsanity.com/paper/1802.08227/) (2018)
- [An improved quantum-inspired algorithm for linear regression](https://mlsanity.com/paper/2009.07268/) (2020)
- [Variational Quantum Harmonizer: Generating Chord Progressions and Other Sonification Methods with the VQE Algorithm](https://mlsanity.com/paper/2309.12254/) (2023)
- [QuiKo: A Quantum Beat Generation Application](https://mlsanity.com/paper/2204.04370/) (2022)
- [Techniques for Quantum-Computing-Aided Algorithmic Composition: Experiments in Rhythm, Timbre, Harmony, and Space](https://mlsanity.com/paper/2505.20565/) (2025)

## Abstract (arXiv)

Quantum algorithms with a proven theoretical speedup over classical computation are rare. Among the most prominent is the Harrow-Hassidim-Lloyd (HHL) algorithm for solving sparse linear systems. Here, HHL is applied to encode melodic preference: the system matrix encodes Narmour implication-realisation and Krumhansl-Kessler tonal stability, so its solution vector is a music-cognition-weighted note-pair distribution. The key constraint of HHL is that reading its output classically cancels the quantum speedup; the solution must be consumed coherently. This motivates a coherent Fourier harmonic oracle: a unitary that applies chord-transition weights directly to the HHL amplitude vector, so that a single measurement jointly selects both melody notes and a two-chord progression. A two-note/two-chord (2/2) block is used to contain the exponential growth of the joint state space that would otherwise make classical simulation of larger blocks infeasible. For demonstrations of longer passages, blocks are chained classically - each block's collapsed output conditions the next -- as a temporary workaround until fault-tolerant hardware permits larger monolithic circuits. A four-block chain produces 8 notes over 8 chords with grammatically valid transitions at every block boundary. Independent rule-based harmony validation confirms that 97% of generated chord progressions are rated strong or acceptable. The primary motivation is that HHL carries a proven exponential speedup over classical linear solvers; this work demonstrates that a coherent HHL+oracle pipeline - the prerequisite for that speedup to be realised in a musical setting - is mechanically achievable. Audio realisations of representative outputs are made available for listening online.
