Qiskit /qiskit
Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
★ 7,973⑂ 3,129👁 235⑃ 11,545● 5,865▤ 174
+1
Daily
7,973
stars
3,129
forks
235
watchers
11,545
prs
5,865
issues
174
releases
README
Qiskit
!PyPI - Python Version
Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
This library is the core component of Qiskit, which contains the building blocks for creating and working with quantum circuits, quantum operators, and primitive functions (Sampler and Estimator).
It also contains a transpiler that supports optimizing quantum circuits, and a quantum information toolbox for creating advanced operators.
Qiskit provides two public APIs: a Python API and a C API. The Python API is the primary interface and prior to Qiskit 2.0 was the only public API available
for Qiskit. The C API is designed to provide direct access to Qiskit's internal data model (which is written in Rust). The C API can be consumed as either a
shared library (libqiskit.so) for standalone use, or from its embedding in the qiskit Python package for writing Python extension modules.
For more details on how to use Qiskit, refer to the documentation located here:
Installation
Python
For running Qiskit on Python we recommend installing Qiskit via pip:
bash
pip install qiskit
Pip will handle all dependencies automatically and you will always install the latest (and well-tested) version.
To install from source, follow the instructions in the documentation.
Standalone C library
To install Qiskit as a standalone C library the only option is currently to build Qiskit from source. This requires having the
Rust compiler installed.
We recommend installing GNU Make to simplify the build process.
With these requirements installed you can run:
bash
make c
This will compile the C library and put the dist/c directory in the root of the repository which will contain the shared library and C headers for
the library.
You can refer to the documentation on installing the C API for more details and how to
use the built library.
Create your first quantum program in Qiskit
Now that Qiskit is installed, it's time to begin working with Qiskit. We will use the Python interface to demonstrate creating a quantum program.
The essential parts of a quantum program are:
1. Define and build a quantum circuit that represents the quantum state
2. Define the classical output by measurements or a set of observable operators
3. Depending on the output, use the Sampler primitive to sample outcomes or the Estimator primitive to estimate expectation values.
Create an example quantum circuit using the QuantumCircuit class:
python
import numpy as np
from qiskit import QuantumCircuit
1. A quantum circuit for preparing the quantum state |000 + i |111 / √2
qc = QuantumCircuit(3)
qc.h(0) generate superposition
qc.p(np.pi / 2, 0) add quantum phase
qc.cx(0, 1) 0th-qubit-Controlled-NOT gate on 1st qubit
qc.cx(0, 2) 0th-qubit-Controlled-NOT gate on 2nd qubit
This simple example creates an entangled state known as a GHZ state $(|000\rangle + i|111\rangle)/\sqrt{2}$. ItTop issues
#2645Randomized testing failure on main1119 comments · 2019-06-17#7864Nightly test failure log983 comments · 2022-04-01#4159TwoQubitWeylDecomposition: failed to diagonalize M268 comments · 2020-04-14#2304qiskit/visualization/bloch.py needs testing35 comments · 2019-05-05#8594Add good __repr__ methods to all public classes25 comments · 2022-08-22#7155CSP ignores 3-or-more-qubit gates20 comments · 2021-10-18#13285Add an efficient circuit synthesis for a special pattern `exp(-it (IZZ + ZZI + ZZZ))`18 comments · 2024-10-07#5775collapsing a chain of gates18 comments · 2021-02-02
Latest release
Qiskit 2.6.2 2.6.2 2026-11-05Changelog Fixed - Set recursion limit for QPY deserialization (17413) - Fix QASM3 export of decomposed gate params (16997) (17420) - Enforce buffer overwrite safety in qk_circuit_inst_unitary (17418) - Avoid SymbolExpr string parser for Qpy loading of sympy expressions (16745) (17414) - Fix WrapAngles angle bounds ignorance inside control flow (17349) (17404) - Making SynthesizeRZRotations recursive (17359) (17362) - Fixed control-flow handling for Clifford+T compilation (17318) (17356)