In the paper presented by Smith, Curtis and Zeng, Quil specifies the
instruction set for a Quantum Abstract Machine (QAM,) akin to a Turing machine, yet more practical for accomplishing "real-world" tasks. The state of the QAM can be represented as a 6-
tuple (|\Psi\rangle, C, G, G', P, \kappa) where: • |\Psi\rangle is the (quantum) state of a fixed but
arbitrary number of
qubits N_q indexed using a
0-based indexing. • C is a classical
memory of a number N_c of classical
bits indexed using a 0-based indexing. • G a fixed but arbitrary list of static gates (
quantum gates that do not depend on parameters, like the
Hadamard gate.) • G' a fixed but arbitrary list of parametric gates (gates that depend on a number of
complex parameters like the
phase shift gate that requires an angle
parameter to be completely defined.) • P a sequence of Quil instructions to be executed, representing the program. The length of P is denoted by |P|. • \kappa an integer
program counter pointing to the next instruction to be executed. \kappa always starts at 0 (pointing to the 0^{th} instruction) and ends at |P| indicating program halting (note that the last instruction has the index |P| - 1.) The program counter is incremented after every instruction, except for special
control flow instructions (conditional and unconditional
jumps, and the special HALT instruction that halts the program by setting \kappa to |P|. The
semantics of the QAM are defined using
tensor products of
Hilbert spaces and the
linear maps between them. == Features ==