Behaviour of DELAY statement is inconsistent with documentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 358
- Avg merge
- 1d 58m
- Merged PRs (30d)
- 4
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DELAY API documentation and the “Asking for a delay” basics page linked in the issue, then compare their wording with the Quil delay specification. Update the documentation to distinguish delays on individual qubits, shared multi-qubit instructions, and all gates, using the examples provided. Verify that the documented behavior matches the specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, quantum-computing
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100