What is Qiskit? — Your Guide to Navigating the Qiskit Cosmos in 2022
Qiskit [kiss-kit] is an open-source SDK for working with quantum computers at the level of pulses, circuits, and application modules.
At least, that’s the first answer that pops up when you google “What is Qiskit.” However, answers to this question can vary a lot depending on whether you’re asking a search engine, a maintainer, a contributor, your teacher, your mum, etc. (In case you’re wondering, my mum thinks Qiskit is a fancy vegan baked treat, “because it kind of rhymes with biscuit!”)
It’s understandable that it’s difficult to get a straight answer to this question, since Qiskit has grown and changed a LOT since its first release back in 2017. One core package has split into many, the maintainer teams have expanded and reshuffled, and a new software paradigm, Qiskit Runtime, has burst onto the scene to continue to accelerate and streamline quantum development processes. There have been countless new features, bug fixes, deprecations, lockdowns, and life events. People and packages have come and gone, but our name remains the same, which can make it hard to understand what’s going on in our ever-changing ecosystem, whether you’re a new user or one of the founding developers.
So, we thought it might be time for a bit of an updated overview of Qiskit and the primary supported packages within the Qiskit community. This blog post aims to give you a high level overview of the following structure:
PLEASE NOTE!
This diagram is NOT, I repeat, NOT meant to serve as a final, definitive, all-encompassing overview of the entire Qiskit ecosystem. There are many other smaller repositories, less stable packages and community projects that you may also come across with the name ‘Qiskit’ attached that are also important parts of the quantum open source landscape. The packages listed here cover the largest projects that are typically the most stable and most actively maintained by IBMers and other partners. You can think of these as the big planets of the Qiskit ‘solar system’, and other projects as smaller moons, asteroids or satellites. And this module architecture itself may be subject to change over time (just like our real solar system, RIP Pluto 🥲), so bear that in mind, too.
Alright, without further ado, let’s jump in:
A brief trip down memory lane — Qiskit Elements
As you explore the many packages that Qiskit has to offer you may come across the names Terra, Ignis, Aer and Aqua.
Those who have been around in the community for a few years may even remember this infographic:
The Qiskit element structure summarized above was the naming convention for the Qiskit packages as they were in the earlier years of the project. Since then, we have moved away from this naming style in favor of more descriptive names (and frankly, with the rate of proliferation of packages we were quickly running out of element words…). Some of these packages, like Terra and Aer, are still in existence today with their original names, while others have been deprecated and replaced with others — Aqua has been replaced by the high level applications modules, and Ignis by Qiskit Experiments. More on this later.
Core Capabilities — Qiskit Terra
pip install qiskit-terra
Qiskit Terra is the package that makes up the core capabilities of Qiskit. It is the largest package with the broadest suite of tools for quantum computation in the Qiskit ecosystem, and many of the other packages interface with it. This is the package you are probably already the most familiar with since your first days of building quantum circuits. However, there a many useful modules that form this package that you may be less familiar with, including but not limited to the following:
- Quantum Circuits (
qiskit.circuit
) - for initializing and manipulating registers, circuits, instructions, gates, parameters and control flow object. Of particular interest, this module contains an extensive circuit library (qiskit.circuit.library
) with a vast range of circuits, directives and gates - key building blocks for circuit-based quantum computations. - Algorithms (
qiskit.algorithms
) - a collection of quantum algorithms including amplitude amplifiers (e.g. Grover), amplitude estimators, eigensolvers, minimum eigensolvers (e.g. VQE, QAOA), factorizers (e.g. Shor) and phase estimators. - Operators (
qiskit.opflow
) - a layer of modules between circuits and algorithms, aiming to create a lingua franca between theory and implementation using functions and operators. - Pulse (
qiskit.pulse
) - for quantum development working at the lower level of pulse instructions, enabling the user to specify exact time dynamics of an experiment. - Primitives (
qiskit.primitives
) - a collection of classes (e.g. Sampler and Estimator) for implementing fundamental operations that should be implemented by quantum hardware and simulator providers. - Quantum Information (
qiskit.quantum_info
) - a toolkit for working with quantum states, operators and channels, using exact calculations (no sampling noise). - Transpiler (
qiskit.transpiler
) - for adapting quantum circuits to suit specific device topology and/or optimizing for execution on noisy quantum systems. - Visualization (
qiskit.visualization
) - a collection of tools for visualizing data from quantum circuits and experiment results.
Bonus! OpenQasm
OpenQASM is a quantum assembly language for describing quantum circuits. It is critically important to the Qiskit ecosystem, as it enables the exchange of quantum circuit information between different tools.
Blake Johnson, OpenQASM Technical Steering Committee member and IBM Quantum Platform Lead, says:
OpenQASM is the “glue” that allows construction of software stacks composed of pieces of many different packages. For example, you can simulate a circuit using any simulator that accepts OpenQASM …You can construct a circuit using Cirq and transpile it with Qiskit, since Cirq can export OpenQASM. You can construct a circuit using Qiskit and transpile it using Quil-c, etc. etc.
A new version of OpenQASM (v3) is currently in active development. You can see the live specification here, and learn about the open source governance model here.
High Level Applications
This category consists of four separate packages that used to all be contained in a single package (Qiskit Aqua). Each application package focuses on a different field where quantum computation has the potential to provide a real-world impact.
Qiskit Nature
pip install qiskit-nature
This package focuses on solving quantum simulation problems commonly found in nature, such as:
- finding the ground and excited states of molecules
- sampling potential energy surfaces
- protein folding
The Qiskit Nature codebase comprises chemistry drivers, which, when provided with a molecular configuration, will return one- and two-body integrals as well as other data that is efficiently computed classically. This data outputted from a driver can then be translated into a form that is suitable for quantum chemistry algorithms.
Qiskit Machine Learning
pip install qiskit-machine-learning
This package provides a set of tools for a variety of applications in quantum machine learning (QML) research.
With Qiskit Machine Learning, users can work with foundational QML building blocks such as:
- Quantum Neural Networks (QNNs)
- Quantum Kernels (you can also learn how to train quantum kernels in our previous blog here!)
Additionally, the package contains an algorithms submodule containing classes for a number of QML classification and regression algorithms, including:
- Quantum Neural Network Classifier (
NeuralNetworkClassifier
) - Quantum Support Vector Classifier (
QSVC
) - Variational Quantum Classifier (
VQC
) - Quantum Neural Network Regressor (
NeuralNetworkRegressor
) - Quantum Support Vector Regressor (
QSVR
)
Classical ML developers may also be interested in the TorchConnector
class which allows users to connect QNNs to PyTorch to enhance classical workflows with quantum components.
Qiskit Finance
pip install qiskit-finance
This package aims to support researchers working on quantum solutions to problems in finance, with applications classes covering two main areas:
- Optimization — including portfolio optimization and diversification
- Estimation — including European Call Options and fixed income pricing
The package also provides a circuit library (qiskit_finance.circuit.library
) with finance-related circuits covering payoff functions and probability distribution.
Qiskit Optimization
pip install qiskit-optimization
This package provides a set of tools for researching applications of quantum algorithms to optimization problems such as Max Cut and the Traveling Salesman.
The package contains a fundamental class (QuadraticProgram
) for constructing models of optimization problems, as well as the qiskit_optimization.converters
and qiskit_optimization.translators
sub-modules for switching between different model representations.
The algorithms sub-module contains algorithm and results classes specifically for solving optimization problems, including but not limited to:
- Grover Adaptive Search (
GroverOptimizer
) - Goemans-Williamson algorithm (
GoemansWilliamsonOptimizer
) - Minimum Eigensolver (
MinimumEigenOptimizer)
A quick side quest to the Qiskit Metapackage
If you are a bit confused by different syntaxes you come across for installing Qiskit packages, let’s clear some things up:
The Qiskit team currently manages some package releases using the Qiskit meta-package. This is essentially a single overarching package that will install multiple packages at once.
At the time of publishing, if you run pip install qiskit
you will install the following by default:
- Qiskit Terra
- Qiskit Aer (likely to be removed from the metapackage in the near future)
- Qiskit IBM Quantum Provider (now deprecated, due to be removed from the meta-package in the near future and replaced by Qiskit IBM Provider)
Some of the high and low level application modules can also be optionally installed using the meta-package, so it’s possible you may see code examples from time to time using pip install qiskit[application-name]
. This will install the default Qiskit packages as well as the specified optional package.
However, please note, we no longer recommend users refer to the metapackage to install Qiskit packages other than the Core Capabilities (i.e. Qiskit Terra). Instead, it is best practice to install these packages explicitly (e.g. pip install qiskit-nature
, pip install qiskit-aer
). Many of these application packages depend on Qiskit Terra, which should be automatically installed in the majority of cases.
Low Level Applications
While the high level applications are focused on addressing real world problems, the low level application modules are primarily designed for research closer to real quantum devices.
Qiskit Experiments
This package is for developing experiments to be run on real qubits. It replaced the now deprecated Qiskit Ignis package.
Experiments provides an extensive library of experiments for characterization, calibration, and verification that can be used for real quantum devices. A (very small) sample of the experiment classes include:
- Verification:
– Standard randomized benchmarking (StandardRB
)
– Interleaved randomized benchmarking (InterleavedRB
)
– Quantum Volume (QuantumVolume
) - Characterization:
– T1 (T1
)
– T2 Ramsey (T2Ramsey
)
– Rabi (Rabi
) - Calibration:
– qubit frequency calibration
– calibration version of Rabi
– calibration version of Drag
Honestly there are way too many out of the box experiments to list out in this blog post so you should just go check out the full library in the documentation here!
If you need a greater level of customization for your experiment than what is offered by the built-in library, you can also develop your own bespoke experiment using the Experiment Framework.
Qiskit Experiments also provides integration with Qiskit’s online experiments database, where you can view and share results of your experiments. You can learn how to save your experiment data to the cloud here.
Qiskit Metal
pip install qiskit-metal
This package aims to alleviate some of the pain points of designing quantum devices by enabling chip prototyping and analysis with a user-friendly graphical user interface (GUI) or Jupyter Notebook. Users can choose from a library of predefined quantum components, such as transmon qubits and coplanar resonators, and customize their parameters in real-time to fit their needs.
The package documentation also provides an extensive set of tutorials on using the tool and performing analyses.
Qiskit Dynamics
pip install qiskit-dynamics
This is a relatively newer package in the Qiskit ecosystem, we announced its first release last year on the Qiskit blog here.
Qiskit Dynamics aims to provide tools for building and numerically solving models of quantum systems, including tools for automatically performing common mathematical transformations on these models. It aims to automate common processes typically done by hand such as entering rotating frames and rotating wave approximation.
The package also provides integration with Qiskit Pulse and can be configured with a JAX backend for improved performance.
Simulator — Qiskit Aer
This category contains a single package, Qiskit Aer, which provides high-performance quantum computing simulators with realistic noise models.
Aer currently provides two simulator backends, made available via the Aer Provider module (qiskit.providers.aer
):
AerSimulator
- a simulator backend for noisy quantum circuitsPulseSimulator
- a simulator backend for pulse schedules
AerSimulator
also provides a number of different simulation methods to choose from, including statevector, density matrix, stabilizer, unitary, among others. See the full list in the documentation here.
Note: older versions of this package exposed each simulation method as a separate backend named QasmSimulator
, StatevectorSimulator
and UnitarySimulator
. Current versions of the package still enable access to these legacy backends, but it is recommended for users to use AerSimulator
with a specified simulator method as a parameter instead
Hardware Providers
This category encompasses the steadily growing list of hardware backends for which there are providers available for integrating those backends with Qiskit code. Each provider generally works in a similar way, you import the provider package, instantiate the provider class, then call .get_backend()
to retrieve and use a certain device:
IBM Quantum Systems (Qiskit IBM Runtime)
pip install qiskit-ibm-runtime
This is a relatively new architecture for execution on IBM Quantum devices, designed to optimize the process of submitting applications and algorithms to quantum processors. If you are developing quantum software at the algorithm layer or higher, you will benefit from the higher-level abstractions offered by the Qiskit Runtime primitives. This package offers direct interactions with the primitive services offered by IBM Quantum.
For a more detailed introduction to Qiskit Runtime, check out our other blog: What is Qiskit Runtime Anyway?
Non-IBM Hardware
Other providers exist for using Qiskit with non-IBM devices, such as AWS, Azure, Honeywell, Rigetti, IonQ and AQT backends, as well as many others that are currently being developed through collaboration with the Qiskit team. You can see the growing list of providers and accompanying documentation in the Qiskit Partners Documentation or GitHub Organization.
As we reach the end of our quantum space exploration, let’s return to our original question: ‘What is Qiskit?’.
Is Qiskit a collection of software packages? An ecosystem of features and capabilities? A marketing strategy? A community? An ideology? A way of life?
When it comes down to it, Qiskit is a core technology for enabling the execution of quantum circuits, plain and simple. The core capabilities of this technology form the center of a complex ecosystem of open source software, supported by a thriving community that you, as a user or contributor, are a valuable member of and can help shape for the future.
With this blog post, we have by no means mapped out the entire Qiskit cosmos, but we hope to have given you a better sense of direction as you navigate this vast ecosystem with us.
Good luck on your voyage fellow Qiskitters!