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:
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:
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.
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
:
Using poetry
:
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:
To deactivate the virtual environment, run:
Start the Compiler and QVM
Open a terminal window and start the compiler in server mode:
Then, open a second terminal window and start the QVM in server mode:
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!
Last updated