Ask or search…
K

Install Locally

Follow the steps below to use the Quil SDK 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).

Install the Compiler and QVM

Start by downloading the quilc and qvm binaries for your operating system.
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
If you want to avoid installing anything locally, you can use Docker to run a pre-built image with the entirety of the Quil SDK and JupyterLab pre-installed. See Quil SDK Docker Imagefor setup instructions.
Start by downloading the quilc and qvm binaries for your operating system. Then, follow the instructions for your platform to install them:
macOS
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
Windows
To install on Windows, double-click forest-sdk.msi once it's downloaded, then follow the on-screen instructions.

  • Use the Windows search bar to search for "Add or remove programs"
  • Uninstall the application named "Forest SDK for Windows"
Linux
There are three ways to install on Linux: deb, rpm, or bare-bones.

deb

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
When you're finished, move on to verify the installation.

To uninstall, run:
sudo apt remove forest-sdk

rpm

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
When you're finished, move on to verify the installation.

To uninstall, run:
sudo yum uninstall forest-sdk
or
sudo rpm -e forest-sdk

bare-bones

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.
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 uninstall, remove the ~/rigetti directory.

Verify Installation

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

Install pyQuil

We publish new versions of pyQuil to PyPI. You can install pyQuil just like any other PyPI package.
pyQuil requires Python 3.8 or greater.
Using pip:
pip install pyquil
Using poetry:
poetry install pyquil
If you'd like to install pyQuil from source, see the pyQuil GitHub repository.

Using a Virtual Environment

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

Start the Compiler and QVM

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.

Run a Program

Now that the compiler and QVM servers are running, you are ready to run your first program with pyQuil!