Qiskit

On this page 7

Qiskit is an open-source software development kit written mainly in Python for building, compiling and executing quantum circuits, and it is one of the most widely used tools in quantum software. Originally released by IBM in 2017 under the Apache 2.0 license, it lets researchers and developers describe a quantum program as a sequence of gates and measurements, transform that program to fit a real processor, and run it on simulators or cloud-accessible hardware.

Within quantum computing, Qiskit occupies the layer between the algorithm and the machine. It does not perform quantum computation itself; instead, it provides the data structures, compiler passes and execution interfaces that turn an abstract idea into instructions a specific device can accept.

How Qiskit turns a program into hardware instructions

Qiskit follows a build, transpile, execute workflow. A developer first creates a QuantumCircuit object containing qubits, classical bits, gates and measurements. That circuit is hardware agnostic: it may use any gate in the library and assume that every qubit can interact with every other qubit.

Real processors impose constraints, so the second step is transpilation. The transpiler rewrites the circuit into the device’s native basis gates, maps virtual qubits onto physical qubits, inserts swap operations where the coupling map lacks a direct connection, and applies optimization passes that cancel or merge redundant gates. Since the 1.x releases, performance-critical parts of the transpiler have been rewritten in Rust, which substantially reduces compile time for circuits with hundreds of qubits.

The third step is execution through primitives, a small set of standardized interfaces. The table below summarizes the main stages and what each one produces.

StageMain Qiskit componentOutput
Circuit constructionQuantumCircuit and the circuit libraryAbstract, device-independent circuit
TranspilationTranspiler and pass managersCircuit in native gates on physical qubits
ExecutionSampler and Estimator primitivesBit-string counts or expectation values
Analysisquantum_info module and visualization toolsStates, operators, fidelities and plots
Stages of the Qiskit workflow

Core modules and the wider Qiskit ecosystem

The core package concentrates on circuits, compilation and abstract interfaces, while simulation and cloud access live in separate packages. This modular split keeps the core lightweight and lets each component evolve on its own release schedule.

The following table lists the components that practitioners encounter most often and their responsibilities.

Package or moduleRoleTypical use
qiskit (core)Circuits, transpiler, primitives interfaces, quantum_infoWriting and compiling any quantum program
Qiskit AerHigh-performance local simulators with noise modelsTesting circuits before using hardware
Qiskit Runtime clientAccess to IBM quantum processors through the cloudRunning jobs on real devices
qiskit.qasm3Import and export of OpenQASM 3 programsExchanging circuits with other toolchains
Qiskit addonsResearch techniques such as circuit cuttingExtending reach on noisy hardware
Main packages around the Qiskit core

The quantum_info module deserves special mention because it supplies exact mathematical objects such as Statevector, Operator and SparsePauliOp. The SparsePauliOp class is the standard way to express observables and Hamiltonians, which makes it central to chemistry, optimization and physics simulations built on the Estimator primitive.

Sampler and Estimator primitives

The primitives define what a user asks a quantum computer to return. The Sampler returns measured bit strings from a number of shots, while the Estimator returns expectation values of observables together with statistical error estimates. Separating these two tasks allows providers to apply hardware-specific techniques, such as error mitigation, without changing user code.

The current interface, known as primitives V2, accepts batches of circuits, observables and parameter values grouped into units called PUBs (primitive unified blocs). This design suits variational algorithms, where the same parameterized circuit runs many times with different parameter sets.

NeedRecommended primitiveReason
Output distribution of bit stringsSamplerReturns counts for every measured outcome
Energy of a molecular HamiltonianEstimatorComputes expectation values directly
Cost function in QAOA or VQEEstimatorSupports error mitigation for observables
Search or sampling algorithmsSamplerFinal answer is a measured bit string
Choosing between the two primitives

How Qiskit compares with other quantum SDKs

Qiskit is one of several quantum SDKs, and the choice usually depends on target hardware, programming style and research focus. Qiskit stands out for its large user community, mature transpiler and direct path to IBM processors, but its circuits can also be exported to other platforms.

ToolPrimary originDistinctive focus
QiskitIBMFull-stack circuit SDK with a mature transpiler
CirqGoogleFine control of circuits for near-term devices
PennyLaneXanaduDifferentiable programming and quantum machine learning
TKETQuantinuumHardware-agnostic compiler with strong optimization
CUDA-QNVIDIAGPU-accelerated hybrid quantum-classical workflows
Qiskit and related quantum software tools

These tools are not mutually exclusive. Many teams write circuits in Qiskit, compile them with another optimizer, or exchange programs through OpenQASM, the circuit description language that Qiskit both reads and writes.

Limitations and common mistakes

Qiskit evolves quickly, and breaking changes between major versions are the most frequent source of frustration. Version 1.0 in 2024 removed long-deprecated interfaces such as the old execute function, and version 2.0 removed the pulse-level programming module, so tutorials written a few years ago often fail on current releases.

  • Ignoring transpilation cost: a circuit that looks shallow can become many times deeper after routing on a sparse coupling map.
  • Trusting ideal simulation: noiseless simulators hide decoherence and readout error, so results on hardware are usually worse.
  • Assuming simulators scale: exact statevector simulation memory doubles with every added qubit, which limits it to roughly 30 to 40 qubits on large machines.
  • Using too few shots: statistical uncertainty falls only with the square root of the shot count, so precise estimates need many repetitions.

A further limitation is that quantum advantage is not guaranteed by any software stack. Qiskit makes experiments accessible, but the usefulness of results still depends on hardware quality, circuit depth and the error-handling strategy chosen by the user.

Explained without jargon

Qiskit is a free toolbox for writing programs for quantum computers. A person describes, in ordinary Python code, which steps the quantum computer should perform, much like writing a recipe.

Every real quantum machine understands only a few basic moves and has its own wiring. Qiskit acts like a translator and travel planner: it rewrites the recipe into moves the machine knows and finds the shortest route between its parts. It then sends the job to a simulator on a laptop or to a real quantum computer in the cloud and brings back the results. The key idea is simple: Qiskit connects human ideas to quantum hardware.

A typical use case

A computational chemistry group at a university wants to estimate the ground-state energy of a small molecule such as lithium hydride. The researchers express the molecular Hamiltonian as a SparsePauliOp and build a parameterized circuit for the variational quantum eigensolver.

They first test the algorithm with Qiskit Aer, using a noise model copied from a real device, and tune the classical optimizer until energies converge. They then transpile the circuit at optimization level 3 for a specific IBM processor, which reduces the number of two-qubit gates, and submit batches through the Estimator primitive with error mitigation enabled and several thousand shots per point.

The outcome is an energy curve across bond lengths that tracks the exact classical reference within the expected error bars. The group gains hands-on evidence of how noise affects results and a reproducible workflow that can be reused when larger, higher-fidelity processors become available.