Home

PyQuil

PyQuil is a Python library for quantum programming that provides an interface to write and run programs in the Quil language. Developed by Rigetti Computing, it is part of the company’s software stack for designing, simulating, and executing quantum circuits on both quantum hardware and simulators.

At its core, PyQuil offers a Pythonic way to construct quantum programs. Users can define quantum gates,

Execution with PyQuil can take place on a local Quantum Virtual Machine (QVM) for simulation or on

The library is widely used in research and education for prototyping variational algorithms, gate synthesis, and

create
parametrized
gates,
and
use
DefGate
to
implement
custom
operations.
The
language
also
supports
measurements
and
classical
memory
for
simple
feedback
and
conditional
execution.
Programs
are
built
with
the
Program
object
and
can
include
a
mix
of
quantum
and
classical
instructions.
PyQuil
integrates
with
the
Quil
compiler,
quilc,
to
translate
Quil
programs
into
hardware-friendly
instructions.
Rigetti’s
real
quantum
processing
units
(QPU)
via
Quantum
Cloud
Services
(QCS).
The
get_qc
function
provides
access
to
a
chosen
quantum
computer,
enabling
users
to
run
experiments,
collect
measurement
data,
and
iterate
on
quantum
algorithms.
PyQuil
supports
utilities
for
running
multiple
trials,
managing
calibration
data,
and
working
with
various
simulators
and
backends.
quantum
circuit
experiments.
It
is
open-source
and
designed
to
interoperate
with
Rigetti’s
broader
software
ecosystem,
including
the
Quil
language,
quilc
compiler,
and
cloud-based
quantum
resources.