Installing Locally
Installing locally is most useful for development using a QVM. Running programs against a QPU requires a reservation as well as network access to the QPU (available via your provisioned JupyterLab IDE).
If you'd like to skip installing
quilc
and qvm
locally, you can run them from pre-created Docker images instead. For example:docker run --rm -it -p 5555:5555 rigetti/quilc -P -S
docker run --rm -it -p 5000:5000 rigetti/qvm -S
To install on macOS, double-click
forest-sdk.dmg
once it's downloaded. Then double-click forest-sdk.pkg
and follow the on-screen instructions.To uninstall, remove the following files:
/usr/local/bin/qvm
/usr/local/bin/quilc
/usr/local/share/man/man1/qvm.1
/usr/local/share/man/man1/quilc.1
To install on Windows, double-click
forest-sdk.msi
once it's downloaded, then follow the on-screen instructions.To uninstall:
- 1.Use the Windows search bar to search for "Add or remove programs"
- 2.Uninstall the application named "Forest SDK for Windows"
Unpack the downloaded tarball and change to its resulting directory by running the following in a terminal (replacing
<version>
with the downloaded version of the SDK):tar -xf forest-sdk-linux-deb.tar.bz2
cd forest-sdk-<version>-linux-deb
From here, run the following command to complete the install (replacing
<version>
with the downloaded version of the SDK):sudo ./forest-sdk-<version>-linux-deb.run
To uninstall, run:
sudo apt remove forest-sdk
Unpack the downloaded tarball and change to its resulting directory by running the following in a terminal (replacing
<version>
with the downloaded version of the SDK):tar -xf forest-sdk-linux-rpm.tar.bz2
cd forest-sdk-<version>-linux-rpm
From here, run the following command to complete the install (replacing
<version>
with the downloaded version of the SDK):sudo ./forest-sdk-<version>-linux-rpm.run
To uninstall, run:
sudo yum uninstall forest-sdk
or
sudo rpm -e forest-sdk
The bare-bones installation only contains the executable binaries and manual pages — it doesn’t contain any of the requisite dynamic libraries. As such, installation doesn’t require administrative or
sudo
privileges.First, unpack the downloaded tarball and change to its resulting directory by running the following in a terminal (replacing
<version>
with the downloaded version of the SDK):tar -xf forest-sdk-linux-barebones.tar.bz2
cd forest-sdk-<version>-linux-barebones
From here, run the following command to complete the install (replacing
<version>
with the downloaded version of the SDK):./forest-sdk-<version>-linux-barebones.run
Upon successful installation, this will have created a new directory
rigetti
in your home directory that contains all of the binary and documentation artifacts.To uninstall, remove the
~/rigetti
directory.This method of installation requires you, through any means, to install shared libraries for
BLAS
, LAPACK
, and libffi
.On a Debian-derivative system, this could be accomplished with:
sudo apt-get install liblapack-dev libblas-dev libffi-dev libzmq3-dev
Or on any rhel-derivative systems (e.g. Amazon Linux) with:
sudo yum install -y lapack-devel blas-devel epel-release
sudo yum install -y zeromq3-devel
To check that the binaries were properly installed, run the following commands in a terminal. They should each execute successfully and print version numbers.
quilc --version
qvm --version
pyQuil requires Python 3.8 or greater.
Using
pip
:pip install pyquil
Using
poetry
:poetry install pyquil
We highly recommend installing into a virtual environment. For example, you can create a virtual environment named
.venv
and activate it with the following command prior to installing pyQuil or other packages:python -m venv .venv
source .venv/bin/activate
To deactivate the virtual environment, run:
deactivate
Open a terminal window and start the compiler in server mode:
quilc -P -S
Then, open a second terminal window and start the QVM in server mode:
qvm -S
For more details on using the
quilc
and qvm
binaries, see the quilc Reference and the QVM Reference.Now that the compiler and QVM servers are running, you are ready to run your first program with pyQuil!
Last modified 1mo ago