qml.QSVT) capture concrete operator values at circuit‐build time, breaking gradients. The flat‐circuit pattern in this repo is the proven workaround.
Your target polynomial has no closed form. Maybe it comes from a neural network, an energy function, or a physical model. Gradient‐based learning works where analytic solvers cannot start.
You want a ready‐to‐run template. The repository contains scripts for single runs, multi‐seed sweeps, scaling studies, ablation, audit logging, and even a demo notebook. You can adapt the same structure to your own QSP or QSVT problems.
You care about reproducibility in quantum ML. This project sets a high bar: append‐only audit logs, hardcoded manuscript numbers, and a clear separation between reference seed and population statistics.
How to get started
Clone the repository and run the demo in under two minutes:
git clone https://github.com/rosspeili/trainable-qsp-angles
cd trainable-qsp-angles
pip install -r requirements.txt
jupyter notebook demo.ipynb
To reproduce the paper's main results:
python -m experiments.train --seed 0 --steps 500
python -m experiments.baseline_analytic
python -m experiments.sweep multi-seed
The flat QSP circuit is defined in qsp_jax/circuit.py. It uses PennyLane as a reference frontend, but the same pattern works with Qiskit, Cirq, or TensorFlow Quantum – anywhere you can keep parameters live in the autodiff graph.
The bottom line
Gradient‐based learning will not replace analytic solvers for every use case. When you need machine precision or extreme speed, Chao et al.'s method is still your friend. But for variational settings, end‐to‐end differentiable pipelines, or any case where your target is not a closed‐form polynomial, this repository gives you a principled, tested, and reproducible way forward.
Read the paper, run the code, and consider whether the next quantum algorithm you design might be trained rather than derived.
Citation: Peilivanidis, V. (2026). Learning Quantum Signal Processing Phase Angles via Gradient Descent. DOI: 10.5281/zenodo.20645402
Code: github.com/rosspeili/trainable-qsp-angles (Apache 2.0)