Quantum Optimization with IBM Quantum (openHPI)
Julien Gacon, Dr. Daniel J. Egger, Dr. Stefan Woerner, Lucia Cuervo Valor (IBM Quantum)
Qiskit and PennyLane are the two most widely used quantum computing frameworks for software development. They overlap on fundamentals but diverge significantly in philosophy, use case, and community. Here is how to decide which to learn first, and whether to learn both.
Most learners should start with Qiskit. Here is when each framework is the better choice:
| Feature | Qiskit | PennyLane |
|---|---|---|
| Developer | IBM | Xanadu |
| Primary use case | General quantum programming, IBM hardware | Quantum ML, differentiable circuits |
| Hardware access | IBM quantum devices (free), simulators | Multiple backends via plugins (Qiskit, Cirq, etc.) |
| QML support | Basic, not the focus | First-class: PyTorch, JAX, TensorFlow integration |
| Learning resources | Extensive: textbook, IBM Learning, hundreds of courses | Good: PennyLane Codebook, demos, growing course selection |
| Community size | Very large (500k+ IBM Quantum users) | Smaller, concentrated in QML research |
| Job market | More job postings explicitly mention Qiskit | Fewer postings, stronger in QML research roles |
| Best for | Beginners, general quantum developers, IBM hardware users | QML researchers, differentiable programming, multi-backend |
The clearest way to feel the difference is to write the same program in each. Below is a Bell state, the simplest entangled two-qubit circuit, built and sampled 1,000 times in Qiskit and in PennyLane. Both produce roughly half 00 and half 11 outcomes. Notice how Qiskit separates the circuit from the primitive that runs it, while PennyLane wraps the circuit in a decorated function that behaves like any other Python callable.
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()
sampler = StatevectorSampler()
result = sampler.run([qc], shots=1000).result()
counts = result[0].data.meas.get_counts()
print(counts) # ~ {'00': 500, '11': 500} import pennylane as qml
dev = qml.device("default.qubit", wires=2, shots=1000)
@qml.qnode(dev)
def bell():
qml.Hadamard(wires=0)
qml.CNOT(wires=[0, 1])
return qml.counts()
print(bell()) # ~ {'00': 500, '11': 500}
For circuits this small the two look similar. The gap widens with quantum machine learning: in PennyLane, adding a trainable parameter and a gradient-based optimizer is a few lines because the qnode is differentiable end to end, whereas in Qiskit you wire the circuit into a separate optimization loop. Work through both hands-on with our free Qiskit Hello World and PennyLane Hello World tutorials.
Answer these in order. Stop at the first match.
Qiskit is the most widely used quantum computing framework by a large margin. Built and maintained by IBM, it is the official SDK for accessing IBM's real quantum computers.
PennyLane, built by Xanadu, was designed from the ground up around differentiable programming -- treating quantum circuits as machine learning layers that can be trained with gradient descent.
Qiskit and PennyLane are the two most common starting points, but they are not the only frameworks, and picking one does not lock you out of the others. Here is how the rest of the landscape relates to this decision.
For a full neutral breakdown across every major framework and platform, see our framework and platform comparison.
Yes, and many practitioners do. The core concepts of quantum circuits -- qubits, gates, measurement, superposition, entanglement -- are the same across frameworks. Once you understand them in one framework, picking up the other takes days, not months.
The recommended path for most learners: start with Qiskit for the foundations (2-4 months), then add PennyLane if you find yourself working on variational algorithms, QML, or multi-backend deployments. If you know you want to focus on QML from the start, you can go PennyLane-first, but expect a steeper early ramp due to fewer beginner resources.
Browse all Qiskit resources or all PennyLane resources for a comprehensive view of what is available on each platform.
Highest-rated courses for learning Qiskit and IBM quantum programming.
Julien Gacon, Dr. Daniel J. Egger, Dr. Stefan Woerner, Lucia Cuervo Valor (IBM Quantum)
IBM Quantum
IBM Quantum
Highest-rated courses for learning PennyLane and quantum machine learning.
Xanadu / PennyLane Team
Xanadu / Community
Xanadu