Curriculum / Real-World Quantum Python / The Quantum Python Landscape
The Quantum Python Landscape
Survey the major quantum Python frameworks, Qiskit, Cirq, PennyLane, Braket, and understand when to use each.
The Quantum Python Landscape
Python has become the lingua franca of quantum computing. Every major hardware vendor and research group provides a Python SDK. Knowing which framework to choose, and how they differ architecturally, is the first step to writing real quantum software.
The Major Frameworks
Qiskit (IBM) The most widely used quantum SDK. Open-source, developed by IBM.
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])Architecture: Circuit-first. Circuits are defined, transpiled (optimized for a target backend), then executed. Strong backend ecosystem: IBM Quantum hardware, Aer simulator, custom backends.
Best for: IBM hardware access, general circuit-level programming, research papers (most common framework in quantum computing papers).
Cirq (Google) Developed by Google for Sycamore processor research.
import cirq
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit([cirq.H(q0), cirq.CNOT(q0, q1), cirq.measure(q0, q1)])Architecture: Gate-first. Explicit qubit objects. Strong support for Google hardware (Sycamore). Excellent for noise modeling and pulse-level control.
Best for: Google hardware, noise simulation, custom gate sets, research at Google.
PennyLane (Xanadu) Differentiable quantum computing framework, quantum circuits as differentiable functions.
import pennylane as qml
dev = qml.device("default.qubit", wires=2)
@qml.qnode(dev)
def circuit(params):
qml.RY(params[0], wires=0)
qml.CNOT(wires=[0, 1])
return qml.expval(qml.PauliZ(0))
grad = qml.grad(circuit)([0.5])Architecture: Quantum machine learning first. QNodes are quantum functions with automatic gradient computation (parameter-shift rule). Integrates with PyTorch, JAX, TensorFlow.
Best for: Quantum machine learning, variational algorithms (VQE, QAOA), hybrid classical-quantum gradient descent.
Amazon Braket SDK AWS cloud access to multiple hardware backends (IonQ, Rigetti, OQC, IQM).
from braket.circuits import Circuit
from braket.aws import AwsDevice
circuit = Circuit().h(0).cnot(0, 1)
device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
task = device.run(circuit, shots=1000)
result = task.result()Architecture: Task-based. Submit circuit → get task ARN → poll for result. Multi-backend from one API.
Best for: Multi-vendor hardware comparison, AWS-native workflows, cloud quantum computing.
myqubit.dev Simulator (This Platform) Built on a custom Python mock that is Qiskit-API-compatible. Full Python code runs in your browser via Pyodide.
Supported gates: H, X, Y, Z, S, T, RX, RY, RZ, CX, CZ, SWAP, Measure
Interface: QuantumCircuit, measure_all(), qc.draw() (stub), counts = execute_circuit(qc)
All code examples in this track use this simulator, everything that works here translates directly to Qiskit on real hardware (with imports changed).
Framework Comparison
| Feature | Qiskit | Cirq | PennyLane | Braket |
|---|---|---|---|---|
| Hardware backends | IBM | Multi-vendor | Multi-vendor | |
| ML integration | Limited | Limited | Core feature | Limited |
| Noise modeling | Aer | Strong | Good | Moderate |
| Learning resources | Extensive | Moderate | Good | Growing |
| Community | Largest | Google-focused | ML-focused | AWS-focused |
| When to choose | Research / IBM | Google / pulses | VQE / QML | Multi-cloud |
This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.
How this lesson works
A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.
Part of: Real-World Quantum Python
Write production-quality quantum Python, circuit optimization, hybrid algorithms, cloud backends, noise modeling, and software engineering patterns.
This lesson is part of Pro
Unlock Real-World Quantum Python and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.