Programming Quantum Algorithms with Qiskit
Qiskit is IBM’s open‑source SDK for quantum programming in Python, first released in March 2017 and currently at version 2.0.2 (as of May 27, 2025) It provides everything you need to:
- Build quantum circuits
- Simulate them
- Run experiments on actual quantum hardware via the cloud
The Qiskit ecosystem has also grown to include add‑ons like QAOA, VQE, QPE, Deutsch–Jozsa, Simon’s, and Bernstein–Vazirani
2. Why Use It? Use Cases
- Education & Prototyping
With Qiskit’s high‑level primitives and simulators, students and researchers can prototype algorithms like Deutsch–Jozsa and Simon’s directly in Python notebooks . - Hybrid & NISQ Algorithms
Algorithms like VQE and QAOA combine quantum and classical methods to solve chemistry and optimization problems ibm.com+5en.wikipedia.org+5arxiv.org+5. - Hardware Execution & Error Mitigation
Qiskit Runtime and add‑ons offer features like noise-aware transpilation and error suppression via plugins such as MPF, AQC‑Tensor, and QESEM github.com+13ibm.com+13ibm.com+13. - Research & Industry
From particle physics (DESY) to quantum chemistry and optimization, Qiskit’s circuit functions and tools empower researchers to run experiments with real hardware ibm.com.
3. Example: Grover’s Algorithm in Qiskit
Here’s a simplified version of a Grover’s search for a 2-qubit system (“10”):
from qiskit import QuantumCircuit, Aer, execute
from qiskit.visualization import plot_histogram
n = 2
qc = QuantumCircuit(n, n)
for q in range(n): qc.h(q)
qc.z(0); qc.x(1); qc.cz(0,1); qc.x(1)
for q in range(n): qc.h(q)
qc.x([0,1]); qc.h(1); qc.mct([0],1); qc.h(1); qc.x([0,1])
for q in range(n): qc.h(q)
qc.measure([0,1], [0,1])
sim = Aer.get_backend('qasm_simulator')
result = execute(qc, sim, shots=1024).result()
counts = result.get_counts()
print(counts)
plot_histogram(counts)
In practice, this finds “10” with high probability, showing the √N speedup even for small cases
4. Other Common Algorithms
| Algorithm | Description |
|---|---|
| Deutsch–Jozsa | Determines if a function is constant or balanced using a single query |
| Bernstein–Vazirani | Discovers a hidden string with O(1) queries—exponentially faster than classical |
| Simon’s algorithm | Finds hidden patterns exponentially faster than classical equivalents |
| Quantum Phase Estimation (QPE) | Extracts eigenvalues—essential in chemistry and factoring |
| Variational Quantum Eigensolver (VQE) | Hybrid algorithm to approximate ground states of molecules |
| QAOA | For optimization problems, such as Max-Cut |
5. Learn by Watching
Here’s a top video from IBM:
It covers SDK v1.x features: building circuits, transpilation, and running real hardware examples.
6. What the Community Says
From a Reddit AMA with the Qiski team:
“Quantum algorithms generally only become advantageous if you’ve got a really big problem … reducing computation times from years to hours”
Another user praised the Qiskit Textbook:
“I found it better to use … than the textbook we used in class. The explanations and implementations … were really entertaining”
These highlight both the power of Qiskit and its accessibility.
7. Hands‑On Tips
- Install the SDK
pip install qiskit qiskit-ibmq-provider
2. Get API Access
Sign up at IBM Quantum, get your API token, and run:
from qiskit_ibm_provider import IBMProvider
IBMProvider.save_account('MY_API_KEY')
3. Start Simple
- Create |ψ⟩ = (|0⟩ + |1⟩)/√2 with a Hadamard gate.
- Build a Bell pair as a “Hello World”.
4. Use Simulators
Local simulators like Aer.get_backend('statevector_simulator') are great for testing before running on hardware.
5. Explore Add-ons
Experiment with qiskit-addon-aqc-tensor, qiskit-addon-vqe, etc., for advanced tasks.
8. Useful Links




