Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

Qiskit/qiskit

Machine Learning

Build, transpile, and simulate quantum circuits in Python or C for research and education.

7,965
3,125
Python
Apache-2.0
9 years old

What Qiskit Does

Qiskit is the core SDK for programming quantum computers at the level of circuits, operators, and primitives. It supplies the building blocks for constructing circuits, defining observables, and running Sampler or Estimator workflows. A transpiler rewrites circuits for a target's basis gates and qubit connectivity, and a quantum information toolbox helps build and manipulate advanced operators. The primary interface is the Python API; a C API exposes the Rust data model as a shared library or as a base for Python extension modules. It is aimed at researchers, students, and developers who want to write and simulate quantum programs.

Installation

Install the Python package with pip:

pip install qiskit

Pip resolves dependencies and installs the latest release. Source installation is covered in the official source install guide. The standalone C library must be built from source with a Rust compiler and GNU Make, then make c produces the shared library and headers under dist/c; see the C API install guide.

First Circuit, Sampler and Estimator

Create a circuit, add measurements, and sample it with the statevector Sampler:

import numpy as np
from qiskit import QuantumCircuit

qc = QuantumCircuit(3)
qc.h(0)
qc.p(np.pi / 2, 0)
qc.cx(0, 1)
qc.cx(0, 2)

qc_measured = qc.measure_all(inplace=False)
from qiskit.primitives import StatevectorSampler
sampler = StatevectorSampler()
result = sampler.run([qc_measured], shots=1000).result()
print(result[0].data['meas'].get_counts())

For expectation values, omit measurements and pass a SparsePauliOp to StatevectorEstimator:

from qiskit.quantum_info import SparsePauliOp
from qiskit.primitives import StatevectorEstimator
operator = SparsePauliOp.from_list([("XXY", 1), ("XYX", 1), ("YXX", 1), ("YYY", -1)])
estimator = StatevectorEstimator()
result = estimator.run([(qc, operator)], precision=1e-3).result()
print(result[0].data.evs)

The statevector primitives are local simulators, so they are useful for small circuits and testing, not for scaling beyond classical simulation. To prepare a circuit for hardware, define a Target with basis gates and a coupling map and call transpile; the README shows mapping to ["cz", "sx", "rz"] with a linear chain.

Running on Hardware

Qiskit defines a runtime interface via BaseSamplerV2 and BaseEstimatorV2. The IBM provider is available as qiskit-ibm-runtime, and community or vendor packages provide backends through BackendV2, including IonQ, AQT, Braket, Quantinuum, and Rigetti integrations. Access, credentials, and processing details vary by provider and its own documentation.

Constraints and License

Python usage only needs the pip package. The C API requires building from source and a Rust toolchain. Simulator-based primitives are limited to classically tractable circuits. Real hardware use depends on a provider package, account, and backend access. Qiskit is released under Apache-2.0. Changelogs are generated per GitHub release and detailed release notes are published separately.

HotRepo's take

Qiskit appeared in the daily Python ranking on 2026-11-12 at position 15 with 3 stars gained that day, and a Hacker News thread from 2025-11-26 drew 43 points and a few comments. Those comments describe it as useful for learning quantum physics and for connecting to non-IBM hardware through community providers, while one comments that provider quality varies. The repository is a long-running core SDK rather than a fresh growth project, and its value lies in the circuit layer and provider abstraction rather than in the simulator alone.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Qiskit open-source SDK for working with quantum computers
▲ 43 · 3 comments · November 26, 2025