Files
priya-sundaram-devandChristian Clauss dde1e49fe1 quantum: modernize QFT to Qiskit 2.x and re-enable its test (#15120)
* quantum: modernize QFT to Qiskit 2.x + re-enable its test

quantum/q_fourier_transform.py used the Aer and execute symbols that were
removed from qiskit in the 1.0 API break, so it could never run and was on
the pytest --ignore list. Port it to the current API:

- Drop 'from qiskit import Aer, execute'. Build the circuit unchanged, then
  simulate with the pure-Python BasicSimulator via transpile() + backend.run(),
  so no compiled qiskit-aer backend is needed (qiskit-aer has no Python 3.14
  wheels yet; BasicSimulator ships inside qiskit core).
- Seed the run (seed_simulator=42) and rewrite the doctest to assert the
  reproducible, shot-noise-independent facts (the four outcomes appear and the
  counts sum to the shot total) instead of exact per-state counts, which random
  sampling can never hit.
- Add 'qiskit>=2' to project dependencies and drop the quantum ignore + the
  stale '# TODO: #8818 Re-enable quantum tests' comment in build.yml.

Draft until CI confirms qiskit installs and imports on the repo's Python 3.14.

* Update quantum/q_fourier_transform.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2026-08-30 08:29:03 +00:00
..
2022-10-13 00:56:10 +02:00