Getting started#
Installation#
Qiskit Algorithms depends on the main Qiskit package which has its own Qiskit installation instructions detailing the installation options for Qiskit and its supported environments/platforms. You should refer to that first, before focusing on the additional installation instructions specific to Qiskit Algorithms.
Qiskit Algorithms has some functions that have been made optional where the dependent code and/or support program(s) are not (or cannot be) installed by default. See Optional installs for more information.
The simplest way to get started is to use the pip package manager:
pip install qiskit-algorithms
Installing Qiskit Algorithms from source allows you to access the most recently updated version under development, instead of using the version in the Python Package Index (PyPI) repository.
Since Qiskit Algorithms depends on Qiskit, and its latest changes may require new or changed features of Qiskit, you should first follow Qiskit’s “Install from source” instructions here
Installing Qiskit Algorithms from Source
Using the same development environment that you installed Qiskit in you are ready to install Qiskit Algorithms.
Clone the Qiskit Algorithms repository.
git clone https://github.com/qiskit-community/qiskit-algorithms.git
Cloning the repository creates a local folder called
qiskit-algorithms
.cd qiskit-algorithms
If you want to run tests or linting checks, install the developer requirements.
pip install -r requirements-dev.txt
Install
qiskit-algorithms
.pip install .
If you want to install it in editable mode, meaning that code changes to the project don’t require a reinstall to be applied, you can do this with:
pip install -e .
Optional installs#
Some optimization algorithms require specific libraries to be run:
Scikit-quant, may be installed using the command pip install scikit-quant.
SnobFit, may be installed using the command pip install SQSnobFit.
NLOpt, may be installed using the command pip install nlopt.