TY - GEN
T1 - Migrating QAOA from Qiskit 1.x to 2.x
T2 - 7th International Workshop on Quantum Software Engineering, Q-SE 2026
AU - Cardinal, Julien
AU - Benzarti, Imen
AU - Boussaidi, Ghizlane El
AU - Pere, Christophe
N1 - Publisher Copyright:
© 2026 Copyright held by the owner/author(s).
PY - 2026/6/2
Y1 - 2026/6/2
N2 - Migrating quantum algorithms across evolving frameworks introduces subtle behavioral changes that affect accuracy and reproducibility. This paper reports our experience converting the Quantum Approximate Optimization Algorithm (QAOA) from Qiskit Algorithms with Qiskit 1.x (v1 primitives) to a custom implementation using Qiskit 2.x (v2 primitives). Despite identical circuits, optimizers, and Hamiltonians, the new version produced drastically different results. A systematic analysis revealed the root cause: the sampling budget - the number of circuit executions (shots) per iteration. The library's implicit use of unlimited shots yielded dense probability distributions, whereas the v2 default of 10000 shots captured only 23% of the state space. Increasing shots to 250000 restored library-level accuracy. This study highlights how hidden parameters at the quantum-classical interaction level can dominate hybrid algorithm performance and provides actionable recommendations for developers and framework designers to ensure reproducible results in quantum software migration.
AB - Migrating quantum algorithms across evolving frameworks introduces subtle behavioral changes that affect accuracy and reproducibility. This paper reports our experience converting the Quantum Approximate Optimization Algorithm (QAOA) from Qiskit Algorithms with Qiskit 1.x (v1 primitives) to a custom implementation using Qiskit 2.x (v2 primitives). Despite identical circuits, optimizers, and Hamiltonians, the new version produced drastically different results. A systematic analysis revealed the root cause: the sampling budget - the number of circuit executions (shots) per iteration. The library's implicit use of unlimited shots yielded dense probability distributions, whereas the v2 default of 10000 shots captured only 23% of the state space. Increasing shots to 250000 restored library-level accuracy. This study highlights how hidden parameters at the quantum-classical interaction level can dominate hybrid algorithm performance and provides actionable recommendations for developers and framework designers to ensure reproducible results in quantum software migration.
KW - QAOA
KW - Quantum algorithms
KW - Quantum Optimization
KW - Software Architecture Recovery problem
UR - https://www.scopus.com/pages/publications/105042191730
U2 - 10.1145/3786150.3788612
DO - 10.1145/3786150.3788612
M3 - Contribution to conference proceedings
AN - SCOPUS:105042191730
T3 - Proceedings - 2026 IEEE/ACM International Workshop on Quantum Software Engineering, Q-SE 2026
SP - 25
EP - 32
BT - Proceedings - 2026 IEEE/ACM International Workshop on Quantum Software Engineering, Q-SE 2026
PB - Association for Computing Machinery, Inc
Y2 - 12 April 2026 through 18 April 2026
ER -