LogoLogo
  • Welcome to Quantum Cloud Services
  • Getting Started
    • Set up your environment
      • JupyterLab IDE
      • Install Locally
        • Quil SDK Docker Image
    • Quil SDK Overview
    • Running your first Quantum Program
  • Guides
    • Quil
      • What is Quil?
      • Language Support
      • Dynamic Control Flow
      • Customizing Program Readout
    • QPU vs. Simulator (QVM)
    • How to Use Rigetti QPUs
    • Access a QPU
      • QPU Reservations
      • On-Demand Access
      • QCS QPU Gateway
    • QCS Group Accounts
    • Interactive Tutorials
    • How Programs Are Built & Run
      • Execution and Request timeouts
    • The Lifecycle of a Program
    • The Rigetti QCS API
    • Using the QCS CLI
      • Using the Legacy QCS CLI
    • QCS Credentials
    • Benchmarking and Fidelity
  • Troubleshooting
    • Gathering Diagnostics
    • Report an Issue
  • Glossary
  • FAQ
  • References
    • pyQuil Reference
    • QCS API Specification
    • QCS CLI Reference
    • QCS Client Configuration
    • Quil / Quil-T Specification
    • quilc Reference
    • quil-rs Reference
    • QVM Reference
    • Rigetti Module for Cirq
    • Rigetti Provider for Qiskit
Powered by GitBook
On this page
  • Install the Compiler and QVM
  • Verify Installation
  • Install pyQuil
  • Using a Virtual Environment
  • Start the Compiler and QVM
  • Run a Program

Was this helpful?

  1. Getting Started
  2. Set up your environment

Install Locally

PreviousJupyterLab IDENextQuil SDK Docker Image

Last updated 1 year ago

Was this helpful?

Follow the steps below to use the locally.

Installing locally is most useful for development using a QVM. Running programs against a QPU requires a as well as network access to the QPU (available via your provisioned ).

Install the Compiler and QVM

Start by for your operating system.

If you'd like to skip installing quilc and qvm locally, you can run them from pre-created 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 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: , , or .

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 .


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 .


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

pyQuil requires Python 3.8 or greater.

Using pip:

pip install pyquil

Using poetry:

poetry install pyquil

Using a Virtual Environment

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

Run a Program

We publish new versions of pyQuil to . You can install pyQuil just like any other PyPI package.

If you'd like to install pyQuil from source, see the .

We highly recommend installing into a . For example, you can create a virtual environment named .venv and activate it with the following command prior to installing pyQuil or other packages:

For more details on using the quilc and qvm binaries, see the and the .

Now that the compiler and QVM servers are running, you are ready to !

PyPI
pyQuil GitHub repository
virtual environment
quilc Reference
QVM Reference
run your first program with pyQuil
reservation
JupyterLab IDE
downloading the quilc and qvm binaries
Docker
downloading the quilc and qvm binaries
deb
rpm
bare-bones
verify the installation
verify the installation
Quil SDK