Benchmarking Qiskit and PennyLane Gradient-Computation Workflows for Variational Quantum Machine Learning
Variational quantum machine learning (VQML) combines parameterized quantum circuits with classical optimization to train models on data-dependent cost functions. A central practical challenge in this workflow is that gradient evaluation can become a major computational bottleneck, and different quantum software frameworks provide different differentiation strategies. This paper shows that, in the tested statevector simulation setting, the choice of differentiation method has a stronger effect on one full gradient computation than the framework choice alone. To demonstrate this, the benchmark compares three configurations: Qiskit parameter-shift using Aer, PennyLane parameter-shift using lightning.qubit, and PennyLane adjoint differentiation using lightning.qubit. All configurations use the same four-qubit hardware-efficient ansatz, the same observable, and the same parameter scaling with circuit depth. Runtime is measured across increasing ansatz sizes, where increasing the number of layers also increases the number of trainable parameters and the circuit depth. The results show that simulator-specific adjoint differentiation scales substantially more efficiently than parameter-shift in this setting, while the comparison between Qiskit and PennyLane parameter-shift shows additional workflow-level performance differences under the same general differentiation rule. At 808 trainable parameters, PennyLane adjoint averaged 0.0598s, compared with 7.56s for Qiskit parameter-shift and 23.14s for PennyLane parameter-shift, corresponding to 126× and 387× lower mean runtime, respectively.
Authors
- Viktoriia Hrodetska
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-02
- DOI
- https://doi.org/10.5281/zenodo.23893061
- Primary Topic
- Quantum Computing Algorithms and Architecture
- Type
- preprint