quil-lang / quil

Specification of Quil: A Practical Quantum Instruction Set Architecture
https://quil-lang.github.io/
Apache License 2.0
104 stars 16 forks source link

DEFCAL definition is inconsistent with the examples #66

Closed notmgsk closed 3 months ago

notmgsk commented 9 months ago

The spec's definition of DEFCAL is

⟨Calibration Definition⟩ ::= DEFCAL ⟨Modifier⟩*⟨Identifier⟩ ( ⟨Parameters⟩ ) ⟨Qubit⟩+ : ⟨Instruction⟩+

The spec then uses these as examples

DEFCAL RX(%theta) %qubit:

...

DEFCAL RZ(%theta) %qubit:
    SHIFT-PHASE %qubit "xy" %theta

In particular, both use the % prefix for the qubit name. However, the definition uses ⟨Qubit⟩ as the type, which restricts values to non-negative integers.

I think there are two problems here:

macrologist commented 3 months ago

@notmgsk Merged a change (see #80). I'm closing this issue but will re-open if this does seem quite right.