mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-28 21:45:27 +08:00
* 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>
Welcome to Quantum Algorithms
Started at https://github.com/TheAlgorithms/Python/issues/1831
- D-Wave: https://www.dwavesys.com and https://github.com/dwavesystems
- Google: https://research.google/teams/applied-science/quantum
- IBM: https://qiskit.org and https://github.com/Qiskit
- Rigetti: https://rigetti.com and https://github.com/rigetti
- Zapata: https://www.zapatacomputing.com and https://github.com/zapatacomputing
IBM Qiskit
- Start using by installing
pip install qiskit, refer the docs for more info. - Tutorials & References
Google Cirq
- Start using by installing
python -m pip install cirq, refer the docs for more info. - Tutorials & references