pith. machine review for the scientific record. sign in

arxiv: 2604.20882 · v1 · submitted 2026-04-13 · 🪐 quant-ph · cs.AI· cs.SD

Recognition: no theorem link

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

Authors on Pith no claims yet

Pith reviewed 2026-05-10 15:29 UTC · model grok-4.3

classification 🪐 quant-ph cs.AIcs.SD
keywords quantum computingHHL algorithmmusic generationmelodyharmonycoherent oraclelinear systemsNarmour rules
0
0 comments X

The pith

HHL paired with a coherent oracle generates melody and harmony in one quantum measurement.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

This paper encodes melodic preferences from music cognition into a sparse linear system solved by the HHL algorithm. A unitary Fourier oracle then multiplies the resulting quantum amplitudes by harmony transition weights. Measurement of the combined state therefore selects both melody notes and chords at once. Small two-note two-chord blocks are used and then chained classically to create longer pieces. The resulting sequences pass independent harmony validation at a 97 percent rate.

Core claim

The HHL algorithm solves a linear system built from Narmour implication-realisation and Krumhansl-Kessler stability to produce a music-weighted note-pair distribution in superposition. The coherent Fourier harmonic oracle applies chord weights directly to this superposition via a unitary operation. A single measurement then collapses to a joint melody-harmony outcome. For practical demonstration the state space is limited to 2/2 blocks that are chained classically, yielding 8-note 8-chord sequences with 97% strong or acceptable harmony.

What carries the argument

The coherent Fourier harmonic oracle that transforms the HHL solution amplitudes with harmony rules in superposition.

Load-bearing premise

Music-cognition rules must translate into a sparse linear system whose amplitude vector can be coherently modified by the oracle without distorting the intended joint probability distribution.

What would settle it

A full simulation of the 2/2 block circuit followed by sampling the output distribution and comparing it to the expected classically computed distribution from the same rules would falsify the approach if the two distributions differ by more than statistical noise.

Figures

Figures reproduced from arXiv: 2604.20882 by Alexis Kirke.

Figure 1
Figure 1. Figure 1: Coherent HHL → Fourier harmonic oracle pipeline: no intermediate measurement. A single joint collapse selects melody notes and two-chord progression simultaneously. This paper is a proof-of-concept study in the same spirit as Kirke (2019) and Kirke (2020): the scale is deliberately minimal (49 note pairs, 7 chord functions, 19 qubits), and the goal is to demonstrate that HHL can be applied to music generat… view at source ↗
Figure 2
Figure 2. Figure 2: Fourier oracle affinity for C major across all 12 pitch classes. [PITH_FULL_IMAGE:figures/full_fig_p008_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Four sampled outputs from the Fourier oracle ( [PITH_FULL_IMAGE:figures/full_fig_p012_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Four-block 2/2 chain, 𝐾 = 4 (representative trial, 4/8 chord-tone compliance = 50%). With the broadest spectral smoothing, several melody notes fall outside the strict chord-tone set; all grammar junctions remain valid. Mean over 10 unseeded trials: 46.3% ± 16.7% [PITH_FULL_IMAGE:figures/full_fig_p013_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: Four-block 2/2 chain, 𝐾 = 6 (representative trial, 5/8 chord-tone compliance = 62.5%). Intermediate spectral precision produces a mix of chord-tone and passing notes. Mean over 10 unseeded trials: 56.3% ± 12.1%. All grammar junctions valid [PITH_FULL_IMAGE:figures/full_fig_p013_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: Four-block 2/2 chain, 𝐾 = 8 (representative trial, 5/8 chord-tone compliance = 62.5%). 𝐾 = 8 achieves the highest mean compliance across the sweep and lower variance than 𝐾 = 10, making it the best mean-variance trade-off. Mean over 10 unseeded trials: 67.5% ± 14.7%. All grammar junctions valid [PITH_FULL_IMAGE:figures/full_fig_p013_6.png] view at source ↗
Figure 7
Figure 7. Figure 7: Four-block 2/2 chain, 𝐾 = 10 (representative trial, 5/8 chord-tone compliance = 62.5%). Sharpest spectral truncation yields a mean comparable to 𝐾 = 8 but with slightly higher trial-to-trial spread (std ±15.6%; range 37.5-87.5%). Mean over 10 unseeded trials: 66.3% ± 15.6%. All grammar junctions valid. 13 [PITH_FULL_IMAGE:figures/full_fig_p013_7.png] view at source ↗
Figure 8
Figure 8. Figure 8: Four-block 2/2 chain (Method A, 𝐾 = 10): A4/iii, A4/vi, A4/IV, G4/I, G4/V, C4/I, C4/IV, G4/V. All three block junctions produce grammatically valid continuations: vi→IV, I→V, I→IV. Chord-tone compliance: 7/8 (87.5%) [PITH_FULL_IMAGE:figures/full_fig_p014_8.png] view at source ↗
Figure 9
Figure 9. Figure 9: HHL note pair probabilities (blue) vs. uniform (grey), top 10 pairs. HHL strongly [PITH_FULL_IMAGE:figures/full_fig_p014_9.png] view at source ↗
Figure 10
Figure 10. Figure 10: Fourier oracle gate count (Qiskit-verified): 375 gates vs. [PITH_FULL_IMAGE:figures/full_fig_p017_10.png] view at source ↗
read the original abstract

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.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

3 major / 2 minor

Summary. The manuscript proposes applying the HHL algorithm to solve a sparse linear system whose matrix encodes Narmour implication-realisation and Krumhansl-Kessler tonal-stability rules, thereby producing a music-cognition-weighted note-pair amplitude vector. A custom coherent Fourier harmonic oracle is then introduced as a unitary that multiplies chord-transition weights directly into this vector so that a single measurement samples a joint melody-harmony distribution. Demonstrations are restricted to 2/2 blocks whose outputs are chained classically for longer sequences; rule-based validation reports a 97 % rate of strong or acceptable progressions. The central claim is that the coherent HHL-plus-oracle pipeline is mechanically achievable and thereby realises the prerequisite for HHL’s exponential speedup in a musical setting.

Significance. If the oracle can be shown to act unitarily on an enlarged space without coherence loss or implicit renormalisation, the work would supply a concrete route by which HHL’s proven speedup could be consumed coherently in a creative domain. The explicit use of established music-cognition axioms and the release of audio examples are positive features. The current reliance on classical block chaining, however, confines any speedup demonstration to the scale of a single 2/2 block.

major comments (3)
  1. [Abstract / oracle construction] Abstract and oracle description: the statement that the coherent Fourier harmonic oracle 'applies chord-transition weights directly to the HHL amplitude vector' while remaining unitary is load-bearing for the central claim, yet no explicit construction (diagonal embedding, controlled unitary on an enlarged melody-chord space, or handling of normalisation) is supplied. Without this, it is impossible to verify that the post-oracle state still encodes a valid joint probability distribution.
  2. [Validation and results] Validation paragraph: the reported 97 % rule-based validity rate is given without a classical baseline solver, without circuit-level error analysis, and without quantification of how HHL approximation error or oracle phase corrections propagate into the sampled joint distribution. This leaves the mechanical-achievability claim only weakly supported.
  3. [Demonstrations of longer passages] Block-chaining discussion: the manuscript acknowledges that longer sequences are obtained by classical chaining of collapsed 2/2 block outputs. Because the overall pipeline is therefore not a single coherent quantum circuit, the claim that the HHL speedup is realised 'in a musical setting' applies only to the isolated block and not to the demonstrated multi-block examples.
minor comments (2)
  1. [Methods] Circuit diagrams or pseudocode for the combined HHL-plus-oracle unitary would substantially improve reproducibility and allow readers to assess gate complexity.
  2. [Linear-system construction] The mapping from Narmour/Krumhansl rules to the precise entries of the HHL matrix A is described at a high level; an explicit small-scale example (e.g., the 4-note toy system) would clarify how sparsity and conditioning are achieved.

Simulated Author's Rebuttal

3 responses · 0 unresolved

We thank the referee for the thoughtful and detailed report. We address each major comment below, indicating where revisions will be made to clarify the claims and strengthen the supporting evidence.

read point-by-point responses
  1. Referee: [Abstract / oracle construction] Abstract and oracle description: the statement that the coherent Fourier harmonic oracle 'applies chord-transition weights directly to the HHL amplitude vector' while remaining unitary is load-bearing for the central claim, yet no explicit construction (diagonal embedding, controlled unitary on an enlarged melody-chord space, or handling of normalisation) is supplied. Without this, it is impossible to verify that the post-oracle state still encodes a valid joint probability distribution.

    Authors: We agree that the unitarity and normalisation properties of the oracle are central and require explicit construction. In the revised manuscript we will add a dedicated subsection describing the oracle as a diagonal unitary operator acting on an enlarged Hilbert space that tensor-products the melody register with an ancillary chord register. The construction uses controlled-phase gates whose phases encode the Narmour/Krumhansl-Kessler transition weights; because the operation is unitary on the enlarged space, no explicit renormalisation is performed and the post-oracle state remains a valid joint amplitude vector whose measurement yields the desired melody-harmony distribution. A small circuit diagram and the corresponding unitary matrix for the 2/2 case will be included. revision: yes

  2. Referee: [Validation and results] Validation paragraph: the reported 97 % rule-based validity rate is given without a classical baseline solver, without circuit-level error analysis, and without quantification of how HHL approximation error or oracle phase corrections propagate into the sampled joint distribution. This leaves the mechanical-achievability claim only weakly supported.

    Authors: The referee correctly notes the absence of a classical baseline and error-propagation analysis. We will augment the validation section with (i) a direct comparison of the HHL-derived note-pair distribution against the exact solution obtained from a classical sparse linear solver on the same Narmour-Krumhansl matrix, (ii) numerical simulations that inject controlled HHL approximation error (via the condition-number parameter) and oracle phase noise, and (iii) a quantitative assessment of how these errors affect the final rule-validity percentage. These additions will be presented as supporting evidence for mechanical achievability at the 2/2 scale. revision: yes

  3. Referee: [Demonstrations of longer passages] Block-chaining discussion: the manuscript acknowledges that longer sequences are obtained by classical chaining of collapsed 2/2 block outputs. Because the overall pipeline is therefore not a single coherent quantum circuit, the claim that the HHL speedup is realised 'in a musical setting' applies only to the isolated block and not to the demonstrated multi-block examples.

    Authors: We accept the distinction. The manuscript's primary claim is that a coherent HHL-plus-oracle pipeline for a single 2/2 block is mechanically achievable—the necessary prerequisite for consuming HHL's exponential speedup coherently. The classical chaining of collapsed blocks is explicitly described as a temporary workaround. In the revision we will rephrase the abstract, introduction, and conclusion to state clearly that the demonstrated speedup applies to the generation of each 2/2 block, while the eight-block examples illustrate only the musical viability of the block-boundary transitions under classical post-processing. revision: yes

Circularity Check

0 steps flagged

No circularity: pipeline assembles established HHL with independently defined oracle

full rationale

The paper constructs its central demonstration by feeding the output state of the standard HHL algorithm (applied to a sparse system whose matrix entries are taken directly from Narmour implication-realisation and Krumhansl-Kessler tonal-stability rules) into a newly specified unitary oracle that multiplies chord-transition weights. No equation, ansatz, or self-citation is shown to define the oracle action in terms of the HHL solution vector itself, nor does any fitted parameter get renamed as a prediction. The 2/2 block construction and classical chaining are presented as engineering work-arounds rather than derivations that collapse back onto the input rules. The claim of mechanical achievability therefore rests on the independent definitions of HHL and the oracle unitary, not on any self-referential reduction.

Axiom & Free-Parameter Ledger

0 free parameters · 2 axioms · 1 invented entities

The central claim rests on the standard properties of the HHL algorithm, the assumption that music cognition rules form a suitable sparse linear system, and the feasibility of implementing the new coherent oracle as a unitary.

axioms (2)
  • standard math HHL solves sparse linear systems with exponential quantum speedup under standard conditions on matrix sparsity and condition number.
    Invoked as the source of the claimed speedup for encoding melodic preferences.
  • domain assumption Narmour implication-realisation and Krumhansl-Kessler tonal stability rules can be encoded into the system matrix of a linear system whose solution vector represents a music-cognition-weighted note-pair distribution.
    Required to set up the HHL input for the music-generation task.
invented entities (1)
  • Coherent Fourier harmonic oracle no independent evidence
    purpose: A unitary operation that applies chord-transition weights directly to the HHL amplitude vector so that measurement jointly selects melody and harmony.
    New component introduced to consume the HHL solution coherently without classical readout.

pith-pipeline@v0.9.0 · 5598 in / 1547 out tokens · 54093 ms · 2026-05-10T15:29:51.118756+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

30 extracted references · 4 canonical work pages

  1. [1]

    J., Bulmer, J

    Allen, E. J., Bulmer, J. F. F., and Small, S. D. (2022). Making music using two quantum algorithms. In Miranda, E. R., editor,Quantum Computer Music, pages 309-340. Springer, Cham

  2. [2]

    Anders, T. (2017). A constraint-based framework to model harmonic structure for algorithmic composition. InProceedings of the 14th Sound and Music Computing Conference (SMC 2017), pages 407-414, Espoo, Finland

  3. [3]

    Arya, A., Botelho, L., Cañete, F., Kapadia, D., and Salehi, Ö. (2022). Applications of quantum annealing to music theory. In Miranda, E. R., editor,Quantum Computer Music, pages 373-400. Springer, Cham

  4. [4]

    Biamonte, J., Wittek, P., Pancotti, N., Rebentrost, P., Wiebe, N., and Lloyd, S. (2017). Quantum machine learning.Nature, 549(7671):195-202. 26

  5. [5]

    Cheng, S., Chen, J., and Wang, L. (2018). Information perspective to probabilistic modeling: Boltzmann machines versus Born machines.Entropy, 20(8):583

  6. [6]

    Clemente, G., Crippa, A., Jansen, K., and Tüysüz, C. (2022). New directions in quantum music: concepts for a quantum keyboard and the sound of the Ising model. In Miranda, E. R., editor, Quantum Computer Music, pages 341-372. Springer, Cham

  7. [7]

    Dervovic, D., Herbster, M., Mountney, P., Severini, S., Usher, N., and Wossnig, L. (2018). Quantum linear systems algorithms: A primer. arXiv:1802.08227

  8. [8]

    and Hamido, O

    Dobrian, C. and Hamido, O. C. (2025). Techniques for quantum-computing-aided algorith- mic composition: experiments in rhythm, timbre, harmony, and space.arXiv preprint arXiv:2505.20565. Gilyén, A., Song, Z., and Tang, E. (2022). An improved quantum-inspired algorithm for linear regression.Quantum, 6:754

  9. [9]

    Grover, L. K. (1996). A fast quantum mechanical algorithm for database search. InProceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC), pages 212-219

  10. [10]

    Hadjeres, G., Pachet, F., and Nielsen, F. (2017). DeepBach: A steerable model for Bach chorales generation. InProceedings of the 34th International Conference on Machine Learning (ICML 2017), pages 1362-1371

  11. [11]

    W., Hassidim, A., and Lloyd, S

    Harrow, A. W., Hassidim, A., and Lloyd, S. (2009). Quantum algorithm for linear systems of equations.Physical Review Letters, 103(15):150502

  12. [12]

    Huang, C. Z. A., Cooijmans, T., Roberts, A., Courville, A., and Eck, D. (2017). Counterpoint by convolution. InProceedings of the 18th International Society for Music Information Retrieval Conference (ISMIR 2017), pages 211-218. International Symposium on Quantum Computing and Musical Creativity (2025). Proceedings of the 3rd ISQCMC, Palermo, Italy, Octob...

  13. [13]

    Thomas, P. (2023). Variational quantum harmonizer: Generating chord progressions and other sonification methods with the VQE. arXiv:2309.12254

  14. [14]

    Kirke, A., Shadbolt, P., Neville, A., Antoine, A., and Miranda, E. R. (2014). Q-Muse: A quantum computer music system designed for a performance for orchestra, electronics and live internet-connected photonic quantum computer. InProceedings of the 9th Conference on Interdisciplinary Musicology (CIM14), Berlin, Germany

  15. [15]

    Kirke, A., Shadbolt, P., Neville, A., and Miranda, E. R. (2016). A hybrid computer case study for unconventional virtual computing.International Journal of Unconventional Computation, 11(3-4)

  16. [16]

    and Miranda, E

    Kirke, A. and Miranda, E. R. (2017). Experiments in sound and music quantum computing. In Miranda, E. R., editor,Guide to Unconventional Computing for Music, pages 121-157

  17. [17]

    Kirke, A. (2019). Applying quantum hardware to non-scientific problems: Grover’s algorithm and rule-based algorithmic music composition.International Journal of Unconventional Computation, 14(3-4)

  18. [18]

    Kirke, A. (2020). Testing a hybrid hardware quantum multi-agent system architecture that utilizes the quantum speed advantage for interactive computer music.Journal of New Music Research, 49(3):209-230. 27

  19. [19]

    Krumhansl, C. L. (1990).Cognitive Foundations of Musical Pitch. Oxford University Press, Oxford

  20. [20]

    (1990).The Analysis and Cognition of Basic Melodic Structures: The Implication- Realization Model

    Narmour, E. (1990).The Analysis and Cognition of Basic Melodic Structures: The Implication- Realization Model. University of Chicago Press, Chicago

  21. [21]

    (1992).The Analysis and Cognition of Melodic Complexity: The Implication- Realization Model

    Narmour, E. (1992).The Analysis and Cognition of Melodic Complexity: The Implication- Realization Model. University of Chicago Press, Chicago

  22. [22]

    Nielsen, M. A. and Chuang, I. L. (2010).Quantum Computation and Quantum Information. Cambridge University Press, 10th anniversary edition

  23. [23]

    Oshiro, S. (2022). QuiKo: A quantum beat generation application.arXiv preprint arXiv:2204.04370

  24. [24]

    Rebentrost, P., Gupt, B., and Bromley, T. R. (2018). Quantum computational finance: Monte Carlo pricing of financial derivatives.Physical Review A, 98(2):022321

  25. [25]

    V., Bullock, S

    Shende, V. V., Bullock, S. S., and Markov, I. L. (2006). Synthesis of quantum-logic circuits.IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 25(6):1000-1010

  26. [26]

    Shor, P. W. (1994). Algorithms for quantum computation: Discrete logarithms and factoring. InProceedings of the 35th Annual Symposium on Foundations of Computer Science (FOCS 1994), pages 124-134

  27. [27]

    Tang, E. (2019). A quantum-inspired classical algorithm for recommendation systems. In Proceedings of the 51st Annual ACM Symposium on Theory of Computing (STOC 2019), pages 217-228

  28. [28]

    and Assayag, G., editors (2011).Constraint Programming in Music

    Truchet, C. and Assayag, G., editors (2011).Constraint Programming in Music. Wiley-ISTE

  29. [29]

    Weimer, H. (2010). Listen to quantum computer music. http://www.quantenblog.net/ physics/quantum-computer-music[Online; accessed April 2026]

  30. [30]

    Yalovetzky, R., Minssen, P., Herman, D., and Pistoia, M. (2024). Solving linear systems on quantum hardware with hybrid HHL++.Scientific Reports, 14:20610. 28