Install Locally
Follow the steps below to use the Quil SDK locally.
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
Start by downloading the quilc
and qvm
binaries for your operating system. Then, follow the instructions for your platform to install them:
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
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
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
Now that the compiler and QVM servers are running, you are ready to run your first program with pyQuil!
Last updated
Was this helpful?