Most Qiskit errors people hit aren't bugs in their circuit logic. They're API surface that moved: a function got removed, a package got split out, an authentication method got replaced, and the error message doesn't always point at the fix. This is a working list of the ones that show up most, gathered from Qiskit's own migration guides and the questions that keep recurring around the SDK, with the fix for each one.
ImportError: cannot import name 'execute' from 'qiskit'
Qiskit 1.0 removed the top-level execute() function that older tutorials and StackOverflow answers still use. If you copy code like this:
from qiskit import execute
result = execute(qc, backend, shots=1000).result()
it fails on any current Qiskit install. The replacement depends on what you're running against. For a local simulator:
from qiskit_aer import AerSimulator
from qiskit import transpile
backend = AerSimulator()
qc_t = transpile(qc, backend)
result = backend.run(qc_t, shots=1000).result()
For real IBM hardware or IBM's cloud simulators, use the primitives (Sampler or Estimator) through QiskitRuntimeService instead, covered below. execute() was a convenience wrapper around transpile-then-run, and Qiskit 1.0 made that step explicit rather than implicit.
ImportError or AttributeError on from qiskit import Aer
Aer, Qiskit's simulator package, moved out of the core qiskit package into its own qiskit-aer package. Any code doing from qiskit import Aer or Aer.get_backend('qasm_simulator') is written against the old, unified package structure.
# Old, breaks now
from qiskit import Aer
sim = Aer.get_backend('qasm_simulator')
# Current
from qiskit_aer import AerSimulator
sim = AerSimulator()
Install with pip install qiskit-aer if it's missing. This is the single most common install-related error, because so much existing tutorial content predates the split.
IBMQ.load_account() no longer works
IBM retired the legacy IBMQ provider and its ibmq_qasm_simulator. Code written against the old provider pattern:
# Old, retired
from qiskit import IBMQ
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
needs to move to QiskitRuntimeService, the current entry point for both the free tier and paid access:
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum", token="YOUR_TOKEN")
backend = service.least_busy(operational=True, simulator=False)
Save your API token once with QiskitRuntimeService.save_account(token="...") and later calls to QiskitRuntimeService() pick it up automatically without passing the token again.
ModuleNotFoundError: No module named 'azure.quantum' when submitting to Azure Quantum
Code written against Microsoft's older Azure Quantum integration imports the standalone azure-quantum package:
# Old pattern
from azure.quantum import Workspace
from azure.quantum.qiskit import AzureQuantumProvider
Microsoft's current Quantum Development Kit (QDK) folds Azure Quantum support into the unified qdk package instead, installed with the azure and qiskit extras:
pip install --upgrade "qdk[azure,qiskit]"
from qdk.azure import Workspace
from qdk.azure.qiskit import AzureQuantumProvider
workspace = Workspace(resource_id="/subscriptions/.../Microsoft.Quantum/Workspaces/...")
provider = AzureQuantumProvider(workspace)
backend = provider.get_backend("quantinuum.qpu.h1-1")
The rest of the workflow, provider.get_backend() and backend.run(), stays the same. Only the package and import path changed.
CircuitError on .measure(): register size mismatch
This one is a genuine circuit bug rather than an API change, and it shows up constantly for beginners:
qc = QuantumCircuit(3, 2) # 3 qubits, only 2 classical bits
qc.measure([0, 1, 2], [0, 1, 2]) # CircuitError: index 2 out of range
The classical register has fewer bits than the number of qubits you're trying to measure into. Either size the classical register to match what you measure, or use qc.measure_all(), which auto-creates a matching classical register for every qubit in the circuit.
TranspilerError: circuit doesn't match backend
qc = QuantumCircuit(20)
# ... build a 20-qubit circuit ...
transpile(qc, backend) # TranspilerError if backend supports fewer qubits
This means the circuit needs more qubits than the target backend has, or uses a gate outside the backend's basis gate set and transpilation can't find a valid mapping. Check backend.configuration().n_qubits and backend.configuration().basis_gates before transpiling, and let transpile() handle the gate decomposition rather than manually inserting gates the backend doesn't natively support.
Deprecation warnings from qiskit.algorithms and qiskit.opflow
If your console fills with DeprecationWarning on every run, the code is almost always importing from qiskit.opflow or the older qiskit.algorithms module structure, both superseded by the separate qiskit-algorithms package and the primitives-based (Sampler/Estimator) pattern. Warnings aren't fatal, but they're a sign the code is one migration behind, and the underlying functions do eventually get removed. Our VQE walkthrough and QAOA tutorial use the current primitives pattern if you need a working reference to migrate against.
Jobs stuck in queue on the free tier
Not an error message, a silent wait. IBM's free Open Plan queues everyone's jobs on shared hardware, and a job submitted to a busy backend takes real time to return, which looks identical to a hang from the caller's side. Call service.least_busy(operational=True, simulator=False) instead of naming a specific backend, and check job.status() rather than assuming a stuck cell means broken code. Our free tier guide covers what the 10-minute monthly quantum-time limit does and doesn't cover.
The pattern behind most of these
Every API-change error above traces back to the same event: Qiskit 1.0 unified what used to be a scattered set of packages (qiskit-terra, qiskit-aer, qiskit-ibmq-provider, and more) into one restructured, versioned package, and retired several legacy paths in the process. If you're hitting an error that isn't listed here and it comes from code copied from an older tutorial, check whether the import path predates that restructuring before assuming your circuit logic is wrong.