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.[1] The state of the QAM can be represented as a 6-tuple where:
is a classical memory of a number of classical bits indexed using a 0-based indexing.
a fixed but arbitrary list of static gates (quantum gates that do not depend on parameters, like the Hadamard gate.)
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.)
a sequence of Quil instructions to be executed, representing the program. The length of is denoted by .
an integer program counter pointing to the next instruction to be executed. always starts at 0 (pointing to the instruction) and ends at indicating program halting (note that the last instruction has the index .) 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 to .
Quil has support for defining possibly parametrized gates in matrix form (the language does not include a way to verify that the matrices are unitary, which is a necessary condition for the physical realizability of the defined gate) and their application on qubits. The language also supports macro-like definitions of possibly parametrized quantum circuits and their expansion, qubit measurement and recording of the outcome in classical memory, synchronization with classical computers with the WAIT instruction which pauses the execution of a Quil program until a classical program has ended its execution, conditional and unconditional branching, pragma support, as well as inclusion of files for use as libraries (a standard set of gates is provided as one of the libraries.)
Rigetti QVM
Rigetti Computing developed a quantum virtual machine in Common Lisp that simulates the defined Quantum Abstract Machine on a classical computer and is capable of the parsing and execution of Quil programs with possibly remote execution via HTTP.[9]
^ abcSmith, Robert S.; Curtis, Michael J.; Zeng, William J. (2016-08-10). "A Practical Quantum Instruction Set Architecture". arXiv:1608.03355 [quant-ph].
^Rubin, Nicholas C. (2016-10-21). "A Hybrid Classical/Quantum Approach for Large-Scale Studies of Quantum Systems with Density Matrix Embedding Theory". arXiv:1610.06910 [quant-ph].
^Farhi, Edward; Goldstone, Jeffrey; Gutmann, Sam (2014-11-14). "A Quantum Approximate Optimization Algorithm". arXiv:1411.4028 [quant-ph].