Skip to main content

Qiskit

License Current Release Downloads Coverage Status PyPI - Python Version Minimum rustc 1.89 Downloads DOI

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:

https://quantum.cloud.ibm.com/docs/

Installation

Python

For running Qiskit on Python we recommend installing Qiskit via pip:

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:

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:

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}$. It uses the standard quantum gates: Hadamard gate (h), Phase gate (p), and CNOT gate (cx).

Once you've made your first quantum circuit, choose which primitive you will use. Starting with the Sampler, we use measure_all(inplace=False) to get a copy of the circuit in which all the qubits are measured:

# 2. Add the classical output in the form of measurement of all qubits
qc_measured = qc.measure_all(inplace=False)

# 3. Execute using the Sampler primitive
from qiskit.primitives import StatevectorSampler
sampler = StatevectorSampler()
job = sampler.run([qc_measured], shots=1000)
result = job.result()
print(f" > Counts: {result[0].data['meas'].get_counts()}")

Running this will give an outcome similar to {'000': 497, '111': 503} which is 000 50% of the time and 111 50% of the time up to statistical fluctuations. To illustrate the power of the Estimator, we now use the quantum information toolbox to create the operator $XXY+XYX+YXX-YYY$ and pass it to the run() function, along with our quantum circuit. Note that the Estimator requires a circuit without measurements, so we use the qc circuit we created earlier.

# 2. Define the observable to be measured 
from qiskit.quantum_info import SparsePauliOp
operator = SparsePauliOp.from_list([("XXY", 1), ("XYX", 1), ("YXX", 1), ("YYY", -1)])

# 3. Execute using the Estimator primitive
from qiskit.primitives import StatevectorEstimator
estimator = StatevectorEstimator()
job = estimator.run([(qc, operator)], precision=1e-3)
result = job.result()
print(f" > Expectation values: {result[0].data.evs}")

Running this will give the outcome 4. For fun, try to assign a value of +/- 1 to each single-qubit operator X and Y and see if you can achieve this outcome. (Spoiler alert: this is not possible!)

Using the Qiskit-provided qiskit.primitives.StatevectorSampler and qiskit.primitives.StatevectorEstimator will not take you very far. The power of quantum computing cannot be simulated on classical computers and you need to use real quantum hardware to scale to larger quantum circuits. However, running a quantum circuit on hardware requires rewriting to the basis gates and connectivity of the quantum hardware. The tool that does this is the transpiler, and Qiskit includes transpiler passes for synthesis, optimization, mapping, and scheduling. However, it also includes a default compiler, which works very well in most examples. The following code will map the example circuit to the basis_gates = ["cz", "sx", "rz"] and a bidirectional linear chain of qubits $0 \leftrightarrow 1 \leftrightarrow 2$ with the coupling_map = [[0, 1], [1, 0], [1, 2], [2, 1]].

from qiskit import transpile
from qiskit.transpiler import Target, CouplingMap
target = Target.from_configuration(
    basis_gates=["cz", "sx", "rz"],
    coupling_map=CouplingMap.from_line(3),
)
qc_transpiled = transpile(qc, target=target)

Executing your code on real quantum hardware

Qiskit provides an abstraction layer that lets users run quantum circuits on hardware from any vendor that provides a compatible interface. The best way to use Qiskit is with a runtime environment that provides optimized implementations of Sampler and Estimator for a given hardware platform. This runtime may involve using pre- and post-processing, such as optimized transpiler passes with error suppression, error mitigation, and, eventually, error correction built in. A runtime implements the qiskit.primitives.BaseSamplerV2 and qiskit.primitives.BaseEstimatorV2 interfaces. For example, some packages that provide implementations of a runtime primitive are:

Qiskit also provides a lower-level abstract interface for describing quantum backends. This interface, located in qiskit.providers, defines an abstract BackendV2 class that providers can implement to represent their hardware or simulators to Qiskit. The backend class includes a common interface for executing circuits on the backends; however, in this interface each provider may perform different types of pre- and post-processing and return outcomes that are vendor-defined. Some examples of published provider packages that interface with real hardware are:

You can refer to the documentation of these packages for further instructions on how to get access and use these systems.

Contribution Guidelines

If you'd like to contribute to Qiskit, please take a look at our contribution guidelines. By participating, you are expected to uphold our code of conduct.

We use GitHub issues for tracking requests and bugs. Please join the Qiskit Slack community for discussion, comments, and questions. For questions related to running or using Qiskit, Stack Overflow has a qiskit. For questions on quantum computing with Qiskit, use the qiskit tag in the Quantum Computing Stack Exchange (please, read first the guidelines on how to ask in that forum).

Authors and Citation

Qiskit is the work of many people who contribute to the project at different levels. If you use Qiskit, please cite as per the included BibTeX file.

Changelog and Release Notes

The changelog for a particular release is dynamically generated and gets written to the release page on GitHub for each release. For example, you can find the page for the 1.2.0 release here:

https://github.com/Qiskit/qiskit/releases/tag/1.2.0

The changelog for the current release can be found in the releases tab: Releases The changelog provides a quick overview of notable changes for a given release.

Additionally, as part of each release, detailed release notes are written to document in detail what has changed. This includes any documentation on potential breaking changes on upgrade, and new features. See all release notes here.

Acknowledgements

We acknowledge partial support for Qiskit development from the DOE Office of Science National Quantum Information Science Research Centers, Co-design Center for Quantum Advantage (C2QA) under contract number DE-SC0012704.

License

Apache License 2.0

Metadata

Release files for qiskit 2.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qiskit 2.6.2
File Size Uploaded Provenance Actions
qiskit-2.6.2.tar.gz 4.7 MB With provenance Details for qiskit-2.6.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qiskit 2.6.2
File Actions
qiskit-2.6.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for qiskit-2.6.2-cp310-abi3-win_amd64.whl
qiskit-2.6.2-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for qiskit-2.6.2-cp310-abi3-manylinux_2_28_x86_64.whl
qiskit-2.6.2-cp310-abi3-manylinux_2_28_s390x.whl CPython 3.10 abi3 Linux glibc 2.28+ IBM System/390x Details for qiskit-2.6.2-cp310-abi3-manylinux_2_28_s390x.whl
qiskit-2.6.2-cp310-abi3-manylinux_2_28_ppc64le.whl CPython 3.10 abi3 Linux glibc 2.28+ PowerPC 64-le Details for qiskit-2.6.2-cp310-abi3-manylinux_2_28_ppc64le.whl
qiskit-2.6.2-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for qiskit-2.6.2-cp310-abi3-manylinux_2_28_aarch64.whl
qiskit-2.6.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for qiskit-2.6.2-cp310-abi3-macosx_11_0_arm64.whl
qiskit-2.6.2-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for qiskit-2.6.2-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 73.8 MB

Release files / qiskit-2.6.2.tar.gz

Download URL qiskit-2.6.2.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
b85b5f7b56700b864cc06dbfb33f01453a42024cf5ab954a0e0a275127ebd255
BLAKE2b-256 checksum
How to use checksums
2c48abe21e39c9deb4370be362f965c83455bb2df8edcec1ca87f81f5bae87df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-win_amd64.whl

Download URL qiskit-2.6.2-cp310-abi3-win_amd64.whl
Size 9.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b8e20c86399c916e0e0b515c4cb5d22721a851b97c536b2f7e2afa1ee1931590
BLAKE2b-256 checksum
How to use checksums
ba9ed7270337859e1b9f950d011cd10b4a5ab726e5d22f29293fd97048f85958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL qiskit-2.6.2-cp310-abi3-manylinux_2_28_x86_64.whl
Size 9.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
e8578003e39facf72289fafae1542e38646e5cae7c93665f004046efa5797669
BLAKE2b-256 checksum
How to use checksums
4908db2ff7cd24c4a14bb035c4cbbf332ab0abc27330a8fb33d1a64da9d01409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-manylinux_2_28_s390x.whl

Download URL qiskit-2.6.2-cp310-abi3-manylinux_2_28_s390x.whl
Size 11.9 MB
Tags CPython 3.10 Linux glibc 2.28+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
7a6f2df167ed47b93cc3a72fbb4072ea873abff3f63941cbd884d0b227b83190
BLAKE2b-256 checksum
How to use checksums
a7e9978b3421a992341043aa3d91473da0662dd6201a060bb3100e63aab6531f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-manylinux_2_28_ppc64le.whl

Download URL qiskit-2.6.2-cp310-abi3-manylinux_2_28_ppc64le.whl
Size 10.3 MB
Tags CPython 3.10 Linux glibc 2.28+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
9c3b47903705e6803df1087da75d744c8f7724847b074cf31b75362c98202bc5
BLAKE2b-256 checksum
How to use checksums
66e62a0ba8d36e31fb357dc558be5138a6012fc937a8e85e89b4f0276c48a2cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL qiskit-2.6.2-cp310-abi3-manylinux_2_28_aarch64.whl
Size 9.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
9e99a5765aff4419463978437ebf9de15bccadbc663893d543d53de106da5535
BLAKE2b-256 checksum
How to use checksums
b28269b7fb516ccc1b78c729be1ad0c293ed7c4e5ca9c02472d5a0beed4cf584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL qiskit-2.6.2-cp310-abi3-macosx_11_0_arm64.whl
Size 9.1 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4d775f072025039dac8269c1657970bb17b0965a41ce841bd6576b83d6ef2fd0
BLAKE2b-256 checksum
How to use checksums
5b88a4cbdf4f3edf71482a9d4313761e1a6c1b7efced060e826c0930beadd3b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qiskit-2.6.2-cp310-abi3-macosx_10_12_x86_64.whl

Download URL qiskit-2.6.2-cp310-abi3-macosx_10_12_x86_64.whl
Size 9.7 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9e7214b8bab334a1532e1a71019fe3de7517388b349ee68697e7dd45348654a1
BLAKE2b-256 checksum
How to use checksums
cee8b79ce91437f66deb6841bf818e6bffbb2382212056347be5b2465ba825a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for qiskit 2.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for qiskit-2.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.2 This release

8 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page