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
  • Job Execution-Duration Timeout
  • Request Timeout

Was this helpful?

  1. Guides
  2. How Programs Are Built & Run

Execution and Request timeouts

PreviousHow Programs Are Built & RunNextThe Lifecycle of a Program

Last updated 9 months ago

Was this helpful?

Job Execution-Duration Timeout

Programs run on a QPU always have a job execution-duration timeout; this is the maximum time a program can spend executing (not including time spent queued for execution). When the timeout expires, if the program is still running, it is halted; in some cases, it may be retried automatically.

The job timeout is based on the expected execution duration. When possible, this is calculated automatically as part of program translation. However, users may as part of the job-execution request. There is a maximum job timeout on each QPU, and jobs that request a longer timeout than the maximum will be rejected. If a program uses dynamic control flow, it is given a default timeout rather than a calculated estimate (see: ).

The job timeout is applied to each program execution attempt individually. This means that for parametric or batch execution, each job or execution configuration will have the full timeout duration during which to execute.

PyQuil's execution_timeout argument of does not actually set the job execution-duration timeout; rather, it determines the request timeout for all requests to the job-execution service. This includes job submission, getting the job status, and retrieving job results.

Request Timeout

Separately, request timeouts, cancelling any requests that last too long. In particular, retrieving execution results may time out before the program has finished or even started executing, for instance if the program is queued for execution for longer than expected. The request timeout is not part of the QCS API; the execution service is completely unaware of the client's request timeout. Execution and request timeouts are therefore completely separate and unrelated.

If a request to retrieve execution results for a specific program times out, the corresponding program is not cancelled; it may still complete successfully. A second request for results may be successful.

Request timeouts are configurable, but different gRPC clients support different means of configuration. Consult the API documentation for your specific client or SDK library.

There is also a in the pyQuil documentation.

request a longer timeout
Halting Problem
the get_qc function
timeout troubleshooting section