If you’re having any trouble running your pyQuil programs locally or on the QPU, please check the following things before sending a support request. It will save you time and make it easier for us to help!
Timeout in compilation¶
This may occur due to the size of your program, problems with your local
quilc service, or problems
with the remote QCS API.
quilcis running, per the compiler documentation: The Quil compiler.
Try compiling and running a smaller program, or one that previously worked.
If you have a larger program and expect it to take a long time to compile, set a higher
compiler_timeoutvalue per the instructions here: The Quil compiler.
Timeout in execution¶
This may occur due to one of several different problems. Often, it’s because you don’t have network access to the execution endpoint.
If you’re running against the QVM, ensure that it’s running: Setting up requisite servers for pyQuil. If you’re using docker,
you can check this using
If you’re running against the QPU, ensure that you are running your program from a supported environment. Live Rigetti QPUs are only accessible from Rigetti-provided environments, such as JupyterHub. If you are running from anywhere else, such as a script on your local computer or a public cloud virtual machine, your program won’t be able to reach a QPU and will time out.
Collect debug information¶
Ensure that your pyQuil version is up to date. If you’re using
pip, you can do this with
pip show pyquil. Within your script, you can use
import pyquil print(pyquil.__version__)
pyQuil exposes a diagnostics report that prints helpful debugging information, including whether you have connectivity to
QVMand access to QCS services. You can use it by importing a function from the
from pyquil.diagnostics import get_report print(get_report())
Use this report to confirm you have connectivity to the services you need and that your environment matches what you expect.
Run your script with debug logging enabled by adding the following to the top of your script:
import logging logging.basicConfig(level=logging.DEBUG)
For information on how to filter the logs, see the qcs-sdk-python logging documentation
import logging # Disable debug logging, otherwise doctests will run with # debug logging enabled. logging.basicConfig(level=logging.INFO)
If the problem still isn’t clear, then we can help! Please file an issue on the GitHub repo if it’s an issue with pyQuil itself, or contact us at our support page for problems with QCS. If applicable, be sure to include the diagnostics report and debug logs from above as they will help us better diagnose the problem.
Thanks for using pyQuil!