Language Support
The following describes which Quil syntax is supported on Ankaa-1 and later QPUs.
Instructions
ADD
, SUB
Supported for INTEGER
s and REAL
s.
Wraps on overflow.
NB: Prior to November 2024, ADD
and SUB
were also unintentionally supported on BIT
s. This is not part of the Quil spec; the replacement for both ADD
and SUB
on BIT
s is XOR
.
Nov. 2024
CAPTURE
Supported.
Sep. 2020
DECLARE
DELAY
Full support.
Sep. 2020
DIV
, MUL
Supported:
for operands of the same data type
Wraps on overflow.
Dec. 2023
FENCE
Supported.
Sep. 2020
LOAD
, STORE
Supported. The dynamic offset value is bounds-checked at runtime to ensure memory safety; if out of bounds, the program terminates with a fixed error code. The region and offset value are not specified in that error code and must be inferred by the program author.
Dec. 2023
RAW-CAPTURE
Supported, with caveats:
One per program
No
CAPTURE
may be present in the programHas a maximum duration which may vary based on the current implementation
This adds a delay to the end of the basic block in which it is invoked, in order to allow enough time for the values to be read from the control system. This time is proportional to the duration of the instruction.
Some of these limitations are more fundamental than others; contact QCS support if they block you from a useful program.
Note that the signal read out in this instruction is not from one qubit alone, but from a group of qubits. The groups depend on the device architecture and can be inferred from the Quil frame definition (for Ankaa and later QPUs). Look for the following attribute:
ENABLE-RAW-CAPTURE: "true"
Sep. 2020
SET-FREQUENCY
, SHIFT-FREQUENCY
Supported. Unit: Hertz
Sep. 2020
SET-PHASE
, SHIFT-PHASE
Supported. Unit: Radians
Sep. 2020
SET-SCALE
Dec. 2023
SWAP-PHASES
Dec. 2023
MOVE
Supported between regions of the same data type.
Dec. 2023
AND
, IOR
,OR
, XOR
Supported for INTEGER
s and BIT
s.
Jul. 2024
EQ
, GE
, GT
, LE
, LT
Supported between regions of the same data type.
Sep. 2024
NEG
, NOT
Supported for INTEGER
and BIT
s.
Nov. 2024
NOP
Supported, but has no effect on the program.
Dec. 2023
CONVERT
Not supported.
LABEL
JUMP
, JUMP-WHEN
, JUMP-UNLESS
HALT
Supported.
Diverging from the Quil spec, jump condition operand may be of any Quil datatype, not only BIT
.
Note that all of these instructions start a new basic block and thus no pulse program timing behavior is guaranteed across one.
Dec. 2023
EXCHANGE
Not supported.
Binary Representation
All values are encoded into 48 bits within our control system. The encoding depends on the point of use, irrespective of the Quil datatype:
The point of use is the way in which the value is consumed within the program. For example, memory values and literals used as phase values are encoded differently from those used as frequency values.
If the value is only used by the Quil program itself - such as a loop index - then it is encoded per its Quil datatype:
BIT
,OCTET
,INTEGER
as signed 48-bitREAL
as s22.22 fixed-point
PRAGMAs
Unsupported and unrecognized PRAGMAs result in translation errors.
FILTER-NODE <qubit> "<filter spec>"
Configures the execution post-processing pipeline. Distributed with Quil calibrations and meant for use by QCS. Editing it is "safe" but may cause unexpected readout values to be returned from execution.
LOAD-MEMORY <qubit> <memory region>
Maps a qubit's readout stream to a memory regions to mimic shot-wise memory values.
This mapping is returned to the translation client (e.g. pyquil
) for use on the client side. Does not affect program execution.
TSUNAMI-ASSEMBLY "<assembly>"
Writes raw control system assembly into the compiled program. Limited to select users; requires special authorization and knowledge for proper use.
Waveforms
Last updated