pyquil icon indicating copy to clipboard operation
pyquil copied to clipboard

Behaviour of DELAY statement is inconsistent with documentation

Open bramathon opened this issue 3 years ago • 0 comments

Pre-Report Checklist

pyquil 3.0.0

Issue Description

In the documentation, the syntax for DELAY statements is as follows:

DELAY q0 q1 ... delay_in_s

https://pyquil-docs.rigetti.com/en/stable/apidocs/pyquil.gates.html#pyquil.gates.DELAY

It is also possible to delay all frames on some qubits, e.g. DELAY 0 1 2 1.0

or

PRAGMA q0 q1 "delay_in_s"

https://pyquil-docs.rigetti.com/en/stable/basics.html#asking-for-a-delay

However, the behaviour seems to follow the quilT specification:

https://github.com/quil-lang/quil/blob/master/rfcs/analog/proposal.md#delay

which doesn't apply the delay to q0 and q1, but only to instructions which include both q0 and q1.

Suggested fix

The documentation should be updated to make this more clear:

eg. Delay single-qubit gates on qubit 5 for 50ns

DELAY 5 50.0e-9

eg. Delay two-qubits gates on qubit 4/5 for 50ns

DELAY 4 5 50.0e-9

eg. Delay all gates on qubit 4/5 for 50ns

DELAY 4 50.0e-9
DELAY 5 50.0e-9
FENCE 4 5

bramathon avatar Aug 16 '21 14:08 bramathon